This integration is powered by Singer's SendGrid Core tap. For support, visit the GitHub repo or join the Singer Slack.
SendGrid Core integration summary
Stitch’s SendGrid Core integration replicates data using the SendGrid v3 API. Refer to the Schema section for a list of objects available for replication.
SendGrid Core feature snapshot
A high-level look at Stitch's SendGrid Core (v1) integration, including release status, useful links, and the features supported in Stitch.
STITCH | |||
Release status |
Released on June 27, 2018 |
Supported by | |
Stitch plan |
Standard |
API availability |
Available |
Singer GitHub repository | |||
REPLICATION SETTINGS | |||
Anchor Scheduling |
Supported |
Advanced Scheduling |
Supported |
Table-level reset |
Unsupported |
Configurable Replication Methods |
Unsupported |
DATA SELECTION | |||
Table selection |
Supported |
Column selection |
Supported |
Select all |
Supported |
||
TRANSPARENCY | |||
Extraction Logs |
Supported |
Loading Reports |
Supported |
Connecting SendGrid Core
SendGrid Core setup requirements
To set up SendGrid Core in Stitch, you need:
-
Access to the objects you want to replicate from SendGrid. This is required to grant the required permissions to the API key Stitch uses to connect to your SendGrid account.
For example: If you want to replicate campaign data, you need to be able to access campaigns in your SendGrid account.
Step 1: Create a SendGrid general API key for Stitch
Note: You can’t assign an API key greater permissions than you currently have in SendGrid.
- Sign into your SendGrid account.
- On the dashboard page, click Settings > API Keys.
- Click Create API Key.
- In the API Key Name field, enter a name for the key. For example:
Stitch API key
- In the API Key Permissions section, select Restricted Access.
- In the Access Details section, enable the following:
- Email Activity - Read Access
- Marketing Campaigns - Full Access (Note: SendGrid doesn’t currently provide a read-only level for this object.)
- Suppressions - Read Access
- Template Engine - Read Access
- Tracking - Read Access
- Click Create & View.
- The API key will display. Copy the key before closing the page, as SendGrid won’t display it again.
Step 2: Add SendGrid Core as a Stitch data source
- Sign into your Stitch account.
-
On the Stitch Dashboard page, click the Add Integration button.
-
Click the SendGrid Core icon.
-
Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.
For example, the name “Stitch SendGrid Core” would create a schema called
stitch_sendgrid_core
in the destination. Note: Schema names cannot be changed after you save the integration. - In the SendGrid API Key field, paste your SendGrid API key.
Step 3: Define the historical replication start date
The Sync Historical Data setting defines the starting date for your SendGrid Core integration. This means that:
- For tables using Key-based Incremental Replication, data equal to or newer than this date will be replicated to your destination.
- For tables using Full Table Replication, all data - including records that are older, equal to, or newer than this date - will be replicated to your destination.
Change this setting if you want to replicate data beyond SendGrid Core’s default setting of 1 year. For a detailed look at historical replication jobs, check out the Syncing Historical SaaS Data guide.
Step 4: Create a replication schedule
In the Replication Frequency section, you’ll create the integration’s replication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.
SendGrid Core integrations support the following replication scheduling methods:
-
Advanced Scheduling using Cron (Advanced or Premium plans only)
To keep your row usage low, consider setting the integration to replicate less frequently. See the Understanding and Reducing Your Row Usage guide for tips on reducing your usage.
Initial and historical replication jobs
After you finish setting up SendGrid Core, its Sync Status may show as Pending on either the Stitch Dashboard or in the Integration Details page.
For a new integration, a Pending status indicates that Stitch is in the process of scheduling the initial replication job for the integration. This may take some time to complete.
Initial replication jobs with Anchor Scheduling
If using Anchor Scheduling, an initial replication job may not kick off immediately. This depends on the selected Replication Frequency and Anchor Time. Refer to the Anchor Scheduling documentation for more information.
Free historical data loads
The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.
SendGrid Core table reference
Schemas and versioning
Schemas and naming conventions can change from version to version, so we recommend verifying your integration’s version before continuing.
The schema and info displayed below is for version 1 of this integration.
This is the latest version of the SendGrid Core integration.
Table and column names in your destination
Depending on your destination, table and column names may not appear as they are outlined below.
For example: Object names are lowercased in Redshift (CusTomERs
> customers
), while case is maintained in PostgreSQL destinations (CusTomERs
> CusTomERs
). Refer to the Loading Guide for your destination for more info.
blocks
Replication Method : |
Key-based Incremental |
Replication Key |
end_time |
Primary Key |
|
API endpoint : |
The blocks
table contains info about the email addresses currently on your blocks list. There are several causes for blocked emails: A mail server IP address being on an ISP blacklist, blocked by an ISP, or if the receiving server flags the message content.
email
The email address of the blocked email entry. Reference: |
created
The Unix timestamp indicating when the email address was added to the blocks list. |
reason
An explanation for the reason of the block. |
status
The status of the block. |
bounces
Replication Method : |
Key-based Incremental |
Replication Key |
end_time |
Primary Key |
|
API endpoint : |
The bounces
table contains info about bounced emails. A bounced email is when the message is undeliverable and returned to the server that sent it.
email
The email address that bounced. Reference: |
created
The Unix timestamp of the time the bounce occurred. |
reason
An explanation for the reason the email bounced. |
status
The status of the bounce. |
campaigns
Replication Method : |
Key-based Incremental |
Replication Key |
timestamp |
Primary Key |
id |
API endpoint : |
The campaigns
table contains info about all your campaigns.
id
The campaign ID. |
|
title
The display title of the campaign in the SendGrid Marketing Campaigns UI. |
|
subject
The subject of the campaign that recipients will see. |
|
sender_id
The ID of the ‘sender’ identity. Recipients will see this as the “From” on your marketing emails. |
|
list_ids
The IDs of the lists the campaign is being sent to.
|
|
segment_ids
The segment IDs the campaign is being sent to.
|
|
categories
The categories associated with the campaigns.
|
|
suppression_group_id
The ID of the suppression group that the marketing email belongs to, allowing recipients to opt-out of emails of this type. Reference: |
|
custom_unsubscribe_url
The URL of the custom unsubscribe page provided for customers to unsubscribe from suppression groups. |
|
ip_pool
The pool of IPs that the email should be sent from. |
|
html_content
The HTML content of the marketing email. |
|
plain_content
The plain text content of the marketing email. |
|
status
The status of the campaign. For example: |
contacts
Replication Method : |
Key-based Incremental |
Replication Key |
timestamp |
Primary Key |
id |
API endpoint : |
The contacts
table contains info about the contacts in your SendGrid account.
Contact custom fields
Stitch’s SendGrid Core integration will replicate any custom fields associated with contact records.
id
The contact ID. |
|
created_at
The Unix timestamp of the time the contact was created. |
|
updated_at
The Unix timestamp of the last time the contact was updated. |
|
email
The email address associated with the contact. Reference: |
|
last_emailed
The Unix timestamp of the last time the contact was emailed. |
|
last_clicked
The Unix timestamp of the last time the contact clicked on an email. |
|
last_opened
The Unix timestamp of the last time the contact opened an email. |
|
first_name
The first name of the contact. |
|
last_name
The last name of the contact. |
|
custom_fields
The custom fields associated with the contact.
|
global_suppressions
Replication Method : |
Key-based Incremental |
Replication Key |
end_time |
Primary Key |
|
API endpoint : |
The global_suppressions
table contains info about global suppressions, or global unsubscribes. Recipients who are globally suppressed will be removed from any email you send.
email
The email address of the recipient who is globally suppressesd. Reference: |
created
The Unix timestamp of the time the recipient was added to the global suppression list. |
groups_all
Replication Method : |
Full Table |
Primary Key |
id |
API endpoint : |
The groups_all
table contains info about the groups in your SendGrid account. Groups are specific types of email you want your recipients to be able to unsubscribe from or subscribe to. For example: Newsletters, Invoices, Alerts, etc.
id
The ID of the suppression group. Reference: |
name
The name of the suppression group. |
description
A description of the suppression group. |
last_email_sent_at
The Unix timestamp of when the suppression group was last emailed. |
is_default
If |
unsubscribes
The number of unsubscribes associated with the group. |
group_members
Replication Method : |
Full Table |
Primary Key |
|
API endpoint : |
The group_members
table contains a list of email
and group_id
pairs, allowing you to identify recipients and the groups they are members of.
email
The email address of the recipient. Reference: |
group_id
The ID of the group the recipient is a member of. Reference: |
invalids
Replication Method : |
Key-based Incremental |
Replication Key |
end_time |
Primary Key |
|
API endpoint : |
The invalids
table contains info about invalid email addresses. An invalid email occurs when you attempt to send an email to an address that is formatted in a manner that doesn’t meet internet email format standards, or the email doesn’t exist at the recipient’s email server.
For example: Email addresses that don’t include the @
symbol.
email
The email address marked as invalid. Reference: |
created
The Unix timestamp of when the email address was added to the invalid emails list. |
reason
The reason the email address was marked as invalid. For example: |
lists_all
Replication Method : |
Full Table |
Primary Key |
id |
API endpoint : |
The lists_all
table contains info about your recipient lists.
id
The list ID. Reference: |
name
The name of the list. |
recipient_count
The current number of recipients currently in the list. |
lists_members
Replication Method : |
Full Table |
Primary Key |
id |
API endpoint : |
The lists_members
table contains info about members of your lists.
List member custom fields
Stitch’s SendGrid Core integration will replicate any custom fields associated with list member records.
id
The ID of the list member. |
|
created_at
The Unix timestamp of the time the list member was added to the list. |
|
updated_at
The Unix timestamp of the last time the list member was updated. |
|
email
The email address of the list member. Reference: |
|
list_id
The ID of the list the member belongs to. Reference: |
|
last_emailed
The Unix timestamp of the last time the list member was emailed by one of your campaigns. |
|
last_clicked
The Unix timestamp of the last time the list member clicked a link from one of your campaigns. |
|
last_opened
The Unix timestamp of the last time the list member last opened an email from one of your campaigns. |
|
first_name
The first name of the list member. |
|
last_name
The last name of the list member. |
|
custom_fields
The custom fields associated with the list member.
|
segments_all
Replication Method : |
Full Table |
Primary Key |
id |
API endpoint : |
The segments_all
table contains info about the segments in your SendGrid account, and the conditions required for recipients to be added to the segment.
For example: A segment for recipients with email addresses that contain @stitchdata.com
id
The segment ID. Reference: |
||||
name
The name of the segment. |
||||
recipient_count
The current number of recipients in the segment. |
||||
conditions
Details about the conditions a recipient must meet to be included in the segment. For example: To be included on a segment for Stitch, email addresses must contain
|
segments_members
Replication Method : |
Full Table |
Primary Key |
id |
API endpoint : |
The segments_members
table contains info about the members of your segments.
Segment member custom fields
Stitch’s SendGrid Core integration will replicate any custom fields associated with segment member records.
id
The ID of the segment member. |
|
created_at
The Unix timestamp of the time the segment member was added to the segment. |
|
updated_at
The Unix timestamp of the last time the segment member was updated. |
|
email
The email address of the segment member. Reference: |
|
segment_id
The ID of the segment the member belongs to. Reference: |
|
last_emailed
The Unix timestamp of the last time the segment member was emailed by one of your campaigns. |
|
last_clicked
The Unix timestamp of the last time the segment member clicked a link from one of your campaigns. |
|
last_opened
The Unix timestamp of the last time the segment member last opened an email from one of your campaigns. |
|
first_name
The first name of the segment member. |
|
last_name
The last name of the segment member. |
|
custom_fields
The custom fields associated with the segment member.
|
spam_reports
Replication Method : |
Key-based Incremental |
Replication Key |
end_time |
Primary Key |
|
API endpoint : |
The spam_reports
table contains info about spam reports made against your messages. Spam reports occur when a recipient indicates they think your message is spam, which their email provider then reports to SendGrid.
email
The email address of the recipient who marked the message as spam. Reference: |
created
The Unix timestamp of the time the spam report was made. |
status
The status of the spam report. |
templates_all
Replication Method : |
Full Table |
Primary Key |
id |
API endpoint : |
The templates_all
table contains info about the transactional templates in your SendGrid account. Transactional templates are templates specifically created for transactional email and are different than Marketing Campaign templates.
id
The template ID. |
|||||||
name
The name of the template. |
|||||||
versions
Details about each version of the template, if the template is versioned.
|
Related | Troubleshooting |
Questions? Feedback?
Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.