Skip to main content
The SendGrid integration creates or updates Marketing Contacts from ChatbotX directly within a Flow. The action uses the email address to identify the contact and can add the contact to a List while syncing the phone number and Custom Fields. For example, after a customer signs up for product updates, ChatbotX sends their email address, phone number, and product interests to SendGrid for segmentation and personalized email campaigns.

Prepare your API Key

Create a SendGrid API Key with permission to read and write Marketing data. Grant only the permissions ChatbotX needs to access Lists, Contacts, and Custom Fields.
1

Sign in to SendGrid

Sign in to the Twilio SendGrid account that you want to connect to ChatbotX.
2

Open API Keys

From the left menu, select Settings > API Keys.
3

Create an API Key

Select Create API Key, enter a name that identifies the key, and select Custom Access.
4

Grant Marketing access

Set Marketing to Full Access so the key can read and write Marketing Contacts, Lists, and Custom Fields.
5

Copy the API Key

Select Create & View, then copy the key and store it securely. SendGrid displays the complete API Key only once.See the official API Keys guide.
Create a SendGrid API Key with Marketing access
Do not share the API Key in emails, messages, public screenshots, or customer-facing documents. If the key is exposed, delete it, create a new key, and update the connection in ChatbotX.

Connect SendGrid to ChatbotX

1

Open Settings

In your ChatbotX workspace, select Settings from the left menu.
2

Select Integrations

Select the Integrations tab, then open SendGrid.
3

Open the connection window

Select Connect to open the Connect SendGrid window.
4

Enter the API Key

Paste the key into the API Key field, then select Confirm.
Connect SendGrid in ChatbotX Integrations
After the key is verified and has the required Marketing permissions, ChatbotX saves the connection and loads SendGrid Lists and Custom Fields for use in Flows.

Add SendGrid to a Flow

Place the SendGrid action after collecting the email address and other data that you want to sync. The email address must be valid so SendGrid can identify the Marketing Contact.
1

Open the Flow

Select Flows, then open the Flow that you want to use to collect contacts.
2

Add Actions

In the Send Message node, select + Create, then select Actions.
3

Select Email Actions

Open Email Actions and select Add Contact to SendGrid.
Select Add Contact to SendGrid Action
4

Open the configuration

Select Edit on the action to choose a List and sync contact data.

Configure Add Contact to SendGrid

Configure the fields in the SendGrid window, then select Save.
Configure Add Contact to SendGrid
The action provides two outcomes that you can connect to the next nodes in the Flow:
  • Success: SendGrid accepted and queued the request to create or update the contact.
  • Error: SendGrid rejected the request because the email address, API Key, permissions, or synced data is invalid.
Connect each outcome to a different node to send a confirmation or handle the error.
SendGrid processes contact creation and updates asynchronously. A contact might not appear immediately in Marketing > Contacts even after the Flow follows the Success branch.

Sync Custom Fields

Custom Fields store additional data for contact segmentation and email personalization. Before configuring the action, create the required Custom Fields in Marketing > Contacts in SendGrid. Then select a ChatbotX field with a compatible data type for each SendGrid Custom Field. For example:

Example: Collect customers for product updates

A fashion retailer wants to add chatbot subscribers to a List for new collection announcements.
1

Collect customer information

Use Get User Data to ask for the customer’s email address, phone number, and product interest.
2

Add the contact to SendGrid

Run Add Contact to SendGrid, then select the destination List and the Email field.
3

Sync additional data

Select the Phone field and sync the product interest to its corresponding Custom Field.
4

Handle the result

Connect Success to a confirmation message. Connect Error to a branch that asks the customer to check their information or transfers the conversation to a team member.

Test the integration

Before you Publish the Flow, test it with an email address that you can access.
  • Open Marketing > Contacts in SendGrid and wait for the contact to appear.
  • Confirm that the contact belongs to the correct List if you selected one.
  • Confirm that the email address, phone number, and Custom Fields contain the correct data.
  • Confirm that the Flow follows the Success branch for a valid email address.
  • Enter an invalid email address to test the Error branch.
  • If Lists or Custom Fields do not appear, review the API Key’s Marketing permissions and reconnect the integration.
Add contacts to email marketing campaigns only after they agree to receive messages. Creating a Marketing Contact does not confirm consent or replace your unsubscribe process.