Back to Website
Show / Hide Table of Contents

upload-to-google-drive

  • Last updated on March 20, 2025
  • •
  • Less than a minute to read

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:

"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:

"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:

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

These parameters support argument interpolation following the common rules.

Example

{
    "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": []
}
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback