Gmail
Send, read, search, and manage Gmail messages
Gmail is one of the world’s most popular email services, trusted by individuals and organizations to send, receive, and manage messages securely.
With the Gmail integration in SteelEngine, you can:
- Send emails: Compose and send emails with support for recipients, CC, BCC, subject, body, and attachments
- Create drafts: Save email drafts for later review and sending
- Read emails: Retrieve email messages by ID with full content and metadata
- Search emails: Find emails using Gmail’s powerful search query syntax
- Move emails: Move messages between folders or labels
- Manage read status: Mark emails as read or unread
- Archive and unarchive: Archive messages to clean up your inbox or restore them
- Delete emails: Remove messages from your mailbox
- Manage labels: Add or remove labels from emails for organization
In SteelEngine, the Gmail integration enables your agents to interact with your inbox programmatically as part of automated workflows. Agents can send notifications, search for specific emails, organize messages, and trigger actions based on email content—enabling intelligent email automation and communication workflows.
Integrate Gmail into the workflow. Send, read, search, draft, move, label, archive, and delete emails. For starting workflows from new mail, use the Gmail trigger block.
Send emails using Gmail. Returns API-aligned fields only.
| 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 |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Email labels |
Draft emails using Gmail. Returns API-aligned fields only.
| 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 |
|---|
draftId | string | Draft ID |
messageId | string | Gmail message ID for the draft |
threadId | string | Gmail thread ID |
labelIds | array | Email labels |
Read emails from Gmail. Returns API-aligned fields only.
| Parameter | Type | Required | Description |
|---|
messageId | string | No | Gmail message ID to read (e.g., 18f1a2b3c4d5e6f7) |
folder | string | No | Folder/label to read emails from (e.g., INBOX, SENT, DRAFT, TRASH, SPAM, or custom label name) |
unreadOnly | boolean | No | Set to true to only retrieve unread messages |
maxResults | number | No | Maximum number of messages to retrieve (default: 1, max: 10) |
includeAttachments | boolean | No | Set to true to download and include email attachments |
| Parameter | Type | Description |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Email labels |
from | string | Sender email address |
to | string | Recipient email address |
subject | string | Email subject |
date | string | Email date |
body | string | Email body text (best-effort plain text) |
hasAttachments | boolean | Whether the email has attachments |
attachmentCount | number | Number of attachments |
attachments | file[] | Downloaded attachments (if enabled) |
results | json | Summary results when reading multiple messages |
Search emails in Gmail. Returns API-aligned fields only.
| Parameter | Type | Required | Description |
|---|
query | string | Yes | Search query for emails |
maxResults | number | No | Maximum number of results to return (e.g., 10, 25, 50) |
| Parameter | Type | Description |
|---|
results | json | Array of search results |
Move emails between labels/folders in Gmail. Returns API-aligned fields only.
| 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 |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Email labels |
Mark a Gmail message as read. Returns API-aligned fields only.
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to mark as read |
| Parameter | Type | Description |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Updated email labels |
Mark a Gmail message as unread. Returns API-aligned fields only.
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to mark as unread |
| Parameter | Type | Description |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Updated email labels |
Archive a Gmail message (remove from inbox). Returns API-aligned fields only.
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to archive |
| Parameter | Type | Description |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Updated email labels |
Unarchive a Gmail message (move back to inbox). Returns API-aligned fields only.
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to unarchive |
| Parameter | Type | Description |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Updated email labels |
Delete a Gmail message (move to trash). Returns API-aligned fields only.
| Parameter | Type | Required | Description |
|---|
messageId | string | Yes | ID of the message to delete |
| Parameter | Type | Description |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Updated email labels |
Add label(s) to a Gmail message. Returns API-aligned fields only.
| 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 |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Updated email labels |
Remove label(s) from a Gmail message. Returns API-aligned fields only.
| 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 |
|---|
id | string | Gmail message ID |
threadId | string | Gmail thread ID |
labelIds | array | Updated email labels |
Create a new label in Gmail
| Parameter | Type | Required | Description |
|---|
name | string | Yes | Display name for the new label |
messageListVisibility | string | No | Visibility of messages with this label in the message list (show or hide) |
labelListVisibility | string | No | Visibility of the label in the label list (labelShow, labelShowIfUnread, or labelHide) |
| Parameter | Type | Description |
|---|
id | string | Label ID |
name | string | Label display name |
messageListVisibility | string | Visibility of messages with this label |
labelListVisibility | string | Visibility of the label in the label list |
type | string | Label type (system or user) |
List all labels in a Gmail account
| Parameter | Type | Required | Description |
|---|
| Parameter | Type | Description |
|---|
labels | json | Array of label objects with id, name, type, and visibility settings |
Delete a label from Gmail
| Parameter | Type | Required | Description |
|---|
labelId | string | Yes | ID of the label to delete |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the label was successfully deleted |
labelId | string | ID of the deleted label |
List all drafts in a Gmail account
| Parameter | Type | Required | Description |
|---|
maxResults | number | No | Maximum number of drafts to return (default: 100, max: 500) |
pageToken | string | No | Page token for paginated results |
query | string | No | Search query to filter drafts (same syntax as Gmail search) |
| Parameter | Type | Description |
|---|
drafts | json | Array of draft objects with id, messageId, and threadId |
resultSizeEstimate | number | Estimated total number of drafts |
nextPageToken | string | Token for fetching the next page of results |
Get a specific draft from Gmail by its ID
| Parameter | Type | Required | Description |
|---|
draftId | string | Yes | ID of the draft to retrieve |
| Parameter | Type | Description |
|---|
id | string | Draft ID |
messageId | string | Gmail message ID |
threadId | string | Gmail thread ID |
to | string | Recipient email address |
from | string | Sender email address |
subject | string | Draft subject |
body | string | Draft body text |
labelIds | array | Draft labels |
Delete a specific draft from Gmail
| Parameter | Type | Required | Description |
|---|
draftId | string | Yes | ID of the draft to delete |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the draft was successfully deleted |
draftId | string | ID of the deleted draft |
List email threads in a Gmail account
| Parameter | Type | Required | Description |
|---|
maxResults | number | No | Maximum number of threads to return (default: 100, max: 500) |
pageToken | string | No | Page token for paginated results |
query | string | No | Search query to filter threads (same syntax as Gmail search) |
labelIds | string | No | Comma-separated label IDs to filter threads by |
| Parameter | Type | Description |
|---|
threads | json | Array of thread objects with id, snippet, and historyId |
resultSizeEstimate | number | Estimated total number of threads |
nextPageToken | string | Token for fetching the next page of results |
Get a specific email thread from Gmail, including all messages in the thread
| Parameter | Type | Required | Description |
|---|
threadId | string | Yes | ID of the thread to retrieve |
format | string | No | Format to return the messages in (full, metadata, or minimal). Defaults to full. |
| Parameter | Type | Description |
|---|
id | string | Thread ID |
historyId | string | History ID |
messages | json | Array of messages in the thread with id, from, to, subject, date, body, and labels |
Move an email thread to trash in Gmail
| Parameter | Type | Required | Description |
|---|
threadId | string | Yes | ID of the thread to trash |
| Parameter | Type | Description |
|---|
id | string | Thread ID |
trashed | boolean | Whether the thread was successfully trashed |
Remove an email thread from trash in Gmail
| Parameter | Type | Required | Description |
|---|
threadId | string | Yes | ID of the thread to untrash |
| Parameter | Type | Description |
|---|
id | string | Thread ID |
untrashed | boolean | Whether the thread was successfully removed from trash |