Google Drive Block
The Google Drive block enables file operations with Google Drive. Upload files, read content, create folders, and manage your cloud storage within workflows.
Key Features
- Upload Files - Store files in Google Drive
- Read Files - Retrieve file content and metadata
- Create Folders - Organize files with folder creation
- Delete Files - Remove files from Drive
- Share Options - Control file visibility and permissions
Connect your Google account in workspace settings to use this block. Ensure the Drive API is enabled in your Google Cloud project.
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| Credentials | Select | Yes | Google OAuth credentials |
| Action | Select | Yes | Upload, Read, Delete, or Create Folder |
| File/Folder ID | Text | Varies | ID of the file or folder to operate on |
| File Content | Text/Binary | For Upload | The file data to upload |
| File Name | Text | For Upload | Name for the uploaded file |
| MIME Type | Select | For Upload | File type (PDF, image, document, etc.) |
| Folder ID | Text | Optional | Parent folder for uploads |
| Make Public | Boolean | Optional | Whether to share file publicly |
Setup Guide
- Configure Google OAuth credentials in workspace settings
- Add the Google Drive block to your workflow
- Select your Google credentials
- Choose the action type
- Configure parameters based on the action
Actions
Upload File
Upload a file to Google Drive:
Action: Upload File
File Name: report-{{date}}.pdf
MIME Type: application/pdf
File Content: {{generated_pdf}}
Folder ID: 1ABC123xyz (optional)
Make Public: falseRead File
Retrieve file content and metadata:
Action: Read File
File ID: 1ABC123xyzReturns: File content, name, MIME type, size, and metadata.
Delete File
Remove a file from Drive:
Action: Delete File
File ID: 1ABC123xyzCreate Folder
Create a new folder:
Action: Create Folder
Folder Name: Monthly Reports
Parent Folder ID: 1ABC123xyz (optional)MIME Types
| Type | MIME Type |
|---|---|
| application/pdf | |
| Word Document | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| Excel Spreadsheet | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| Image (PNG) | image/png |
| Image (JPEG) | image/jpeg |
| Plain Text | text/plain |
| JSON | application/json |
Output
The block outputs vary by action:
Upload:
- fileId (string) - ID of the uploaded file
- webViewLink (string) - Link to view the file
- downloadLink (string) - Direct download link
Read:
- content (string/binary) - File content
- name (string) - File name
- mimeType (string) - File type
- size (number) - File size in bytes
Create Folder:
- folderId (string) - ID of the created folder
Best Practices
- Organize Files - Use folders to keep files organized
- Set Permissions - Only make files public when necessary
- Use Descriptive Names - Include dates or identifiers in file names
- Handle Large Files - Consider file size limits for your plan
Error Handling
| Error | Cause | Solution |
|---|---|---|
| File not found | Invalid file ID | Verify the file ID exists |
| Permission denied | Insufficient access | Check sharing settings and permissions |
| Storage quota exceeded | Drive is full | Free up space or upgrade storage |
| Invalid MIME type | Unsupported format | Use a supported file type |