Skip to content
Gmail

How to use Gmail

Data & BICommunicationCost: 1 credit per runTop 100 · #4Full guide

What it is for

The Gmail component lets you read, send and organize email in your Google account from flooows. Common uses include auto-replying to customers, saving attachments to another tool, labeling messages or requesting approvals by email before a flow continues.

Gmail triggers (New Email, New Labeled Email, New Attachment, New Label) are polling-based: flooows checks your mailbox every few minutes and starts the flow for each new item that matches your filters.

Set up the connection

Authentication type: OAuth 2.0 (sign in with your account) · Custom credentials

  1. 1Add a Gmail step (trigger or action) to your flow and click "Connect".
  2. 2Usual option (OAuth): sign in with your Google account and accept the requested mail permissions.
  3. 3Google Workspace option: in Google Cloud Console go to IAM & Admin > Service Accounts, create a service account and generate a JSON key from its Keys tab.
  4. 4To act on mailboxes across your domain, enable domain-wide delegation for that service account in the Workspace admin console.
  5. 5Paste the file contents into "Service Account JSON Key" and enter the target mailbox in "User Email" (required with delegation).
  6. 6Give the connection a recognizable name and save it.
Connection fieldTypeRequired
Service Account JSON KeyLong textYes
User EmailTextYes

Credentials are stored encrypted in your isolated database, in Spain, and are never shown in plain text.

How to use it in a flow

  • Send Email: fill in To, Subject and Body, and pick plain text or HTML in Body Type. Map the recipient and message data from earlier steps.
  • Reply to Email and Create Draft Reply: select or map the message ID from the trigger in Message, and choose in Reply Type whether to reply to the sender only or to everyone.
  • Find Email: combine From, Subject, Label, After or Before to locate a specific message and reuse its content later.
  • Add Label to Email / Archive Email: map the trigger's Message to classify or archive the email once processed.
  • Request Approval in Email: sends an email with approve/reject buttons and the flow waits for the answer before continuing.

Tips

  • •Use New Email filters (From, Subject, Label) to avoid firing on irrelevant mail and save credits.
  • •Fill in Sender Name so recipients recognize who is writing.
  • •When handling attachments, the New Attachment trigger can filter by File Extension, for example pdf.

Triggers (4)

Events that can start a flow. Expand each one to see its fields.

New EmailPeriodic check5 fields
FieldTypeRequired
SubjectTextNo
FromTextNo
ToTextNo
LabelList (from your account)No
CategoryFixed listNo
New Labeled EmailPeriodic check1 fields
FieldTypeRequired
LabelList (from your account)Yes
New AttachmentPeriodic check6 fields
FieldTypeRequired
FromTextNo
ToTextNo
SubjectTextNo
LabelList (from your account)No
CategoryFixed listNo
File ExtensionTextNo
New LabelPeriodic check0 fields

No fields to configure.

Actions (11)

Operations available as flow steps. Expand each one to see its fields.

Send Email12 fields
FieldTypeRequired
ToList of valuesYes
CcList of valuesNo
BccList of valuesNo
SubjectTextYes
Body TypeFixed listYes
BodyRich textYes
Reply ToList of valuesNo
Sender NameTextNo
FromTextNo
AttachmentsList of valuesNo
In Reply ToTextNo
Save as DraftYes / NoNo
Request Approval in Email11 fields
FieldTypeRequired
ToTextYes
CcList of valuesNo
BccList of valuesNo
SubjectTextYes
Body TypeFixed listYes
BodyRich textYes
Reply ToList of valuesNo
Sender NameTextNo
FromTextNo
AttachmentsList of valuesNo
In Reply ToTextNo
Reply to Email7 fields
FieldTypeRequired
MessageList (from your account)Yes
Reply TypeFixed listYes
Body TypeFixed listYes
BodyRich textYes
Sender NameTextNo
AttachmentFileNo
Attachment NameTextNo
Create Draft Reply8 fields
FieldTypeRequired
MessageList (from your account)Yes
Reply TypeFixed listYes
Body TypeFixed listYes
BodyRich textNo
Include Original MessageYes / NoNo
Sender NameTextNo
AttachmentFileNo
Attachment NameTextNo
Get Email1 fields
FieldTypeRequired
MessageList (from your account)Yes
Find Email12 fields
FieldTypeRequired
FromTextNo
ToTextNo
SubjectTextNo
BodyTextNo
Has AttachmentYes / NoNo
Attachment NameTextNo
LabelList (from your account)No
CategoryFixed listNo
AfterDate and timeNo
BeforeDate and timeNo
Spam and TrashYes / NoNo
Max ResultsNumberNo
Create Label1 fields
FieldTypeRequired
Label NameTextYes
Add Label to Email2 fields
FieldTypeRequired
MessageList (from your account)Yes
LabelList (from your account)Yes
Remove Label From Email2 fields
FieldTypeRequired
MessageList (from your account)Yes
LabelList (from your account)Yes
Archive Email1 fields
FieldTypeRequired
MessageList (from your account)Yes
Custom API Call10 fields
FieldTypeRequired
urlDynamic fieldsYes
MethodFixed listYes
HeadersKey / value pairsNo
Query ParametersKey / value pairsNo
Body TypeList (from your account)No
BodyDynamic fieldsNo
Response is BinaryYes / NoNo
Return Error as OutputYes / NoNo
TimeoutNumberNo
Follow redirectsYes / NoNo

Common errors

The connection stops working or asks for reauthorization.

The Google token expired or was revoked: reconnect the account from the step.

Permission error with the service account.

Check that domain-wide delegation is enabled and that User Email belongs to your domain.

Reply to Email cannot find the message.

Map the message ID from the trigger or from Find Email instead of typing it.

Google rejects sends due to volume.

Stay within Gmail daily sending limits and add delays between bulk messages.

Field types

"List (from your account)" loads options from your connected account; "Dynamic fields" appear depending on earlier choices; in any field you can insert data from previous steps with the data selector (e.g. {{trigger.email}}). More about data between steps