Google Drive
Description
Section titled “Description”Module for managing files in Google Drive: list, upload and download files. Includes sub-nodes for different operations.
Requirements
Section titled “Requirements”- Google OAuth credential configured with Google Drive permissions (
drive.fileordrive)
Configuration
Section titled “Configuration”Available Sub-nodes
Section titled “Available Sub-nodes”1. List Drive Files
Section titled “1. List Drive Files”Lists files and folders from your Google Drive with optional filters.
| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Google OAuth account |
| pageSize | number | No | Number of files (1-100). Default: 10 |
| driveQuery | text | No | Drive search filter |
| folderId | text | No | Folder ID to list. Empty = root |
| outputKey | text | No | Output field. Default: files |
Filter examples (driveQuery):
name contains 'report'— files containing “report” in the namemimeType='application/pdf'— PDFs onlymodifiedTime > '2024-01-01'— modified after a datename contains 'invoice' and mimeType='application/pdf'— combine filters
2. Upload to Drive
Section titled “2. Upload to Drive”Uploads a file to Google Drive from the workflow data.
| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Google OAuth account |
| fileName | text | Yes | File name in Drive |
| mimeType | select | No | File type (PDF, image, text, etc.) |
| parentFolderId | text | No | Destination folder ID. Empty = root |
| fileContentKey | text | No | Field with the content. Default: fileContent |
Typical flow:
- A previous node generates or downloads content and saves it in
fileContent - This node uploads that content to Drive with the specified name
3. Download from Drive
Section titled “3. Download from Drive”Downloads the content of a Google Drive file by its ID.
| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Google OAuth account |
| fileId | text | No | Direct file ID (or variable {{fileId}}) |
| fileIdKey | text | No | Field in input data with the ID. Default: fileId |
| outputKey | text | No | Output field. Default: fileContent |
How to get the fileId:
- From the “List Drive Files” node: use
{{id}}from the result - From the Drive URL:
https://drive.google.com/file/d/THIS_IS_THE_ID/view
Output
Section titled “Output”List Drive Files
Section titled “List Drive Files”{ "files": [ { "id": "1aBcDeF...", "name": "Reporte Q1.pdf", "mimeType": "application/pdf", "size": "245000", "createdTime": "2024-01-15T10:30:00Z", "modifiedTime": "2024-02-01T08:00:00Z", "webViewLink": "https://drive.google.com/file/d/1aBcDeF.../view" } ]}Upload to Drive
Section titled “Upload to Drive”{ "uploadedFile": { "id": "1aBcDeF...", "name": "documento.pdf", "webViewLink": "https://drive.google.com/file/d/1aBcDeF.../view", "mimeType": "application/pdf", "size": "245000" }}Download from Drive
Section titled “Download from Drive”{ "fileContent": "<binary file content>"}Usage Example
Section titled “Usage Example”Typical workflow
Section titled “Typical workflow”[List Drive Files] -> [Iterator] -> [Download from Drive] -> [Send Email with attachment] | search PDFs | per file | download | sendCommon Errors
Section titled “Common Errors”| Error | Cause | Solution |
|---|---|---|
credentials_id is required | No Google account selected | Configure a Google OAuth credential |
fileContent is required | The content field is empty | Verify the previous node generates data in the specified field |
File not found | The fileId doesn’t exist or you don’t have access | Verify the ID and account permissions |
Related Nodes
Section titled “Related Nodes”- Google Calendar - Manage calendar events
- Google Sheets - Operate with spreadsheets