Skip to content

Google Drive

Module for managing files in Google Drive: list, upload and download files. Includes sub-nodes for different operations.

  • Google OAuth credential configured with Google Drive permissions (drive.file or drive)

Lists files and folders from your Google Drive with optional filters.

FieldTypeRequiredDescription
credentials_idcredentialsYesGoogle OAuth account
pageSizenumberNoNumber of files (1-100). Default: 10
driveQuerytextNoDrive search filter
folderIdtextNoFolder ID to list. Empty = root
outputKeytextNoOutput field. Default: files

Filter examples (driveQuery):

  • name contains 'report' — files containing “report” in the name
  • mimeType='application/pdf' — PDFs only
  • modifiedTime > '2024-01-01' — modified after a date
  • name contains 'invoice' and mimeType='application/pdf' — combine filters

Uploads a file to Google Drive from the workflow data.

FieldTypeRequiredDescription
credentials_idcredentialsYesGoogle OAuth account
fileNametextYesFile name in Drive
mimeTypeselectNoFile type (PDF, image, text, etc.)
parentFolderIdtextNoDestination folder ID. Empty = root
fileContentKeytextNoField with the content. Default: fileContent

Typical flow:

  1. A previous node generates or downloads content and saves it in fileContent
  2. This node uploads that content to Drive with the specified name

Downloads the content of a Google Drive file by its ID.

FieldTypeRequiredDescription
credentials_idcredentialsYesGoogle OAuth account
fileIdtextNoDirect file ID (or variable {{fileId}})
fileIdKeytextNoField in input data with the ID. Default: fileId
outputKeytextNoOutput 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
{
"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"
}
]
}
{
"uploadedFile": {
"id": "1aBcDeF...",
"name": "documento.pdf",
"webViewLink": "https://drive.google.com/file/d/1aBcDeF.../view",
"mimeType": "application/pdf",
"size": "245000"
}
}
{
"fileContent": "<binary file content>"
}
[List Drive Files] -> [Iterator] -> [Download from Drive] -> [Send Email with attachment]
| search PDFs | per file | download | send
ErrorCauseSolution
credentials_id is requiredNo Google account selectedConfigure a Google OAuth credential
fileContent is requiredThe content field is emptyVerify the previous node generates data in the specified field
File not foundThe fileId doesn’t exist or you don’t have accessVerify the ID and account permissions