AACFlow

Gmail

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

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
tostringYesNo description
subjectstringNoNo description
bodystringYesNo description
contentTypestringNoNo description
threadIdstringNoNo description
replyToMessageIdstringNoGmail message ID to reply to - use the "id" field from Gmail Read results (not the RFC "messageId")
ccstringNoNo description
bccstringNoNo description
attachmentsfile[]NoNo description

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayEmail labels

gmail_draft

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

Input

ParameterTypeRequiredDescription
tostringYesNo description
subjectstringNoNo description
bodystringYesNo description
contentTypestringNoNo description
threadIdstringNoNo description
replyToMessageIdstringNoGmail message ID to reply to - use the "id" field from Gmail Read results (not the RFC "messageId")
ccstringNoNo description
bccstringNoNo description
attachmentsfile[]NoNo description

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
messageIdstringNoNo description
folderstringNoFolder/label to read emails from (e.g., INBOX, SENT, DRAFT, TRASH, SPAM, or custom label name)
unreadOnlybooleanNoNo description
maxResultsnumberNoNo description
includeAttachmentsbooleanNoNo description

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
querystringYesNo description
maxResultsnumberNoNo description

Output

ParameterTypeDescription
resultsjsonArray of search results

gmail_move

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

Input

ParameterTypeRequiredDescription
messageIdstringYesNo description
addLabelIdsstringYesNo description
removeLabelIdsstringNoNo description

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
messageIdstringYesNo description

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
messageIdstringYesNo description

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
messageIdstringYesNo description

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
messageIdstringYesNo description

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
messageIdstringYesNo description

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
messageIdstringYesNo description
labelIdsstringYesNo description

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
messageIdstringYesNo description
labelIdsstringYesNo description

Output

ParameterTypeDescription
idstringGmail message ID
threadIdstringGmail thread ID
labelIdsarrayUpdated email labels

On this page

Start building today
Trusted by over 100,000 builders.
The SaaS platform to build AI agents and run your agentic workforce.
Get started