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

# upload-to-google-drive

> Learn how the upload-to-google-drive task uploads artifacts to a Google Drive folder.

This task uploads the specified artifact to Google Drive using an OAuth2 token.

## Parameters

- `clientId` - The Client ID value in OAuth2 Credentials in Google Cloud.
- `clientSecret` - The Client Secret value in OAuth2 Credentials in Google Cloud.
- `refreshToken` - The Refresh Token value for autonomous (offline) authorization.
- `parentFolderId` - The ID of the destination folder in Google Drive.

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 the existence of these folders and attempts to create them if necessary. For example:

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

Processing of artifact groups is supported. 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"
```

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

## Example

```json
{
    "description": "Upload to Google Drive",
    "name": "upload-to-google-drive",
    "type": "upload-to-google-drive",
    "inputArtifacts": [
        "design",
        "result*"
    ],
    "parameters": {
        "clientId": "12345",
        "clientSecret": "12345",
        "refreshToken": "12345",
        "parentFolderId": "1234567890AAbbCCddEEFfGgHh123-r12",
        "design": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/source-design-{{project.id}}",
        "result*": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/print-file-*-{{project.id}}",
        "result1": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/override-name-for-the-first-result"
    },
    "outputArtifacts": []
}
```
