<!-- BusyBot node reference — https://busybot.net/tools/google-drive-trigger/ -->

> Node: Google Drive Trigger (`google_drive_trigger`) · Polling trigger · v1
> Category: Data & Storage · Credentials: Google Drive OAuth2 (`googleDriveOAuth2`)
> Updated: 2026-08-16

# Google Drive Trigger

> Triggers when files or folders change in Google Drive

## Overview

Polls Google Drive API on a schedule to detect new or modified files and folders. Supports watching a specific file for updates, or watching a specific folder for new/updated files and folders. Uses Google Drive v3 query language with time-based filters (createdTime, modifiedTime) for change detection. Can filter by file type (Google Docs, Sheets, Slides, Drawings, audio, photos, video). Returns full file metadata for each detected change.

**Category:** Data & Storage  
**Tool Name:** `google_drive_trigger`  
**Version:** 1

**Appearance:** Icon: `si-googledrive` | Color: `#4285f4`

## Node Type

**Trigger** — polling (checks for new data on a schedule)

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | None (trigger node) |
| Output | `Output` |

## Credentials

This tool requires **Google Drive OAuth2** credentials.
See the [Credentials Guide](https://busybot.net/credentials/google-drive-oauth2/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Authentication | `options` | No | `oAuth2` | Authentication method to use. |
| | | | | Options: `oAuth2` (recommended), `serviceAccount` |
| Google Account | `credential` | No | — | Connect or select your Google account. _(shown when Authentication is `oAuth2`)_ |
| Service Account Email | `string` | Yes | — | The email address of the Google service account. _(shown when Authentication is `serviceAccount`)_ |
| Private Key | `string` | Yes | — | The private key from the service account JSON key file. _(shown when Authentication is `serviceAccount`)_ |
| Trigger On | `options` | Yes | `specificFolder` | Whether to watch a specific file or a specific folder for changes. |
| | | | | Options: `specificFile` (Changes to a Specific File), `specificFolder` (Changes Involving a Specific Folder) |
| File ID | `string` | Yes | — | The ID or URL of the file to watch. You can paste a Google Drive file URL or the file ID directly. _(shown when Trigger On is `specificFile`)_ |
| Watch For (`event`) | `options` | Yes | `fileUpdated` | When to trigger this node. _(shown when Trigger On is `specificFile`)_ |
| | | | | Options: `fileUpdated` |
| Folder ID | `string` | Yes | — | The ID or URL of the folder to watch. You can paste a Google Drive folder URL or the folder ID directly. _(shown when Trigger On is `specificFolder`)_ |
| Watch For (`event`) | `options` | Yes | `fileCreated` | Which event to listen for in the watched folder. _(shown when Trigger On is `specificFolder`)_ |
| | | | | Options: `fileCreated` (a file is created in the watched folder), `fileUpdated` (a file is updated in the watched folder), `folderCreated` (a folder is created in the watched folder), `folderUpdated` (a folder is updated in the watched folder), `watchFolderUpdated` (the watched folder itself is modified) |
| Options | `collection` | No | `{}` | Extra filtering for folder monitoring. _(shown when Watch For is `fileCreated` or `fileUpdated`, and Trigger On is not `specificFile`)_ |
| — File Type | `options` | No | `all` | Triggers only when the file is this type. |
| | | | | Options: `all`, `application/vnd.google-apps.audio` (Audio), `application/vnd.google-apps.document` (Google Docs), `application/vnd.google-apps.drawing` (Google Drawings), `application/vnd.google-apps.presentation` (Google Slides), `application/vnd.google-apps.spreadsheet` (Google Spreadsheets), `application/vnd.google-apps.photo` (Photos and Images), `application/vnd.google-apps.video` (Videos) |
| Poll Interval | `number` | No | `1` | How often to check for new data. |
| Poll Interval Unit | `options` | No | `minutes` | Unit for the poll interval. |
| | | | | Options: `seconds`, `minutes`, `hours` |

## Output Data

Each changed file or folder becomes one output item. The Drive file resource is emitted as the API returns it, plus two trigger markers:

```json
{
  "kind": "drive#file",
  "id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
  "name": "Q3 forecast.xlsx",
  "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  "createdTime": "2026-08-15T08:58:00.000Z",
  "modifiedTime": "2026-08-15T08:58:00.000Z",
  "size": "20481",
  "parents": ["1AbCdEfGhIjKlMnOpQrStUvWxYz"],
  "webViewLink": "https://drive.google.com/file/d/1BxiMVs0.../view",
  "webContentLink": "https://drive.google.com/uc?id=1BxiMVs0...",
  "iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/...",
  "owners": [],
  "shared": false,
  "trashed": false,
  "_trigger": "google_drive_polling",
  "_timestamp": "2026-08-15T09:00:00.000Z"
}
```

- The item carries the full Drive file resource, so any field Drive exposes for that file is available.
- `mimeType` is `application/vnd.google-apps.folder` for folder events.
- Trashed items are never returned.
- `_trigger` — always `google_drive_polling`.
- `_timestamp` — when the poll that produced the item ran.

Reference file metadata downstream by expression, e.g. `{{ $json.name }}` or `{{ $json.webViewLink }}`.

## Usage Examples

- Trigger when a new file is created in a specific folder
- Trigger when a file is updated in Google Drive
- Trigger when a new folder is created inside a watched folder
- Watch for changes to a specific Google Drive file
- Trigger when new Google Docs are created in a folder

## Example Configuration

Watch one file for updates:

```json
{
  "type": "google_drive_trigger",
  "parameters": {
    "triggerOn": "specificFile",
    "fileToWatch": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
    "event": "fileUpdated",
    "pollInterval": 5,
    "pollIntervalUnit": "minutes"
  }
}
```

Watch a folder for new files of any type:

```json
{
  "type": "google_drive_trigger",
  "parameters": {
    "triggerOn": "specificFolder",
    "folderToWatch": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
    "event": "fileCreated",
    "options": {
      "fileType": "all"
    },
    "pollInterval": 2,
    "pollIntervalUnit": "minutes"
  }
}
```

Watch a folder (given as a URL) for updated Google Docs only:

```json
{
  "type": "google_drive_trigger",
  "parameters": {
    "triggerOn": "specificFolder",
    "folderToWatch": "https://drive.google.com/drive/folders/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
    "event": "fileUpdated",
    "options": {
      "fileType": "application/vnd.google-apps.document"
    },
    "pollInterval": 30,
    "pollIntervalUnit": "seconds"
  }
}
```

Watch a folder for new sub-folders:

```json
{
  "type": "google_drive_trigger",
  "parameters": {
    "triggerOn": "specificFolder",
    "folderToWatch": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
    "event": "folderCreated",
    "pollInterval": 1,
    "pollIntervalUnit": "hours"
  }
}
```

### Trigger Behavior

- **Activation:** Polling starts when the workflow is activated. There is no poll at the moment of activation — the first check runs one full interval later.
- **Schedule:** The trigger polls for new data based on the configured polling interval.
- **State:** Maintains internal state (the timestamp of the last check) so each poll returns only items created or modified since then.
- **First Run:** The first poll records the current time and returns no items, so activating the workflow never replays existing files.
- **Testing:** Running the node from the editor emits a single sample file so you can build the rest of the workflow; real changes arrive only while the workflow is activated.

## Tips

Polls Google Drive for file/folder changes. Configure a trigger scope (specific file or folder), the event to watch for (created or updated), and optionally filter by file type. Requires Google OAuth2 credentials.

### Parameter Relationships

1. **File vs folder monitoring:** the `triggerOn` parameter determines which set of parameters is available.
   - `triggerOn: "specificFile"` → shows `fileToWatch` and the file-specific `event` option
   - `triggerOn: "specificFolder"` → shows `folderToWatch` and the folder-specific `event` options

2. **Event-based options:** the `options` collection is only available for folder events.
   - Shown when `event` is `"fileCreated"` or `"fileUpdated"`
   - Hidden when `triggerOn` is `"specificFile"`

### Notes

- `*Created` events compare the item's creation time against the poll window; `*Updated` events compare its modification time, so a newly created file also satisfies a `fileUpdated` watch.
- `watchFolderUpdated` reports changes to the watched folder itself rather than to its contents.