Google Drive
Let hires search Google Drive and read Docs, Sheets, Slides, Office and text files, without changing anything.
Explore 3 actions and their permissionsExact inputs, sign-in scopes, access limits and approval rules.
With Google Drive, a hire can:
- search files by the words in their name or content, optionally in one folder, including shared drives,
- list what's in a folder,
- read a file as text: a Google Doc or Slides deck as plain text, a Sheet as a table (its first sheet), Word, Excel, PowerPoint and OpenDocument files, and text files (the start of large ones).
Hires work with files the same way in Google Drive, OneDrive, Dropbox, Box, Nextcloud and S3. Hires can't change, move, share or delete anything in Drive. PDFs and images show their details only. Passwords and keys written inside files are hidden from hires. To add rows to a spreadsheet, connect Google Sheets too.
1. Make an app in Google Cloud
If you already made one for Gmail or Google Calendar, use the same app: turn on the Drive API, add the scope below, and use its client ID and secret here too.
- Open console.cloud.google.com, and create a project (or pick one).
- APIs & Services → Library: search for Google Drive API and click Enable.
- APIs & Services → OAuth consent screen: Internal with Google Workspace; with a personal account, External, add yourself as a test user, then Publish app (in testing, Google stops the access after 7 days).
- Add the scope
https://www.googleapis.com/auth/drive.readonly. - Credentials → Create credentials → OAuth client ID, type Web application. Under
Authorized redirect URIs, add the address Roster shows on the Google Drive connection. It
ends in
/api/integrations/google-drive/oauth/callback. - Copy the Client ID and Client secret.
2. Connect it in Roster
- Open Integrations → Tools → Add a tool, search for Google Drive and choose it.
- Paste the OAuth app client ID and OAuth app client secret and click Connect.
- Click Connect with Google Drive on the new connection, sign in and click Allow.
Hires see what that Google account can see.
3. Give hires access
On the hire's Tools tab, click Give access on Google Drive. Read only and Read and write give the same tools here, since nothing in Drive can be changed.
- Folders: IDs of the folders (or shared drives) the hire may look in. A folder's ID is the
part after
/folders/in its address. Files in its subfolders count. Leave it empty for everything the account can see.
If something goes wrong
- "Isn't connected yet": press Connect with Google Drive on the connection.
- A big Doc can't be read: Google gives files as text up to 10 MB.
- A file isn't found: the connected account can't see it. Share it with that account.
Tools and permissions reference
This reference is built from the same definitions Roster uses to connect Google Drive and give hires access. It updates with each release.
Authentication and requested permissions
The account or app you connect sets the outer limit. Each hire's access can narrow it further. Connecting a tool gives it to no hire until you give access on that hire's Tools tab.
OAuth 2.0
From the OAuth client (Web application) you created in Google Cloud for Roster.
Requested scopes:
https://www.googleapis.com/auth/drive.readonly
Connection fields
| Field | What to provide |
|---|---|
OAuth app client IDclientIdOptional | From the OAuth client (Web application) you created in Google Cloud for Roster. |
OAuth app client secretclientSecretOptional · sealed secret | Use the value for your account or connection. |
Per-hire limits
Read-only hires receive only actions that read. Read-and-write access also allows actions that change things, where the connection itself permits them. An empty resource allowlist usually means everything the connected account can reach; each field below explains its meaning.
| Field | What to provide |
|---|---|
FoldersfoldersOptional | IDs of folders (or shared drives) the hire may look in: the part after /folders/ in the folder's address. Files in their subfolders count. Leave empty for everything the account can see. |
Actions
3 actions: 3 only read and 0 change something. A read action may still need approval when your workspace or hire is set to ask. A locked approval requirement always applies.
3 of 3 actions. Open an action for its arguments and full input schema.
search_filesRead only
Find files in Google Drive by words in their name or content, optionally inside one folder.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
textRequired | string | words to look for |
folderOptional | string | a folder's ID, in [brackets] in list_folder and search_files |
limitOptional | integer | See input schema below.Default: 20 |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "words to look for"
},
"folder": {
"type": "string",
"minLength": 1,
"maxLength": 1024,
"description": "a folder's ID, in [brackets] in list_folder and search_files"
},
"limit": {
"default": 20,
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"required": [
"text"
]
}list_folderRead only
What's directly inside a Google Drive folder: files and subfolders, newest first where Google Drive sorts.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
folderOptional | string | a folder (ID); leave out for the top |
limitOptional | integer | See input schema below.Default: 50 |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"folder": {
"description": "a folder (ID); leave out for the top",
"type": "string",
"minLength": 1,
"maxLength": 1024
},
"limit": {
"default": 50,
"type": "integer",
"minimum": 1,
"maximum": 200
}
}
}read_fileRead only
Read a Google Drive file as text: text files (the start of large ones), Word, Excel, PowerPoint and OpenDocument files, and whatever Google Drive converts to text itself. Other files (PDFs, images) show their details only.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
fileRequired | string | the file's ID, in [brackets] in list_folder and search_files |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"file": {
"type": "string",
"minLength": 1,
"maxLength": 1024,
"description": "the file's ID, in [brackets] in list_folder and search_files"
}
},
"required": [
"file"
]
}Watches and incoming events
- No built-in watch is declared. Give a hire a scheduled responsibility if it should check this service regularly.
- No incoming webhook handler is declared for this integration.
Limits and troubleshooting
- Permission errors: check both the connected account's rights and the hire's resource and read/write limits.
- Expired or revoked access: reconnect or replace the key on the connection.
- Rate limits and unavailable services can interrupt work. The hire's timecard records the outcome.
- The action schema describes accepted inputs. It does not grant additional access or bypass approvals.