File Changed
trigger.google_drive_change
TriggerAI & modelsconnection requiredruns in-engine
Polls Drive changes.list from a stored pageToken; one run per matching change, filtered client-side by folder, mime type and change type.
Start a run when a file is created, modified, trashed or removed in Google Drive (polled).
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Google Drive
- Secret shape
- {"client_id", "client_secret", "refresh_token"}
- Config it needs
- token_uri
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
folder_id Only changes to files in this folder. Blank watches the whole drive. | string | No | — | — | 0ABcDeFgHiJkLmNoPQ |
include_subfolders Also match files nested below folder_id. Costs one extra Drive call per unseen ancestor folder. | boolean | No | false | — | — |
mime_type Only these mime types, comma-separated (e.g. application/pdf, image/*). Blank matches everything; folders are application/vnd.google-apps.folder. | string | No | — | — | application/pdf |
change_types Which changes fire a run. Blank means all four. | array | No | — | array of string | — |
drive_id Watch exactly one Shared Drive (its id, from the Drive URL). Blank watches My Drive and every shared drive this connection can see. | string | No | — | — | — |
poll_interval_sec How often to check (30-86400 seconds). | number | No | 60 | 30–86400 | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"folder_id": "0ABcDeFgHiJkLmNoPQ",
"include_subfolders": false,
"mime_type": "application/pdf",
"poll_interval_sec": 60
}Output
One shape.
change
| Field | Type | Example |
|---|---|---|
change_type created, modified, trashed or removed. | string | modified |
file_id The Drive file id the change is about. | string | — |
removed True when the file is gone from view — deleted for good, or no longer shared with this connection. `file` then carries only the id. | boolean | — |
drive_id Shared Drive id; empty for My Drive. | string | — |
change_time RFC 3339 timestamp Drive recorded for the change. | string | — |
file The file as Drive describes it now. | object | — |
file.id The Drive file id. | string | — |
file.name File name as shown in Drive. | string | — |
file.mime_type Drive mime type; folders are application/vnd.google-apps.folder. | string | — |
file.size Bytes, when known (Google-native docs report none). | number | — |
file.modified_time RFC 3339 timestamp of the last content change. | string | — |
file.web_view_link Open-in-Drive URL. | string | — |
file.created_time RFC 3339 timestamp of creation. | string | — |
file.trashed True when the file is in the bin — files.get returns it either way. | boolean | — |
file.parents Ids of the folders holding this file. | array | — |
file.icon_link Small icon URL for the file type. | string | — |
file.web_content_link Direct download URL (binary files only). | string | — |
file.description The file's description, when it has one. | string | — |
file.shared True when the file is shared beyond its owner. | boolean | — |
file.starred True when the user starred the file. | boolean | — |
file.drive_id Shared Drive id, present only for shared-drive items. | string | — |
file.md5_checksum MD5 of the content; use it to tell a changed file from a touched one. | string | — |
file.file_extension Extension of the uploaded content, when any. | string | — |
file.owners Owners as {display_name, email_address}. | array | — |
file.last_modifying_user Who last changed it, as {display_name, email_address}. | object | — |
file.shortcut_details For a shortcut: {target_id, target_mime_type}. | object | — |
{
"change_time": "",
"change_type": "modified",
"drive_id": "",
"file": {
"created_time": "",
"description": "",
"drive_id": "",
"file_extension": "",
"icon_link": "",
"id": "",
"last_modifying_user": {},
"md5_checksum": "",
"mime_type": "",
"modified_time": "",
"name": "",
"owners": [],
"parents": [],
"shared": false,
"shortcut_details": {},
"size": 0,
"starred": false,
"trashed": false,
"web_content_link": "",
"web_view_link": ""
},
"file_id": "",
"removed": false
}Notes
- Files already in the drive are never replayed: the first poll only stores Drive's start page token.
- Runs are idempotent per (file id, change type, modified time) — a re-read window cannot start a second run, and trashing a file you had just edited still fires.
- Drive reports every change in the drive; folder and mime filtering happen here, so a busy drive spends part of each poll's budget on changes you filtered out.
- At most 500 changes are read per poll; the rest are drained by the following polls from the same cursor.
- Blank drive_id watches My Drive and every shared drive this connection can see; name a drive_id to watch exactly one.
- A removed file (deleted for good, or unshared) arrives with no metadata at all: `file` carries only the id, so a folder or mime filter cannot match it and the change is dropped. Watch removals with those filters blank.
Related Google Gemini nodes
See File Changed run in a workflow.
In a technical demo we add the Google Gemini connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.