Skip to main content
Use Gmail to start a flow when an email arrives, and to work with email from inside a flow. This flow labels every invoice from acme.com Invoices and forwards it to finance. Press Run to watch it. The trigger and every node need a Gmail connection. See Connect Google Workspace to set one up.

Triggers

The trigger checks the mailbox every minute. Only email that arrives after you turn the trigger on starts a flow: email already in the mailbox never does. Leave a filter empty to match every email; an email must match every filter you set. An email that later gets one of your chosen labels, or is moved into the Inbox, is checked again. An email starts a flow only once.

Nodes

Every node that takes a message ID accepts the message_id of a Read or Get node, or the gmail_message_id or internet_message_id of the trigger.

Working with several emails

Move Gmail Email to Label and Send Gmail Email take a whole list at once. When one of several emails fails, the run continues and shows a warning for that email. The run fails only when there was a single email. The other nodes run once per email in a bound list.

Troubleshooting

Open the trigger’s events. Every skipped email is listed with a reason, such as Sender doesn't match acme.com, Subject doesn't contain any of invoice, Email has none of the chosen labels or Email is in Spam. Email that was in the mailbox before the trigger was turned on never starts a flow.
The trigger retries an email that fails. After 30 minutes and five attempts it skips the email, notifies you, and lists it as skipped in the trigger’s events.
The trigger’s Mark as read needs permission to change email. Reconnect Gmail and allow every permission. See Connect Google Workspace.
The email was deleted, or the ID comes from another mailbox. Check that the node uses the same connection as the node or trigger that read the ID.
Reconnect Gmail and grant the Modify message labels permission.
Reconnect Gmail to grant permission to modify mail. If the connection already has it, a Gmail usage limit was reached: try again later.
Reconnect Gmail and run the flow again.
Wait a minute and try again.
Check the spelling, or pick the labels from the list. Use Create Gmail Label first to create a label the flow needs.
Use a label name, a nested path such as Clients/Invoices, or a label ID.
Sent, Draft, Unread and Chat cannot be destinations. Pick Archive, Inbox or one of your own labels.
The Label on Read Gmail Emails was deleted or renamed. Pick another label.
Thread ID and Message ID on Send Gmail Email work only with Send Mode set to Individual.