Gmail integration | Zervanor
← All connectors

Gmail

Also an agent tool
communication

Email management and real-time notifications via Google Pub/Sub

44 actions · 4 triggers

The Gmail integration lets you connect Gmail to your automations with 44 actions and 4 triggers — and every action is also a tool an AI agent can call. Examples: Get Profile, Watch Mailbox, Stop Watch, Create Draft, Delete Draft. No blank-canvas wiring — connect it and use it in your workflows.

Every action below is also a tool an AI agent can call — the same pack powers your workflows and your agents.

Triggers 4

Events in Gmail that can start a workflow.

webhook

Pub/Sub Push

Inbound Pub/Sub push notification

polling

Mailbox Change

Persist the max observed historyId as the cursor; pass it as startHistoryId on the next poll. A 404 means the cursor is too old — full re-sync via list_messages and reset from getProfile.historyId.

polling

New Gmail Message

Use the 'q' parameter with 'after:TIMESTAMP' for time-based filtering. nextPageToken enables cursor-based pagination.

polling

New Gmail Thread

Use the 'q' parameter with 'after:TIMESTAMP' for time-based filtering. nextPageToken enables cursor-based pagination.

Actions 44

What Zervanor can do in Gmail.

GET

Get Profile

Return the authenticated user's profile (Gmail API: users.getProfile). Returns emailAddress, messagesTotal, threadsTotal, historyId.

POST

Watch Mailbox

Subscribe the mailbox to Pub/Sub push notifications (Gmail API: users.watch).

POST

Stop Watch

Cancel any active Pub/Sub push subscription on the mailbox (Gmail API: users.stop).

POST

Create Draft

Create a draft from a RFC 2822 / MIME body (Gmail API: users.drafts.create).

DELETE

Delete Draft

Permanently delete a draft (Gmail API: users.drafts.delete).

GET

Get Draft

Retrieve a draft with format projection (Gmail API: users.drafts.get).

GET

List Drafts

List drafts (Gmail API: users.drafts.list). Supports q, maxResults, pageToken, includeSpamTrash.

POST

Send Draft

Send an existing draft (Gmail API: users.drafts.send). Becomes a messages resource.

PUT

Update Draft

Replace a draft's content (Gmail API: users.drafts.update).

GET

List History

List changes since startHistoryId (Gmail API: users.history.list). Primary reconciliation engine after a Pub/Sub push.

POST

Create Label

Create a user label (Gmail API: users.labels.create).

DELETE

Delete Label

Permanently delete a label (Gmail API: users.labels.delete).

GET

Get Label

Retrieve label metadata and counts (Gmail API: users.labels.get).

GET

List Labels

List all labels, system and user (Gmail API: users.labels.list).

PATCH

Patch Label

Partial update of a label: name, visibility, color (Gmail API: users.labels.patch).

PUT

Update Label

Full replace of a label resource (Gmail API: users.labels.update).

POST

Batch Delete Messages

Permanently delete up to 1,000 messages by id list (Gmail API: users.messages.batchDelete).

POST

Batch Modify Messages

Add / remove labels on up to 1,000 messages atomically (Gmail API: users.messages.batchModify).

DELETE

Delete Message

Permanently delete one message (Gmail API: users.messages.delete).

GET

Get Message

Retrieve one message (Gmail API: users.messages.get). format=minimal|full|raw|metadata; metadataHeaders[] for the metadata projection.

GET

List Messages

List messages (Gmail API: users.messages.list). Supports q, labelIds[], maxResults, pageToken, includeSpamTrash.

POST

Modify Message

Add / remove labels on one message (Gmail API: users.messages.modify).

POST

Send Message

Send a MIME message (Gmail API: users.messages.send). Body should match Gmail API (e.g., {raw: base64url}); supports threadId for in-thread replies.

POST

Compose & Send Email

Send an email by providing human-readable fields (to, subject, body). The engine automatically constructs the RFC 5322 MIME message and base64URL-encodes it for the Gmail API. For advanced use (attachments, custom MIME), use send_message directly.

POST

Trash Message

Move message to TRASH (Gmail API: users.messages.trash).

POST

Untrash Message

Restore a message from TRASH (Gmail API: users.messages.untrash).

GET

Get Attachment

Retrieve attachment payload, Base64URL-encoded data field (Gmail API: users.messages.attachments.get).

DELETE

Delete Thread

Permanently delete a thread (Gmail API: users.threads.delete).

GET

Get Thread

Retrieve a thread with format projection (Gmail API: users.threads.get).

GET

List Threads

List threads (Gmail API: users.threads.list). Supports q, labelIds[], maxResults, pageToken, includeSpamTrash.

POST

Modify Thread

Add / remove labels at thread granularity (Gmail API: users.threads.modify).

POST

Trash Thread

Move thread to TRASH (Gmail API: users.threads.trash).

POST

Untrash Thread

Restore a thread from TRASH (Gmail API: users.threads.untrash).

GET

Get Auto-Forwarding

Read auto-forward config (Gmail API: users.settings.getAutoForwarding).

GET

Get IMAP Settings

Read IMAP access settings (Gmail API: users.settings.getImap).

GET

Get Language Settings

Read display language (Gmail API: users.settings.getLanguage).

GET

Get POP Settings

Read POP access settings (Gmail API: users.settings.getPop).

GET

Get Vacation Settings

Read vacation auto-reply config (Gmail API: users.settings.getVacation).

GET

List Send-As Aliases

List send-as aliases (Gmail API: users.settings.sendAs.list). Read-only; mutation deferred.

GET

Get Send-As Alias

Retrieve one send-as alias (Gmail API: users.settings.sendAs.get). Read-only; mutation deferred.

GET

List Filters

List filters (Gmail API: users.settings.filters.list). Read-only; mutation deferred.

GET

Get Filter

Retrieve one filter (Gmail API: users.settings.filters.get). Read-only; mutation deferred.

GET

List Forwarding Addresses

List forwarding addresses (Gmail API: users.settings.forwardingAddresses.list). Read-only; mutation deferred.

GET

Get Forwarding Address

Retrieve one forwarding address (Gmail API: users.settings.forwardingAddresses.get). Read-only; mutation deferred.

Automations using Gmail

Build your own automation with Gmail in the visual builder.

Automations with Gmail

Frequently asked questions

What can I automate with Gmail?

44 actions are available — for example: Get Profile, Watch Mailbox, Stop Watch, Create Draft, Delete Draft, and more.

Which Gmail events can start a workflow?

4 triggers — for example: Pub/Sub Push, Mailbox Change, New Gmail Message, New Gmail Thread.

Can Gmail be used as an AI agent tool?

Yes. Every Gmail action automatically becomes a tool an AI agent can call — the same pack powers both your workflows and your agents.

How is the Gmail integration modelled?

Gmail is modelled as a versioned connector pack, and the steps that need reasoning fall to first-party agents hosted in the same runtime as the workflows.