Google Drive Step

Upload files to Google Drive as part of your workflow. Use this step to place generated or user-uploaded files into shared drives for team access.

The Google Drive step uploads files to a Google Drive folder using a named connection. You can store user-uploaded files and workflow-generated documents in a shared drive so your team can access them directly from Drive.

Configuration

nametyperequireddescription
connectionstringyesThe name of the Google Drive connection to use, as configured in Integrations.
actionstringyesThe operation to perform. Must be UPLOAD_FILE.
folderstringyesThe ID of the target Drive folder.
folderNamestringyesThe human-readable name of the target folder. Used for display purposes.
filesarrayyesOne or more files to upload. At least one file is required. See Files below.

Files

Each entry in the files array defines a file to upload and where it comes from.

nametyperequireddescription
sourcestring or objectyesThe file to upload. See File sources below.
namestringyesThe file name to use in Google Drive.

File sources

The source field accepts several formats depending on where the file comes from:

  • Object reference with ID: { "id": "string", "downloadUrl": "string" } — references a file by its ID. Both id and downloadUrl are required.
  • Object reference with URL only: { "downloadUrl": "string" } — references a file by download URL, without an ID.
  • Generated file descriptor: { "name": "string", "metadata": { "contentType": "string", "size": number, "createdAt": "string", "updatedAt": "string" } } — describes a workflow-generated file. Only name is required; all metadata fields are optional.
  • String URL or handle: A plain string used as a direct file reference.

Example

The example below uploads three files to a Google Drive folder: one referenced by ID, one workflow-generated, and one from a direct URL.

{
  "connection": "gdrive-prod",
  "action": "UPLOAD_FILE",
  "folder": "1A2B3C4D",
  "folderName": "Shared Reports",
  "files": [
    {
      "source": {
        "id": "file-321",
        "downloadUrl": "https://files.example.com/download/file-321"
      },
      "name": "q3-report.pdf"
    },
    {
      "source": {
        "name": "team-notes.md",
        "metadata": { "contentType": "text/markdown", "size": 512 }
      },
      "name": "team-notes.md"
    },
    {
      "source": "https://example.com/public/logo.png",
      "name": "logo.png"
    }
  ]
}