BlocksCommunication
Send Email
Send an email using Gmail or a custom SMTP server.
Send Email
The Send Email block allows you to automate sending emails to your users or team. You can use your Gmail account or any custom SMTP provider (like SendGrid, Mailgun, or AWS SES).
Configuration
| Field | Required | Description |
|---|---|---|
| Service Provider | ✅ | Choose between Gmail or Custom SMTP. |
| To | ✅ | The recipient email address(es). Can be a string or an array. |
| Subject | ✅ | The subject line of the email. |
| Content Type | ✅ | Choose Text for plain text or HTML for rich formatting. |
| Body | ✅ | The content of the email based on the selected content type. |
| Output Variable | ✅ | The variable name to store the response object. |
Optional Fields
- From: The display name of the sender.
- CC / BCC: Additional recipients.
- Reply-To: The email address replies should be sent to.
- Attachments: An array of file URLs or attachment objects.
Authentication
- Gmail: Requires your Gmail address and an App Password stored as a Secret.
- SMTP: Requires Host, Port, and optionally a Username and Password (stored as a Secret).
Output Variable
The specified variable will store an object containing the response:
{
"messageId": "<[email protected]>",
"response": "250 2.0.0 OK",
"accepted": ["[email protected]"],
"rejected": []
}Error Handling
MISSING_FIELDS— Triggered when required configuration fields are missing.GMAIL_CONFIG_MISSING— Triggered when Gmail username or password secret is missing.SMTP_CONFIG_MISSING— Triggered when SMTP host or port is missing.SECRET_RETRIEVE_ERROR— Triggered if the password secret cannot be retrieved.SEND_FAILED— Triggered if the email fails to send (e.g., due to invalid credentials or SMTP error).
