On Google Drive file change

Check Google Drive on a timer and start a run for each new or changed file.

v1.0.1Source

Install

Find, upload, download, copy, move, delete, and share files and folders in Google Drive. Start a workflow when a file is new or changed. Connect with Google sign-in or a service account.

Google Drive@zerodot/google-driveInstall
  1. Open System, then Nodes.
  2. Find Google Drive and click Install.
  3. Use the new nodes at once. You do not restart.

How it works

On Google Drive file change (trigger.google_drive) is a trigger node in the Google Drive package (@zerodot/google-drive): Check Google Drive on a timer and start a run for each new or changed file.

The trigger checks Drive on a timer (every 60 seconds by default) and starts one run for each file. The input of the run is the file.

  • File Created: a new file or folder.
  • File Created or Changed: a new file, or a file with a new modifiedTime.

Set a Folder to watch only the direct children of that folder. Sub-folders are not watched. Type keeps only files or only folders. The files that exist when the trigger starts do not start runs. Trashed files are skipped.

Logins it can use

  • Google Drive OAuth2 (google_drive.oauth2): clientId and clientSecret of a Google Cloud OAuth client. Scope https://www.googleapis.com/auth/drive. zerodot refreshes the token. The client secret and the tokens are secret.
  • Google Drive service account (google_drive.service_account): the JSON key file of a service account, as text. Share each file or folder with the email of the service account. The key is secret. A service account has no storage space of its own, so upload into a folder that is shared with it, or into a shared drive.

Turn on the Google Drive API in the Google Cloud project.

Guides and related hubs