Automate Gmail + Google Drive
The inbox most operations still start in. Where the documents live — and pile up. Put an agent between them and the hand-off stops being manual: it reads, decides, acts, and shows its work.
Accounts Payable already works across Gmail and Google Drive — free, and it runs on your machine.
Automations teams run
Each of these runs with a reasoning step between the two tools, so what reaches Google Drive is a decision about the Gmail event rather than a transcription of it.
When a new email arrives in Gmail…
…an agent can read and summarise documents in Google Drive — after reading the context and deciding it should.
When a label is applied in Gmail…
…an agent can file outputs into folders in Google Drive — after reading the context and deciding it should.
When a thread goes unanswered in Gmail…
…an agent can export and convert formats in Google Drive — after reading the context and deciding it should.
When a file lands in a folder in Google Drive…
…an agent can send or draft a reply in Gmail — with the reasoning recorded in the run’s receipt.
When a doc is updated in Google Drive…
…an agent can apply labels and archive in Gmail — with the reasoning recorded in the run’s receipt.
When a file is shared in Google Drive…
…an agent can extract attachments and fields in Gmail — with the reasoning recorded in the run’s receipt.
The Gmail and Google Drive hand-off, setup template
Start with the gmail-api node and the google-drive-api node. Configure the Gmail source payload, the agent input, and the Google Drive operation. The sequential template does not implement conditional writes or approval by itself.
This is a schema-checked starting point, not an end-to-end tested automation. Replace every CONFIGURE_ value, choose the operations you intend, connect credentials and map source outputs into later inputs. An edge orders steps; it does not supply a condition, an approval gate or a field mapping. Add and test those controls explicitly before any write. Cloud APIs and model providers may receive data. Keep the workflow inactive until tested with fixtures.
{
"id": "3237b6c0-a5a7-4c43-a560-4bd9b2325bfe",
"name": "Gmail → Google Drive",
"nodes": [
{
"id": "116a878f-747e-45e4-abfc-153d24445f58",
"text": "Run on a schedule",
"x": 512,
"y": 144,
"isEditing": false,
"type": "trigger-timer",
"icon": "connect",
"category": "trigger",
"isSelected": false,
"parameters": {
"fireOnStart": "No",
"scheduleType": "Interval",
"schedule": "Every 15 Minutes"
},
"description": "Setup template for Timer Trigger. This trigger node fires the workflow at specified intervals or at a specific time. Configure credentials, inputs and output mapping before use.",
"error": null,
"isActive": false,
"output": null,
"outputs": {}
},
{
"id": "81f4fef4-778b-4cef-a81d-9751f022a7ca",
"text": "Read Gmail",
"x": 512,
"y": 336,
"isEditing": false,
"type": "gmail-api",
"icon": "connect",
"category": "action",
"isSelected": false,
"parameters": {
"operation": "Search and Read Emails",
"searchQuery": "CONFIGURE_SEARCHQUERY",
"maxResults": 1
},
"description": "Setup template for Gmail API. A powerful tool to send, reply, read, organize, and manage attachments in Gmail. Configure credentials, inputs and output mapping before use.",
"error": null,
"isActive": false,
"output": null,
"outputs": {}
},
{
"id": "49a8ee39-3955-4bd4-adb6-94c72da9ef20",
"text": "Review source and draft",
"x": 512,
"y": 528,
"isEditing": false,
"type": "agnt-agent",
"icon": "connect",
"category": "action",
"isSelected": false,
"parameters": {
"agentId": "CONFIGURE_AGENTID",
"message": "Read the Gmail item. Decide whether it warrants action in Google Drive, and explain why.\nSource input: CONFIGURE_SOURCE_INPUT. Produce a reviewable draft only; do not take external actions."
},
"description": "Setup template for Agent Chat. Chat with an AI agent from your agent library. Select an agent and send messages to interact with it within your workflow. Configure credentials, inputs and output mapping before use.",
"error": null,
"isActive": false,
"output": null,
"outputs": {}
},
{
"id": "ab64b6b4-5a4e-4f4a-a97a-020aa614f158",
"text": "Configure destination in Google Drive",
"x": 512,
"y": 720,
"isEditing": false,
"type": "google-drive-api",
"icon": "connect",
"category": "action",
"isSelected": false,
"parameters": {
"action": "LIST_FILES",
"folderId": "CONFIGURE_FOLDERID"
},
"description": "Setup template for Google Drive API. Interact with Google Drive to perform various operations on files and folders. Configure credentials, inputs and output mapping before use.",
"error": null,
"isActive": false,
"output": null,
"outputs": {}
}
],
"edges": [
{
"id": "ea0e2c2e-f9f5-4777-ada3-cdadd43e6c1a",
"start": {
"id": "116a878f-747e-45e4-abfc-153d24445f58",
"type": "output"
},
"end": {
"id": "81f4fef4-778b-4cef-a81d-9751f022a7ca",
"type": "input"
},
"startX": 800,
"startY": 168,
"endX": 512,
"endY": 360
},
{
"id": "78d6fc6b-7d2f-444f-ad1f-7f00d862cd06",
"start": {
"id": "81f4fef4-778b-4cef-a81d-9751f022a7ca",
"type": "output"
},
"end": {
"id": "49a8ee39-3955-4bd4-adb6-94c72da9ef20",
"type": "input"
},
"startX": 800,
"startY": 360,
"endX": 512,
"endY": 552
},
{
"id": "001248f4-cdd8-4e31-adbd-25dfec99e5b2",
"start": {
"id": "49a8ee39-3955-4bd4-adb6-94c72da9ef20",
"type": "output"
},
"end": {
"id": "ab64b6b4-5a4e-4f4a-a97a-020aa614f158",
"type": "input"
},
"startX": 800,
"startY": 552,
"endX": 512,
"endY": 744
}
],
"zoomLevel": 1,
"canvasOffsetX": 0,
"canvasOffsetY": 0,
"isTinyNodeMode": false
}
Configure Gmail API
A powerful tool to send, reply, read, organize, and manage attachments in Gmail.
- operation — The Gmail operation to perform. Current example:
Search and Read Emails. - searchQuery — Optional. Gmail search query (e.g., 'from:user is:unread'). If blank, fetches latest emails. Current example:
CONFIGURE_SEARCHQUERY. - maxResults — Maximum number of emails to return. Current example:
1.
Configure Google Drive API
Interact with Google Drive to perform various operations on files and folders.
- action — The action to perform on Google Drive Current example:
LIST_FILES. - folderId — The ID of the folder (for LIST_FILES, UPLOAD_FILE, CREATE_FOLDER) Current example:
CONFIGURE_FOLDERID.
Install Accounts Payable
Accounts Payable already uses both Gmail and Google Drive, so installing it gives you this exact hand-off wired up — connected, editable, and running on your own machine.
Runs on your own machine · See what it does
Build it in AGNT
- Download AGNT Community Core — free and local-first.
- Connect Gmail with one OAuth sign-in and Google Drive with one OAuth sign-in; both land in the local vault.
- Start from a marketplace workflow, or drop gmail-api and google-drive-api onto the canvas with an agent between them.
- Put an approval gate on anything consequential, then run it — the receipt shows what was read in Gmail and what was written to Google Drive.
Gmail and Google Drive — common questions
Can I connect Gmail to Google Drive without writing code?
No code is required. Add both connections in the vault (Gmail uses one OAuth sign-in, Google Drive uses one OAuth sign-in), then either install a marketplace workflow for this pair or drag the two nodes onto the canvas and put an agent between them.
How is this different from a field-mapping Gmail to Google Drive automation?
Mapping tools move data; this reasons about it. Rather than copying a field into Google Drive, the agent can weigh what arrived from Gmail, classify it against criteria you wrote in prose, draft something new, and act only when it is warranted.
Does my Gmail and Google Drive data leave my machine?
Not to us. AGNT runs locally and both sets of credentials are encrypted on your own disk. Outbound traffic goes only to Gmail, Google Drive and whichever model you chose — and pointing that at Ollama or LM Studio keeps everything on your hardware.
What does a Gmail and Google Drive run leave behind?
Every run is recorded end to end — the Gmail items examined, the decision and its reasoning, the resulting Google Drive write. That record is what makes it reasonable to let this run unattended, and what lets you widen its remit on evidence.