SendGrid
The SendGrid piece in ZBrain Flow allows you to send emails effortlessly, whether as plain text, HTML content, or using dynamic templates. This integration enables seamless email automation for notifications, transactional messages, and marketing campaigns. Additionally, you can use custom API calls to interact with SendGrid’s advanced features.
How to Use SendGrid in ZBrain Flow
Select SendGrid as Your Connection
Click on the ‘+’ button in the Flow.
Search for ‘SendGrid’ and select it.
Choose the action you want to perform. ZBrain Flow provides the following options:
‘Send Email’ – Send a plain text or HTML email.
‘Send Dynamic Template’ – Send an email using a predefined SendGrid template.
‘Custom API Call’ – Send a request to a specific SendGrid API endpoint.
How to Send an Email Using SendGrid in ZBrain Flow
Step 1: Create a SendGrid Connection
In the ‘API Key’ dropdown, click on 'create connection'.
A small window will appear. Fill in the following details:
‘Connection Name’ – Enter a name for this SendGrid connection.
‘API Key’ – Obtain your API key from your SendGrid API settings and enter it here.
Click ‘Save’ to create the connection.
Step 2: Configure Email Sending Options
In the ‘To’ field, click ‘Add Item’ and enter the recipient’s email address.
In the ‘From (Email)’ field, enter the sender’s email (must be verified in SendGrid).
(Optional) In the ‘From (Name)’ field, enter the sender’s name.
(Optional) In the ‘Reply To’ field, enter the email address where replies should be sent (defaults to the sender).
In the ‘Subject’ field, enter the email subject.
In the ‘Content Type’ field, select ‘Plain Text’ or ‘HTML’.
In the ‘Content’ field, enter the email body. If HTML is selected, ensure the content is in HTML format.
How to Send an Email Using a Dynamic Template in SendGrid
Step 1: Create a SendGrid Connection
Follow the steps from ‘Step 1: Create a SendGrid Connection’ in the previous walkthrough, 'How to Send an Email Using SendGrid in ZBrain Flow'.
Step 2: Configure Dynamic Template Email Options
In the ‘To’ field, click ‘Add Item’ and enter the recipient’s email address.
(Optional) In the ‘From (Name)’ field, enter the sender’s name.
In the ‘From (Email)’ field, enter the sender’s email (must be verified in SendGrid).
In the ‘Template Id’ field, enter the ID of the SendGrid dynamic template you want to use.
In the ‘Template Data’ field, provide the JSON structure with values to populate in the template.
(Optional) In the ‘Reply To’ field, enter the email address where replies should be sent (defaults to the sender).
How to Make a Custom API Call Using SendGrid in ZBrain Flow
Step 1: Create a SendGrid Connection
To create a SendGrid connection, follow the steps from ‘Step 1: Create a SendGrid Connection’ in the previous walkthrough, 'How to Send an Email Using SendGrid in ZBrain Flow'.
Step 2: Configure the API Call
In the ‘URL’ field, enter the base URL
https://api.sendgrid.com/v3
and append the specific endpoint you want to call (e.g.,/mail/send
).In the ‘Method’ field, select the HTTP method (e.g., GET, POST, PUT, DELETE).
(Optional) In the ‘Headers’ section, click ‘Add Item’ to add any additional headers required for the request. The authorization headers are injected automatically from your connection.
(Optional) In the ‘Query Parameters’ section, click ‘Add Item’ to include any query parameters needed for the request.
(Optional) In the ‘Body’ section, enter the request payload if required (e.g., JSON data for sending an email).
Step 3: Set Additional Options
(Optional) Enable ‘No Error on Failure’ if you want the workflow to continue running even if the request fails.
(Optional) In the ‘Timeout (in seconds)’ field, specify a timeout duration for the request.
Last updated