---
title: "upload-to-onedrive | Customer&#x27;s Canvas Hub"
canonical: "https://customerscanvas.com/docs/hub/printer-guide/pipelines/tasks/upload-to-onedrive/"
---

# upload-to-onedrive

> Learn how the upload-to-onedrive task uploads artifacts to a OneDrive user folder.

This task uploads the specified artifact to a user folder on the OneDrive server.

## Parameters

- `driveClientId`: The Application (client) ID in the Azure application.
- `driveClientSecret`: The value under **Certificates & secrets** in the Azure application.
- `driveTenantId`: The Directory (tenant) ID in the Azure application.
- `driveOwner`: The email address of the user account where files will be uploaded.

For each artifact listed in `inputArtifacts`, a path for saving the file must be specified as follows:

`"<artifact_name>": "<remote_path>"`

If the path includes subfolders, the handler checks for their existence and attempts to create them if necessary. For example:

```js
"design": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/source-design-{{project.id}}"
```

### Artifact Group Processing

The task supports processing artifact groups. The `*` symbol indicates the insertion point for the artifact index in the file path. For example:

```js
"result*": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/print-file-*-{{project.id}}"
```

Overriding the path for a specified artifact in the group is also supported. For example:

```js
"result1": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/override-name-for-the-first-result"
```

All parameter values support [argument interpolation](https://customerscanvas.com/docs/hub/printer-guide/pipelines/concepts/interpolation.md) following the common rules.

## Example

```json
{
    "description": "Upload to OneDrive",
    "name": "upload-to-onedrive",
    "type": "upload-to-onedrive",
    "inputArtifacts": [
        "hires-design-pdf"
    ],
    "parameters": {
        "driveClientId": "1234",
        "driveClientSecret": "1234",
        "driveTenantId": "1234",
        "driveOwner": "j.wood@example.com",
        "hires-design-pdf": "TestFolder/Test/hires-{{project.id}}"
    },
    "outputArtifacts": []
}
```
