Skip to content

Send Mail (Gmail)

Send automated emails programmatically through Gmail with support for HTML templates, dynamic spreadsheet variables, file attachments, and multiple recipients.


Overview

The Send Mail (Gmail) field type enables automated outbound email communication directly from form routines. Whether dispatching confirmation receipts, notifying team members of form completion, or emailing generated .xlsx reports and PDF files, this field leverages the Google Gmail API to deliver messages securely.


Configuration Options

OptionTypeDescriptionRequired
Google Service AccountDropdownLogged-in Google account used as the sender.Yes
ToInput TagsComma-separated list of recipient email addresses.Yes
SubjectText InputEmail subject line (supports dynamic variables).Yes
Enable AttachmentsToggle SwitchEnables sending one or more file attachments.No
Attachments URL/PathText InputLocal file paths or URLs to attach (comma-separated).When attachments enabled
Enable Custom File NamesToggle SwitchOverrides raw attachment filenames with custom labels.No
Attachments File NameText InputCustom file names for attachments (comma-separated).When custom names enabled
Attachments File MIME TypeText InputExplicit MIME types for attached files.When custom names enabled
Enable Retry on FailureToggle SwitchRe-attempts sending if API connection errors occur.No
Max RetriesNumber InputMaximum number of send retry attempts.When retry enabled
Email BodyDefault ValueMessage content (supports plain text, HTML, and dynamic variables).Yes

Detailed Configuration Breakdown

Google Service Account

Select your authorized account from Google Service. Outbound emails are sent from this address.

Recipient Addresses (To)

Specify destination addresses separated by commas:

You can also inject spreadsheet column values:

text
{$CustomerEmail$}

Subject Line

Define the message subject, which can incorporate dynamic row data:

text
Order Confirmation - #{$OrderID$} for {$CustomerName$}

Attachments

  • Attachments URL/Path: Provide local paths (e.g., C:\Reports\Invoice.pdf) or web URLs.
  • Custom File Names: Rename generated exports (e.g., Billing_Report_{$Date$}.xlsx) before dispatch.

Email Body Templating

The email body supports HTML markup for branded formatting:

html
<p>Hello <strong>{$Name$}</strong>,</p>
<p>Your application for <em>{$Service$}</em> was processed successfully.</p>
<br/>
<p>Confirmation Reference: <code>{$RefNumber$}</code></p>

Practical Examples

Example 1: Customer Submission Confirmation

text
Google Service Account: [email protected]
To: {$Email$}
Subject: Submission Received - Ref: {$ReferenceID$}
Email Body:
Thank you {$FullName$}, we have received your form details.
Your reference code is {$ReferenceID$}.

Example 2: Dispatching Exported Report Attachment

text
Google Service Account: [email protected]
To: [email protected]
Subject: Daily Automation Report - {$CurrentDate$}
Enable Attachments: ON
Attachments URL/Path: D:\Reports\Daily_Export.xlsx
Enable Custom File Names: ON
Attachments File Name: Daily_Export_{$CurrentDate$}.xlsx

Best Practices

Do's

  • Use Column Variables: Dynamically personalize messages using spreadsheet tags like {$CustomerName$} and {$Email$}.
  • Verify Attachment Paths: Ensure local file paths exist before triggering execution.
  • Enable Retries on Network Dependencies: Turn ON Enable Retry on Failure for resilient unattended workflows.

Don'ts

  • Do Not Send Unvalidated Emails: Test email templates with your own email before running large batch workflows.
  • Do Not Exceed Gmail API Quotas: Adhere to standard Google Workspace daily sending quotas.

Troubleshooting

IssueLikely CauseSolution
Sending fails with 403 ForbiddenGmail API send scope not grantedRe-authenticate your Google account under Google Service.
Attachment missing in delivered emailLocal file path invalid or file lockedVerify the absolute file path on disk.
HTML tags visible as plain textRaw unescaped brackets in plain text modeEnsure body is formatted with standard semantic HTML tags.