Skip to main content

Google Drive Trigger

Starts workflow execution when files are added or modified in a Google Drive folder.

Overview​

The Google Drive Trigger monitors a Drive folder and runs your workflow when:

  • New files are added
  • Existing files are modified

Use it to automatically process incoming documents, spreadsheets, or images.

Parameters​

ParameterDescriptionRequired
CredentialGoogle account to use for monitoringYes
Folder URLGoogle Drive folder to watchYes
Query StringOptional filter for file types/namesNo
Poll IntervalHow often to check for changes (minutes)Yes
LimitMaximum files to process per trigger (1-100)Yes

Query String​

Filter which files trigger the workflow using Google Drive query syntax:

ExampleDescription
name contains 'invoice'Files with "invoice" in the name
mimeType = 'application/pdf'PDF files only
mimeType = 'application/vnd.google-apps.spreadsheet'Google Sheets only
modifiedTime > '2024-01-01'Files modified after a date

Combine with and:

name contains 'report' and mimeType = 'application/pdf'

Poll Interval​

The minimum poll interval is 1 minute. The trigger checks for new or modified files at this frequency. Default is 5 minutes.

Limit​

Controls how many files are processed per trigger execution. Default is 5, maximum is 100.

Output​

For each new/modified file, the trigger outputs an item with file data:

{
"file": {
"type": "fileData",
"name": "Invoice-001.pdf",
"mimeType": "application/pdf",
"size": "125000",
"modifiedTime": "2024-01-15T10:30:00.000Z",
"fileInfo": {
"type": "googleDrive",
"credentialId": "...",
"fileUrl": "https://drive.google.com/file/d/..."
}
}
}

Access file properties in expressions:

  • File object: {{$item.file}}
  • File name: {{$item.file.name}}
  • MIME type: {{$item.file.mimeType}}
  • File size: {{$item.file.size}}
  • Modified time: {{$item.file.modifiedTime}}
  • Drive URL: {{$item.file.fileInfo.fileUrl}}

Reference from a downstream node:

  • File object: {{$("Google Drive Trigger").item.file}}
  • File name: {{$("Google Drive Trigger").item.file.name}}

Settings​

SettingDescription
Starting pointDate to start monitoring from
Retry failed itemsRe-process items that failed
No retry after nodeStop retrying after specific node

Examples​

Process New PDFs​

Monitor for PDF uploads:

  • Folder URL: Your intake folder
  • Query String: mimeType = 'application/pdf'
  • Poll Interval: 5 minutes
  • Limit: 10

Watch for Spreadsheet Updates​

Track changes to Excel files:

  • Folder URL: Your reports folder
  • Query String: mimeType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  • Poll Interval: 10 minutes

Filter by Name Pattern​

Only process files with specific naming:

  • Query String: name contains 'Q1' and name contains '2024'

Authentication​

This node requires a connected Google account with access to the monitored folder. Configure credentials in your workspace settings.

Tips​

  • Files are tracked by ID—renaming a file won't re-trigger the workflow
  • Modified files will trigger again, even if already processed
  • Use specific queries to avoid processing unwanted files
  • The trigger processes files in the order Drive returns them
  • Adjust poll interval based on how quickly you need to process new files
  • Use the Limit parameter to control batch sizes