Connect Google Drive to Toolspoke
Find, read and organise files, create folders and documents, and manage who can see them. Toolspoke gives your agents 16 of its actions, and you decide which ones each project allows.
- Connection
- Provider REST API
- Authentication
- Sign in with Google
- Actions exposed
- 16
- What a call bills
- Nothing
- Adapter
- Maintained by Toolspoke
- Category
- Productivity
Connected in three steps
Install Google Drive
Open the marketplace in your workspace, add Google Drive to the project your agents work in, and it appears on the gateway immediately.
Connect the credential
Sign in to Google Drive. Toolspoke holds the token encrypted and refreshes it when it expires.
Give it to an agent
Describe the job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. It can use every Google Drive action the project leaves on.
Where the agent answers
Slack
Ask it in a channel or a thread, and it replies in the thread it was asked in.
Email
Email it. Each write waits for a person's go-ahead unless that action is allowed in advance.
GitHub
Mention it on a pull request, and it answers there.
Schedule
A routine wakes it on a schedule, or when a new item matches.
Any agent in the project can use Google Drive, and only the actions the project leaves on.
What Google Drive asks for
Press connect and sign in to Google Drive. Toolspoke keeps the token encrypted and refreshes it when it expires, so there is nothing to copy and nothing to rotate by hand.
The scopes it asks for
- https://www.googleapis.com/auth/drive
What an agent can do in Google Drive
16 actions, each one declared by name in the connector. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.
7 read, 5 write, 4 destructive
Reads
7Fetches data and changes nothing.
get_accountRead the signed-in Drive account: who it is, how much storage is used against the limit, and the largest upload it accepts. It touches no file and no file's contents, which makes it the cheapest proof that the connection works.
list_filesSearch this connection's files and folders. `q` is Drive's own query language, "name contains 'invoice'", "fullText contains 'renewal'", "mimeType = 'application/vnd.google-apps.folder'", "'FOLDER_ID' in parents", combined with `and`. It defaults to "trashed = false", because Drive otherwise includes trashed files in every result. Remember what this connection can see: only files it created itself, or that somebody explicitly gave it, so an empty result means this connection has not been given anything matching, not that the Drive is empty.
get_fileRead one file's or folder's metadata by id, name, type, size, parent folder, when it changed, and the link to open it. Drive returns almost nothing unless `fields` asks, so this asks for a useful set by default. Use "root" as the id for the My Drive root folder.
export_fileRead the contents of a Google Doc, Sheet or Slides file as text. A Google-native file has no bytes to download, so this converts it: use "text/plain" or "text/markdown" for a Doc, "text/csv" for one sheet of a Sheet, "text/plain" for Slides. This is the operation for reading a document's words. Google caps an export at 10 MB.
download_fileDownload an uploaded file's own bytes. Only useful for text, a .txt, .md, .csv, .json or source file comes back readable, while a PDF, image, or Office document comes back as bytes nothing can use. For a Google Doc, Sheet or Slides file use export_file instead; this endpoint refuses them, because a Google-native file has no bytes of its own.
list_permissionsList who can reach one file or folder and in what role, reader, commenter, writer, fileOrganizer, organizer, or owner. Call this before share_file to see what access already exists, and after it to confirm what changed.
list_shared_drivesList the shared drives this account can reach. A shared drive is owned by a team rather than a person; its id goes to list_files as driveId to look inside one.
Writes
5Creates or updates something on the other side.
create_folderCreate an empty folder. Give `parent_id` to put it inside another folder; leave it out and the folder lands in the root of My Drive. A folder in Drive is a file whose type is application/vnd.google-apps.folder, which this sets for you.
create_fileCreate an empty file. Pass a Google type to get a native document ready to be written in, application/vnd.google-apps.document for a Doc, .spreadsheet for a Sheet, .presentation for Slides. This creates the file and its name only: uploading contents needs Drive's multipart or resumable upload, which this connector does not carry, so a file created here starts empty.
copy_fileCopy a file, optionally under a new name and into a different folder. The copy is a new file with its own id; the original is untouched. Folders cannot be copied this way. Drive copies files only.
update_fileRename a file or folder, change its description, star it, or move it. A move is `add_parent` plus `remove_parent` together. Drive allows one parent, so the old one has to be named to be let go of. Only what is passed changes. This cannot trash a file or alter who can see it: those are trash_file and share_file.
unshare_fileRemove one person's, domain's, or link's access to a file. Only ever takes access away, which is why it is a write rather than sitting with share_file. Get the permission id from list_permissions; removing the owner's permission is not possible.
Destructive
4Deletes or permanently alters something. Worth granting on purpose.
share_fileGive somebody access to a file or folder. Classified destructive because it hands out a document rather than editing one, and there is no undoing what has already been read. `type` "user" or "group" needs `email_address`; "domain" needs `domain`; "anyone" makes the file reachable by link to anybody who has it. Google emails users and groups by default, pass send_notification_email false to stay quiet, which it does not permit for domain or anyone. Transferring ownership needs role "owner" and transfer_ownership true, and cannot be done silently.
trash_fileMove a file or folder to the trash. Recoverable for 30 days from the Drive interface, after which Google removes it for good, and everything inside a trashed folder goes with it. This is the safer of the two ways to remove something; delete_file is the one with no way back.
delete_fileDelete a file or folder outright. This skips the trash: there is no recovery, and deleting a folder deletes everything inside it. Prefer trash_file unless permanence is the point.
empty_trashPermanently delete every file currently in the trash. This is not a per-file delete and it cannot be undone, everything the account has thrown away goes at once. Prefer trash_file, which is recoverable, unless somebody has asked for the trash to be emptied.
What it will not do
The gateway enforces each of these, so they can be stated flatly.
- It cannot call anything else
- The 16 actions above are the whole of it. A call to any other name is refused before it reaches Google Drive rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
- It reaches no further than your credential
- Toolspoke holds no access to Google Drive of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
- It never hears from Google Drive
- Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Google Drive. An agent has to ask.
- It does not smooth over provider limits
- Toolspoke does not retry, queue or back off around Google Drive's own rate limits. A call that Google Drive refuses comes back to the agent as a failed call.
Before you connect it
What can an agent do in Google Drive?
16 named actions: 7 that only read, 5 that write and 4 that delete or permanently alter something. They include get_account, list_files and get_file. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.
What credentials does the Google Drive connector need?
Nothing to paste. You sign in to Google Drive over OAuth 2.0 and Toolspoke keeps the resulting token encrypted, refreshing it when it expires. It asks for https://www.googleapis.com/auth/drive, and can do nothing outside them.
How does an agent get to use Google Drive?
Install Google Drive in a project and every agent in that project can use the actions the project leaves on. Describe a job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. The agent answers when someone asks it in Slack, emails it or mentions it on a GitHub pull request, or when its routine wakes it.
What does the Google Drive connector not do?
The 16 actions above are the whole of it. A call to any other name is refused before it reaches Google Drive rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. Toolspoke holds no access to Google Drive of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Google Drive. An agent has to ask. Toolspoke does not retry, queue or back off around Google Drive's own rate limits. A call that Google Drive refuses comes back to the agent as a failed call.
Can I limit which actions an agent can call?
Yes, in two places. The project switches Google Drive's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.
What gets recorded when an agent calls Google Drive?
Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and what the call cost in sandbox time and model tokens. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.
More productivity connectors
Browse all of themConnect Google Drive to Toolspoke
Add Google Drive to a project and give it to an agent.