SendGrid Marketing Campaigns Destination
UpdatedAbout this integration
Twilio SendGrid provides email marketing automation for businesses. This integration helps you add contacts and lists to SendGrid Marketing Campaigns based on the people you identify and the events they perform in your sources.
Use cases
- Keep your SendGrid contacts up to date by syncing customer profiles from your source. When someone signs up or updates their profile, their contact information in SendGrid updates automatically.
- Build targeted email lists in SendGrid based on traits you send from Customer.io. Sync attributes like plan type, company size, or engagement score so you can segment your SendGrid lists.
- Centralize your contact data across platforms. If you use SendGrid for marketing emails and Customer.io for other channels, this integration keeps both systems in sync without manual imports.
Getting started
Go to Data & Integrations > Integrations and select the SendGrid Marketing Campaigns entry in the Directory tab.
(Optional) Select the data sources that you want to connect to your outbound integration. You can always connect data sources later. We’ll only show you data sources that work with your integration.
Configure your integration.
- Send Grid Api Key: The Api key for your SendGrid account.
Click Enable Destination.
Actions
When you’re done setting things up, you can go to the Actions tab to see how we map incoming data to your integration.
You may need to add actions for this integration
While we often have default triggers for actions, we don't always add those actions as defaults. You may need to add actions to make sure that you're sending all the data that you want to send to your integration. See our actions page for help setting up actions.
| Action | Default Trigger | Description |
|---|---|---|
| Upsert Contact | Add or update a Contact in SendGrid. |
Data mapping
The Update User Profile action maps incoming data to SendGrid contact fields. Here’s how the default mappings work:
| SendGrid field | Default mapping | Description |
|---|---|---|
| Email (primary) | $.traits.email or $.properties.email | Required. The contact’s email address. SendGrid uses this to find and update existing contacts. |
| First name | $.traits.first_name or $.properties.first_name | The contact’s first name. |
| Last name | $.traits.last_name or $.properties.last_name | The contact’s last name. |
| Country | $.traits.address.country or $.properties.address.country | Two-letter country code. |
| Postal code | $.traits.address.postal_code or $.properties.address.postal_code | Postal or zip code. |
| City | $.traits.address.city or $.properties.address.city | City name. |
| State | $.traits.address.state or $.properties.address.state | State or province. |
| Address line 1 | $.traits.address.line1 or $.properties.address.line1 | Street address. |
| Address line 2 | $.traits.address.line2 or $.properties.address.line2 | Apartment, suite, or unit. |
| Phone number | $.traits.phone or $.properties.phone | The contact’s phone number. |
Custom fields
To send additional traits beyond the default fields, create Custom Fields in SendGrid Marketing Campaigns before sending data. SendGrid won’t automatically create fields for unrecognized traits.
- In SendGrid, go to Marketing > Custom Fields and create a field for each trait you want to sync.
- In your action configuration, map the trait to a custom field key. The key must match the field name in SendGrid Marketing Campaigns exactly.
For example, if you have a company trait and you’ve created a company Custom Field in SendGrid, you can map $.traits.company to the company key in your action.
If you map a trait to a key that doesn’t exist as a Custom Field in SendGrid, the entire request fails—not just the unrecognized field. Make sure all mapped keys have corresponding Custom Fields in SendGrid.
Recording a userId
SendGrid Marketing Campaigns doesn’t have a built-in userId field. To record a userId in SendGrid, pass it as a trait in your identify calls and create a matching Custom Field in SendGrid.
{
"type": "identify",
"userId": "user-123",
"traits": {
"email": "person@example.com",
"userId": "user-123",
"first_name": "Jane",
"last_name": "Doe"
}
}
Things to know
- Email is the primary identifier. SendGrid uses the email address to find and update existing contacts. Every request must include an email address—without one, the action fails.
- Create Custom Fields in advance. Unlike Customer.io, SendGrid doesn’t auto-create fields. If you send a trait that doesn’t match a Custom Field, the request fails.
- Contact updates aren’t instant. SendGrid processes contact updates asynchronously. Changes may take a few minutes to appear in your SendGrid contact list.
- This integration syncs Marketing Campaigns contacts only. It doesn’t send emails or manage email content. It syncs contact data so you can use SendGrid’s built-in tools for list management and email campaigns.
