Gmail Action Block
The Gmail Action Block lets your workflow work inside your Gmail mailbox — send emails, read and search messages, reply in the same conversation, manage labels, create drafts, and forward mail.
Email Automation: Combine this block with the Gmail Trigger to build a full email agent — the trigger fires when a new email arrives, and this block reads, replies, labels, or forwards it.
Key Features
- 13 Actions: Send, read, search, reply, forward, drafts, labels, read/unread state, threads, and attachments
- Auto-Threading Replies: The Reply action keeps your response inside the original conversation
- Powerful Search: Filter by sender, recipient, subject, date range, and attachments — up to 500 results per call
- Save Any Value: Map parts of the response (Subject, From, Body, Message Id, and more) into workflow variables
- Variable Support: Every field accepts
{{variables}}from earlier blocks
Available Actions
| Action | What it does |
|---|---|
| Send Email | Send a new email (To, CC, BCC, subject, body, optional HTML) |
| Read Email | Fetch one message by its Message ID |
| Search Emails | Find messages using filters (see below) |
| Reply | Reply to a message — automatically threads into the original conversation |
| Move to Trash | Move a message to the Trash folder |
| Create Draft | Save an email as a draft without sending it |
| List Labels | Get all labels in the mailbox |
| Apply/Remove Labels | Add or remove label IDs on a message |
| Mark as Read | Remove the unread state from a message |
| Mark as Unread | Mark a message as unread |
| Get Thread | Fetch a full conversation by its Thread ID |
| Forward Email | Forward an existing message to new recipients |
| Send with Attachment | Send a new email with one or more attachment URLs |
Reply threads automatically: give the Reply action the Message ID of the email you are answering (for example from the Gmail Trigger or a Search result) and Gmail places your reply in the same conversation.
Search Filters
The Search Emails action supports these filters:
| Filter | Description |
|---|---|
| From | Only messages from this sender |
| To | Only messages sent to this address |
| Subject Contains | Text that must appear in the subject |
| After / Before date | Date range in YYYY/MM/DD format |
| Has Attachment | Only messages with attachments |
| Include Spam & Trash | Also search Spam and Trash folders |
| Max Results | 1 to 500 messages per call (default 100) |
| Page Token | Continue a previous search — feed the Next Page Token output back in |
Connecting your Google account
- Add the Gmail block to your workflow and open its settings.
- Click the connect button and choose Continue with Google.
- Sign in and approve the requested permission (
gmail.modify— read, send, and organize mail). - The credential is saved and named after your Google account email. Select it in the block's dropdown.
The Gmail block needs the gmail.modify scope. If you skip a permission on the Google consent screen, actions like Reply or Apply Label will fail — reconnect the account and approve all requested permissions.
Saving output to variables
Use Response Mapping in the block settings to store parts of the result in variables. Pick a value to extract and the variable to save it in.
Common extractable values:
| Value | Description |
|---|---|
Subject, From, To, Cc, Bcc, Date | Header fields of the message |
Body | The message body text |
Snippet | Short preview text of the message |
Message Id / Id | The Gmail message id — use it for Reply, Trash, Labels, and Mark Read/Unread |
Thread Id / Thread | The conversation id — use it with Get Thread |
Messages | The list of messages returned by Search or Get Thread |
Labels / Label Id / Label Name | Label data from List Labels |
Draft Id | The id of a draft created by Create Draft |
Next Page Token | Token to fetch the next page of search results |
Full Data | The complete raw response |
Example: Support auto-reply
- Gmail Trigger — fires when a new email arrives in the support inbox.
- LLM Agent — drafts an answer from the email body.
- Gmail (Reply) — sends the answer using the trigger's Message ID, so it lands in the same thread.
- Gmail (Apply/Remove Labels) — applies an "answered" label to the original message.
Related
- Gmail Trigger — start a workflow when new email arrives