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.
| Action | Label in the editor | What it does |
|---|---|---|
Upload file | Upload file | Streams a file from a URL into Drive |
Read file | Read file | Downloads a Drive file and returns a public URL |
Delete file | Move to Trash | Moves 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:
- Upload — URL → object storage (streamed) → Google Drive. Returns both the storage URL and the Drive URL.
- Read — Google Drive → object storage (streamed). Returns the public storage URL.
- 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
| Field | Type | Required | Description |
|---|---|---|---|
| Credentials | Select | Yes | Google Drive OAuth credentials |
| Public File URL | Text | Yes | Publicly reachable source URL to stream from, e.g. https://example.com/file.pdf |
| Save File As | Text | No | Target file name, e.g. my-document or my-image.png |
| File Type | Select | No | MIME type; defaults to auto-detect |
| Upload to Folder | Picker | No | Destination folder; defaults to Drive root |
| Description | Text | No | File description stored on the Drive file |
| Execution Result | Variable mapping | No | Map output fields onto workflow variables |
Read File
| Field | Type | Required | Description |
|---|---|---|---|
| Credentials | Select | Yes | Google Drive OAuth credentials |
| Select File | Picker | Yes | The Drive file to read |
| Execution Result | Variable mapping | No | Map output fields onto workflow variables |
| Save File public URL | Variable | No | Store the public URL of the staged copy |
Move to Trash
| Field | Type | Required | Description |
|---|---|---|---|
| Credentials | Select | Yes | Google Drive OAuth credentials |
| Select file to move to Trash | Picker | Yes | The Drive file to move to Trash |
| Execution Result | Variable mapping | No | Map output fields onto workflow variables |
Output
Upload File
| Field | Type | Description |
|---|---|---|
fileUrl | string | Public URL of the staged copy in object storage |
driveUrl | string | Link to the file in Google Drive |
driveFileId | string | Google Drive file id |
fileName | string | Sanitised file name as stored |
mimeType | string | Detected or configured MIME type |
size | number | File size in bytes |
inputFormat | string | Source file extension |
outputFormat | string | Stored file extension |
description | string | The 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
| Field | Type | Description |
|---|---|---|
fileUrl | string | Public URL of the staged copy |
fileName | string | File name |
mimeType | string | File type (the export MIME type for Google-native files) |
size | number | File size in bytes |
inputFormat | string | Source file extension |
outputFormat | string | Stored file extension |
Move to Trash
| Field | Type | Description |
|---|---|---|
message | string | File Moved to Google Drive trash. |
fileId | string | Google Drive file id |
fileName | string | File 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
| Category | Types |
|---|---|
| Documents | PDF, Word (.doc, .docx), Excel (.xls, .xlsx), PowerPoint (.ppt, .pptx) |
| Images | JPEG, PNG, GIF, SVG, WebP, BMP, TIFF |
| Video | MP4, AVI, QuickTime (MOV), WMV, WebM, MKV |
| Audio | MP3, WAV, OGG, AAC, M4A, FLAC |
| Text | Plain 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.filescope actually grants access to the file - Create folders in Drive — the block cannot create them
- Check
success, notfileUrl— 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
| Error | Cause | Solution |
|---|---|---|
Google Drive block requires credentials | No credentials selected | Select Google Drive credentials in the block |
Google Drive block requires options / missing action | Block not fully configured | Choose an action and fill its fields |
Failed to upload to Google Drive | Drive rejected the upload after staging succeeded | Check quota and permissions; the staged fileUrl is still returned |
| File not found | File id no longer valid, or not granted under drive.file | Re-pick the file with the Picker |
| Permission denied | Credentials lack access to the file | Re-pick the file, or reconnect the Google account |
| Storage quota exceeded | Drive is full | Free up space or upgrade Google storage |
| Picker will not open | Missing Picker API key or app id on the server | Ask 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-pickerpopup. 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.filescope, access is granted per file through the Picker. A file id copied from elsewhere will not resolve — pick it instead.