Sim

Gmail

Send, read, search, and move Gmail messages or trigger workflows from Gmail events

Gmail is one of the world’s most popular and reliable email services, trusted by individuals and organizations to send, receive, and manage messages. Gmail offers a secure, intuitive interface with advanced organization and search capabilities, making it a top choice for personal and professional communication.

Gmail provides a comprehensive suite of features for efficient email management, message filtering, and workflow integration. With its powerful API, Gmail enables developers and platforms to automate common email-related tasks, integrate mailbox activities into broader workflows, and enhance productivity by reducing manual effort.

Key features of Gmail include:

  • Email Sending and Receiving: Compose, send, and receive emails reliably and securely
  • Message Search and Organization: Advanced search, labels, and filters to easily find and categorize messages
  • Conversation Threading: Keeps related messages grouped together for better conversation tracking
  • Attachments and Formatting: Support for file attachments, rich formatting, and embedded media
  • Integration and Automation: Robust API for integrating with other tools and automating email workflows

In Sim, the Gmail integration allows your agents to interact with your emails programmatically—sending, receiving, searching, and organizing messages as part of powerful AI workflows. Agents can draft emails, trigger processes based on new email arrivals, and automate repetitive email tasks, freeing up time and reducing manual labor. By connecting Sim with Gmail, you can build intelligent agents to manage communications, automate follow-ups, and maintain organized inboxes within your workflows.

Usage Instructions

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.

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
messageIdstringNoID of the message to read
folderstringNoFolder/label to read emails from
unreadOnlybooleanNoOnly retrieve unread messages
maxResultsnumberNoMaximum number of messages to retrieve (default: 1, max: 10)
includeAttachmentsbooleanNoDownload 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

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
On this page

On this page

Start building today
Trusted by over 60,000 builders.
Build Agentic workflows visually on a drag-and-drop canvas or with natural language.
Get started