Workflows
Blocks
Integrations
Google Drive

Google Drive Block

The Google Drive block performs file operations against Google Drive. Upload a file from a URL, read a file's contents, or move a file to Drive's Trash — all from inside a workflow.

Key Features

  • Upload File - Stream a file from any URL into Google Drive
  • Read File - Fetch a Drive file and expose it as a public URL
  • Move to Trash - Send a file to Drive's Trash (recoverable, not a permanent delete)
  • Google Picker - Choose files and folders through Google's own picker instead of pasting IDs
  • Variable Mapping - Map any output field onto a workflow variable

Connect your Google account in workspace settings to use this block. Files are selected with Google's Picker, which grants access per file under the drive.file scope.

Actions

The block has exactly three actions. Note that the Move to Trash action is stored internally as Delete file for backwards compatibility with already-saved workflows, but it never deletes permanently.

ActionLabel in the editorWhat it does
Upload fileUpload fileStreams a file from a URL into Drive
Read fileRead fileDownloads a Drive file and returns a public URL
Delete fileMove to TrashMoves the file to Drive's Trash
⚠️

There is no Create Folder action. Folder creation requires a server-side Drive call that the drive.file scope cannot make. Create folders in Google Drive itself — Google's Picker also has a "New folder" affordance — then pick the folder here.

How files move through the block

Every action stages the file in Indite's own object storage (MinIO/S3) as well as Drive:

  1. Upload — URL → object storage (streamed) → Google Drive. Returns both the storage URL and the Drive URL.
  2. Read — Google Drive → object storage (streamed). Returns the public storage URL.
  3. Move to Trash — Moves the Drive file to Trash and removes the staged copy from object storage.

This is why every action returns a fileUrl: it is a directly fetchable URL that downstream blocks can consume without Google credentials.

Selecting files with the Google Picker

Files and folders are chosen through Google's Picker rather than by pasting IDs.

In the builder, the Picker renders inline. In Agent Store, block settings run inside a sandboxed cross-origin iframe where Google's Picker will not render reliably, so it opens as a standalone popup (/drive-picker) on the builder's own origin and posts the picked file back to the opener.

If the popup reports that the picker is not configured, the server is missing its Picker API key or app id. Contact your workspace administrator.

Configuration

Upload File

FieldTypeRequiredDescription
CredentialsSelectYesGoogle Drive OAuth credentials
Public File URLTextYesPublicly reachable source URL to stream from, e.g. https://example.com/file.pdf
Save File AsTextNoTarget file name, e.g. my-document or my-image.png
File TypeSelectNoMIME type; defaults to auto-detect
Upload to FolderPickerNoDestination folder; defaults to Drive root
DescriptionTextNoFile description stored on the Drive file
Execution ResultVariable mappingNoMap output fields onto workflow variables

Read File

FieldTypeRequiredDescription
CredentialsSelectYesGoogle Drive OAuth credentials
Select FilePickerYesThe Drive file to read
Execution ResultVariable mappingNoMap output fields onto workflow variables
Save File public URLVariableNoStore the public URL of the staged copy

Move to Trash

FieldTypeRequiredDescription
CredentialsSelectYesGoogle Drive OAuth credentials
Select file to move to TrashPickerYesThe Drive file to move to Trash
Execution ResultVariable mappingNoMap output fields onto workflow variables

Output

Upload File

FieldTypeDescription
fileUrlstringPublic URL of the staged copy in object storage
driveUrlstringLink to the file in Google Drive
driveFileIdstringGoogle Drive file id
fileNamestringSanitised file name as stored
mimeTypestringDetected or configured MIME type
sizenumberFile size in bytes
inputFormatstringSource file extension
outputFormatstringStored file extension
descriptionstringThe configured description
⚠️

If the object-storage upload succeeds but the Drive upload fails, the block reports failure and still returns fileUrl so the staged file can be recovered. Do not treat the presence of fileUrl as proof the Drive upload worked.

Read File

FieldTypeDescription
fileUrlstringPublic URL of the staged copy
fileNamestringFile name
mimeTypestringFile type (the export MIME type for Google-native files)
sizenumberFile size in bytes
inputFormatstringSource file extension
outputFormatstringStored file extension

Move to Trash

FieldTypeDescription
messagestringFile Moved to Google Drive trash.
fileIdstringGoogle Drive file id
fileNamestringFile name

Supported File Types

The block's MIME type list covers Google-native formats, documents, images, video, audio, and text.

Google native: Folder, Google Doc, Google Sheet, Google Slides

CategoryTypes
DocumentsPDF, Word (.doc, .docx), Excel (.xls, .xlsx), PowerPoint (.ppt, .pptx)
ImagesJPEG, PNG, GIF, SVG, WebP, BMP, TIFF
VideoMP4, AVI, QuickTime (MOV), WMV, WebM, MKV
AudioMP3, WAV, OGG, AAC, M4A, FLAC
TextPlain text, CSV, HTML, CSS, JavaScript, JSON, XML

Archive formats (ZIP, RAR, TAR, GZIP, 7-Zip) and generic binary are not in the selectable list. For those, leave File Type on auto-detect.

Referencing outputs downstream

Use the block's output fields in later blocks, or map them onto variables with Execution Result:

Google Drive (Read file) → LLM Agent
   Prompt: "Summarise the document at {{driveBlock.fileUrl}}"

The most common mapping is fileUrl onto a variable, so a later block can attach or fetch the file without Google credentials.

Best Practices

  • Pick, don't paste — use the Picker so the drive.file scope actually grants access to the file
  • Create folders in Drive — the block cannot create them
  • Check success, not fileUrl — an upload can stage the file and still fail at Drive
  • Use Descriptive Names — include dates or identifiers in Save File As
  • The source URL must be publicly reachable — the block streams from it server-side, with no credentials of yours attached
  • Remember Trash is recoverable — Move to Trash is reversible from Drive's Trash, and is not a compliance-grade deletion

Error Handling

ErrorCauseSolution
Google Drive block requires credentialsNo credentials selectedSelect Google Drive credentials in the block
Google Drive block requires options / missing actionBlock not fully configuredChoose an action and fill its fields
Failed to upload to Google DriveDrive rejected the upload after staging succeededCheck quota and permissions; the staged fileUrl is still returned
File not foundFile id no longer valid, or not granted under drive.fileRe-pick the file with the Picker
Permission deniedCredentials lack access to the fileRe-pick the file, or reconnect the Google account
Storage quota exceededDrive is fullFree up space or upgrade Google storage
Picker will not openMissing Picker API key or app id on the serverAsk your administrator to configure the Picker

Troubleshooting

The Picker opens and immediately closes:

  • The popup must not be blocked. Allow popups for the builder's origin.

The Picker fails only in Agent Store:

  • This is expected to route through the /drive-picker popup. If it fails there, the builder origin's Picker API key restriction is the thing to check.

A file readable in Drive returns "not found":

  • Under the drive.file scope, access is granted per file through the Picker. A file id copied from elsewhere will not resolve — pick it instead.
Indite Documentation v1.7.1
PrivacyTermsSupport