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.

Usage Instructions

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.

Tools

gmail_send

Send emails using Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
tostringYesRecipient email address
subjectstringNoEmail subject
bodystringYesEmail body content
contentTypestringNoContent type for the email body (text or html)
threadIdstringNoThread ID to reply to (for threading)
replyToMessageIdstringNoGmail message ID to reply to - use the "id" field from Gmail Read results (not the RFC "messageId")
ccstringNoCC recipients (comma-separated)
bccstringNoBCC recipients (comma-separated)
attachmentsfile[]NoFiles to attach to the email

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayEmail labels

gmail_draft

Draft emails using Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
tostringYesRecipient email address
subjectstringNoEmail subject
bodystringYesEmail body content
contentTypestringNoContent type for the email body (text or html)
threadIdstringNoThread ID to reply to (for threading)
replyToMessageIdstringNoGmail message ID to reply to - use the "id" field from Gmail Read results (not the RFC "messageId")
ccstringNoCC recipients (comma-separated)
bccstringNoBCC recipients (comma-separated)
attachmentsfile[]NoFiles to attach to the email draft

Output

ParameterTypeDescription
draftIdstringDraft ID
messageIdstringGmail message ID for the draft
threadIdstringGmail thread ID
labelIdsarrayEmail labels

gmail_read

Read emails from Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringNoGmail message ID to read (e.g., 18f1a2b3c4d5e6f7)
folderstringNoFolder/label to read emails from (e.g., INBOX, SENT, DRAFT, TRASH, SPAM, or custom label name)
unreadOnlybooleanNoSet to true to only retrieve unread messages
maxResultsnumberNoMaximum number of messages to retrieve (default: 1, max: 10)
includeAttachmentsbooleanNoSet to true to download and include email attachments

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayEmail labels
fromstringSender email address
tostringRecipient email address
subjectstringEmail subject
datestringEmail date
bodystringEmail body text (best-effort plain text)
hasAttachmentsbooleanWhether the email has attachments
attachmentCountnumberNumber of attachments
attachmentsfile[]Downloaded attachments (if enabled)
resultsjsonSummary results when reading multiple messages

Search emails in Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
querystringYesSearch query for emails
maxResultsnumberNoMaximum number of results to return (e.g., 10, 25, 50)

Output

ParameterTypeDescription
resultsjsonArray of search results

gmail_move

Move emails between labels/folders in Gmail. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to move
addLabelIdsstringYesComma-separated label IDs to add (e.g., INBOX, Label_123)
removeLabelIdsstringNoComma-separated label IDs to remove (e.g., INBOX, SPAM)

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayEmail labels

gmail_mark_read

Mark a Gmail message as read. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to mark as read

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_mark_unread

Mark a Gmail message as unread. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to mark as unread

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_archive

Archive a Gmail message (remove from inbox). Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to archive

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_unarchive

Unarchive a Gmail message (move back to inbox). Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to unarchive

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_delete

Delete a Gmail message (move to trash). Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to delete

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_add_label

Add label(s) to a Gmail message. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to add labels to
labelIdsstringYesComma-separated label IDs to add (e.g., INBOX, Label_123)

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_remove_label

Remove label(s) from a Gmail message. Returns API-aligned fields only.

Input

ParameterTypeRequiredDescription
messageIdstringYesID of the message to remove labels from
labelIdsstringYesComma-separated label IDs to remove (e.g., INBOX, Label_123)

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

gmail_create_label

Create a new label in Gmail

Input

ParameterTypeRequiredDescription
namestringYesDisplay name for the new label
messageListVisibilitystringNoVisibility of messages with this label in the message list (show or hide)
labelListVisibilitystringNoVisibility of the label in the label list (labelShow, labelShowIfUnread, or labelHide)

Output

ParameterTypeDescription
idstringLabel ID
namestringLabel display name
messageListVisibilitystringVisibility of messages with this label
labelListVisibilitystringVisibility of the label in the label list
typestringLabel type (system or user)

gmail_list_labels

List all labels in a Gmail account

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
labelsjsonArray of label objects with id, name, type, and visibility settings

gmail_delete_label

Delete a label from Gmail

Input

ParameterTypeRequiredDescription
labelIdstringYesID of the label to delete

Output

ParameterTypeDescription
deletedbooleanWhether the label was successfully deleted
labelIdstringID of the deleted label

gmail_list_drafts

List all drafts in a Gmail account

Input

ParameterTypeRequiredDescription
maxResultsnumberNoMaximum number of drafts to return (default: 100, max: 500)
pageTokenstringNoPage token for paginated results
querystringNoSearch query to filter drafts (same syntax as Gmail search)

Output

ParameterTypeDescription
draftsjsonArray of draft objects with id, messageId, and threadId
resultSizeEstimatenumberEstimated total number of drafts
nextPageTokenstringToken for fetching the next page of results

gmail_get_draft

Get a specific draft from Gmail by its ID

Input

ParameterTypeRequiredDescription
draftIdstringYesID of the draft to retrieve

Output

ParameterTypeDescription
idstringDraft ID
messageIdstringGmail message ID
threadIdstringGmail thread ID
tostringRecipient email address
fromstringSender email address
subjectstringDraft subject
bodystringDraft body text
labelIdsarrayDraft labels

gmail_delete_draft

Delete a specific draft from Gmail

Input

ParameterTypeRequiredDescription
draftIdstringYesID of the draft to delete

Output

ParameterTypeDescription
deletedbooleanWhether the draft was successfully deleted
draftIdstringID of the deleted draft

gmail_list_threads

List email threads in a Gmail account

Input

ParameterTypeRequiredDescription
maxResultsnumberNoMaximum number of threads to return (default: 100, max: 500)
pageTokenstringNoPage token for paginated results
querystringNoSearch query to filter threads (same syntax as Gmail search)
labelIdsstringNoComma-separated label IDs to filter threads by

Output

ParameterTypeDescription
threadsjsonArray of thread objects with id, snippet, and historyId
resultSizeEstimatenumberEstimated total number of threads
nextPageTokenstringToken for fetching the next page of results

gmail_get_thread

Get a specific email thread from Gmail, including all messages in the thread

Input

ParameterTypeRequiredDescription
threadIdstringYesID of the thread to retrieve
formatstringNoFormat to return the messages in (full, metadata, or minimal). Defaults to full.

Output

ParameterTypeDescription
idstringThread ID
historyIdstringHistory ID
messagesjsonArray of messages in the thread with id, from, to, subject, date, body, and labels

gmail_trash_thread

Move an email thread to trash in Gmail

Input

ParameterTypeRequiredDescription
threadIdstringYesID of the thread to trash

Output

ParameterTypeDescription
idstringThread ID
trashedbooleanWhether the thread was successfully trashed

gmail_untrash_thread

Remove an email thread from trash in Gmail

Input

ParameterTypeRequiredDescription
threadIdstringYesID of the thread to untrash

Output

ParameterTypeDescription
idstringThread ID
untrashedbooleanWhether the thread was successfully removed from trash

On this page