Tools
Gmail
Send, read, search, and move Gmail messages or trigger workflows from Gmail events
Integrate Gmail into the workflow. Can send, read, search, and move emails. Can be used in trigger mode to trigger a workflow when a new email is received.
Send emails using Gmail
| Parameter | Type | Required | Description |
|---|
to | string | Yes | Recipient email address |
subject | string | No | Email subject |
body | string | Yes | Email body content |
contentType | string | No | Content type for the email body (text or html) |
threadId | string | No | Thread ID to reply to (for threading) |
replyToMessageId | string | No | Gmail message ID to reply to - use the "id" field from Gmail Read results (not the RFC "messageId") |
cc | string | No | CC recipients (comma-separated) |
bcc | string | No | BCC recipients (comma-separated) |
attachments | file[] | No | Files to attach to the email |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Email metadata |
Draft emails using Gmail
| Parameter | Type | Required | Description |
|---|
to | string | Yes | Recipient email address |
subject | string | No | Email subject |
body | string | Yes | Email body content |
contentType | string | No | Content type for the email body (text or html) |
threadId | string | No | Thread ID to reply to (for threading) |
replyToMessageId | string | No | Gmail message ID to reply to - use the "id" field from Gmail Read results (not the RFC "messageId") |
cc | string | No | CC recipients (comma-separated) |
bcc | string | No | BCC recipients (comma-separated) |
attachments | file[] | No | Files to attach to the email draft |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Draft metadata |
Read emails from Gmail
| Parameter | Type | Required | Description |
|---|
messageId | string | No | ID of the message to read |
folder | string | No | Folder/label to read emails from |
unreadOnly | boolean | No | Only retrieve unread messages |
maxResults | number | No | Maximum number of messages to retrieve (default: 1, max: 10) |
includeAttachments | boolean | No | Download and include email attachments |
| Parameter | Type | Description |
|---|
content | string | Text content of the email |
metadata | json | Metadata of the email |
attachments | file[] | Attachments of the email |
Search emails in Gmail
| Parameter | Type | Required | Description |
|---|
query | string | Yes | Search query for emails |
maxResults | number | No | Maximum number of results to return |
| Parameter | Type | Description |
|---|
content | string | Search results summary |
metadata | object | Search metadata |
Move emails between Gmail labels/folders
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to move |
addLabelIds | string | Yes | Comma-separated label IDs to add (e.g., INBOX, Label_123) |
removeLabelIds | string | No | Comma-separated label IDs to remove (e.g., INBOX, SPAM) |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Email metadata |
Mark a Gmail message as read
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to mark as read |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Email metadata |
Mark a Gmail message as unread
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to mark as unread |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Email metadata |
Archive a Gmail message (remove from inbox)
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to archive |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Email metadata |
Unarchive a Gmail message (move back to inbox)
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to unarchive |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Email metadata |
Delete a Gmail message (move to trash)
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to delete |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Email metadata |
Add label(s) to a Gmail message
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to add labels to |
labelIds | string | Yes | Comma-separated label IDs to add (e.g., INBOX, Label_123) |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Email metadata |
Remove label(s) from a Gmail message
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to remove labels from |
labelIds | string | Yes | Comma-separated label IDs to remove (e.g., INBOX, Label_123) |
| Parameter | Type | Description |
|---|
content | string | Success message |
metadata | object | Email metadata |
Triggers when new emails are received in Gmail (requires Gmail credentials)
| Parameter | Type | Description |
|---|
email.id | string | Gmail message ID |
email.threadId | string | Gmail thread ID |
email.subject | string | Email subject line |
email.from | string | Sender email address |
email.to | string | Recipient email address |
email.cc | string | CC recipients |
email.date | string | Email date in ISO format |
email.bodyText | string | Plain text email body |
email.bodyHtml | string | HTML email body |
email.labels | string | Email labels array |
email.hasAttachments | boolean | Whether email has attachments |
email.attachments | file[] | Array of email attachments as files (if includeAttachments is enabled) |
timestamp | string | Event timestamp |
- Category:
tools
- Type:
gmail