Send Email
A comprehensive guide to sending emails directly from your AgenticFlow workflows.
The Send Email Action allows you to send emails directly from your workflow. This is a crucial integration for a huge variety of use cases, including sending notifications, delivering reports, confirming user actions, and creating personalized alerts.
You can craft everything from simple text-based notifications to rich, dynamic HTML emails with attachments.
Connection Setup
To send emails, you first need to connect to an email provider via SMTP. This is a one-time setup in your AgenticFlow settings.
Navigate to Settings > Connections.
Add a new Email Connection.
Enter the SMTP server details for your email provider (e.g., Gmail, SendGrid, Mailgun).
Host:
smtp.example.com
Port:
587
Username: Your email address or API username
Password: Your email password or API key
Configuration
Once your connection is set up, you can configure the Send Email action.
Input Parameters
Connection
Connection
Select the email connection you configured in your settings.
From
Text
The email address the email will be sent from. Must be authorized by your provider.
To
Text / Array
The recipient's email address. You can provide a single address, a comma-separated list, or an array of addresses from a previous action.
Subject
Text
The subject line of the email. You can use variables here.
Body (Plain Text)
Text
The content of the email for clients that don't render HTML.
Body (HTML)
Text
The rich HTML version of your email content. Use variables to personalize it.
Attachments
File / Array
Attach one or more files to the email. This can be a single file object or an array of file objects from a previous action.
Example: Send a Personalized Welcome Email
Let's say a new user signs up, and you want to send them a personalized welcome email with a "getting started" PDF guide.
Trigger: Your workflow starts when a new user is added to your database.
Configure the Send Email Action:
Connection: Select your pre-configured SMTP connection.
From:
welcome@yourapp.com
To:
{{trigger.user_email}}
(variable from the workflow trigger)Subject:
Welcome to AgenticFlow, {{trigger.user_name}}!
Body (HTML):
Attachments: Select the
GettingStarted.pdf
file you've uploaded to AgenticFlow.
This configuration will send a personalized, visually appealing email to every new user, complete with their name in the subject and a helpful attachment.
Last updated
Was this helpful?