Use this file to discover all available pages before exploring further.
Gmail actions let an agent work with a mailbox directly in a flow. An agent can send and reply to messages, manage drafts and threads, apply and remove labels, and pass the results to later steps.
Set up a Google OAuth credential by following the Google Cloud Console OAuth setup guide, store it in Credential Management, then select it on every Gmail action. Gmail actions also support end user authentication, so a step can act on each user’s own mailbox.
Map text inputs from earlier steps. Inputs such as To, Subject, and Body accept a value mapped from a previous step. Max Results and the Is HTML and Include Spam Trash toggles take fixed values.
An agent that triages unread mail and replies on behalf of the user:
1
Find unread messages
A Gmail Message Get All action sets Query to is:unread and Max Results to a fixed value so the flow reads only the latest unread messages.
2
Draft the reply
A model step reads the message body and writes a response, then a Gmail Message Reply action maps Message ID to the message from the previous step and Body to the generated reply.
3
Mark and file
A Gmail Message Mark As Read action clears the unread flag, and a Gmail Message Add Labels action applies a follow up label by passing its ID into Label IDs.
The Message ID or Thread ID does not exist in the connected mailbox. Confirm the ID with a Get All action and that the credential is for the correct account.
Label does not exist
A label passed to Label IDs must be an existing label ID, not a label name. Use Gmail Label Get All to look up label IDs first, or create the label with Gmail Label Create.
Authentication failed
The Google OAuth credential expired or was revoked. Reconnect the credential and confirm the required Gmail scopes were granted during consent.
HTML body renders as plain text
Set Is HTML on when the Body contains HTML markup. With the toggle off, the body is sent as plain text.