The google-drive connector reads what a team keeps in Google Drive and how those files change: names, types, owners, sizes and times, and who saved each revision. It never opens or downloads a file.
| Connector name | google-drive |
| Products | Records, episodes |
| Credentials | The portal's Connect button, or a Google OAuth client and a refresh token |
| Scope | https://www.googleapis.com/auth/drive.metadata.readonly |
| Status | Preview: tested against Google's documented responses, not yet on a live account |
What it pulls
| Object | Contents |
|---|---|
file |
Name, type, extension, size, folder, shared drive, created, modified and last viewed times, version, owners, last modifier, sharing and trash flags |
revision |
File, revision time, the person who saved it, size, type |
shared_drive |
Name, created time, restrictions |
Choose a subset with objects (file, revision, shared_drive).
Episodes. One per file changed in the window: each saved revision in order, with who saved it. Drive keeps fewer revisions for old Google Docs, so early history can be thin.
Credentials
Create an OAuth client in Google Cloud Console with the drive.metadata.readonly scope, authorize it once for the account to read, and give the SDK clientId, clientSecret and refreshToken.
Or skip the tokens: click Connect next to Google Drive in the portal (Settings → Connected systems), then run datayield connect google-drive --broker.
Connect
datayield connect google-drive -o clientId=<client id> -o clientSecret=env:GOOGLE_CLIENT_SECRET -o refreshToken=env:GOOGLE_REFRESH_TOKENOptions
| Option | Required | Meaning |
|---|---|---|
clientId, clientSecret, refreshToken |
yes, or accessToken |
The OAuth client and a refresh token. The secret and the token are stored as secrets. |
accessToken |
instead of the above | A current access token, for a one-off run. It expires within an hour. |
corpora |
no | allDrives (default), user or domain |
includeTrashed |
no | Also send files in the trash. Default false. |
startDate |
no | Where the first run starts. Default: everything. |
objects |
no | Record types to pull |
New records on each run
Drive returns only files modified between the last successful run and now. Revisions are read for those files only, one request per file, and kept when they were saved inside the window.