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 data equal to or newer than this date will be replicated to your data warehouse.
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
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.
Key-based Incremental |
|
Primary Key |
|
Useful links |
Join blocks with | on |
---|---|
bounces |
blocks.email = bounces.email |
contacts |
blocks.email = contacts.email |
groups_members |
blocks.email = groups_members.email |
invalids |
blocks.email = invalids.email |
lists_members |
blocks.email = lists_members.email |
segments_members |
blocks.email = segments_members.email |
spam_reports |
blocks.email = spam_reports.email |
created INTEGER |
STRING |
reason STRING |
status STRING |
bounces
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.
Key-based Incremental |
|
Primary Key |
|
Useful links |
Join bounces with | on |
---|---|
blocks |
bounces.email = blocks.email |
contacts |
bounces.email = contacts.email |
groups_members |
bounces.email = groups_members.email |
invalids |
bounces.email = invalids.email |
lists_members |
bounces.email = lists_members.email |
segments_members |
bounces.email = segments_members.email |
spam_reports |
bounces.email = spam_reports.email |
created INTEGER |
STRING |
reason STRING |
status STRING |
campaigns
Full Table |
|
Primary Key |
id |
Useful links |
Join campaigns with | on |
---|---|
lists_all |
campaigns.list_ids = lists_all.id |
segments_all |
campaigns.segment_ids = segments_all.id |
segments_members |
campaigns.segment_ids = segments_members.segment_id |
groups_members |
campaigns.suppression_group_id = groups_members.group_id |
categories ARRAY |
custom_unsubscribe_url STRING |
html_content STRING |
id INTEGER |
ip_pool STRING |
list_ids ARRAY |
plain_content STRING |
segment_ids ARRAY |
sender_id INTEGER |
status STRING |
subject STRING |
suppression_group_id INTEGER |
title STRING |
contacts
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.
Key-based Incremental |
|
Primary Key |
id |
Useful links |
Join contacts with | on |
---|---|
blocks |
contacts.email = blocks.email |
bounces |
contacts.email = bounces.email |
groups_members |
contacts.email = groups_members.email |
invalids |
contacts.email = invalids.email |
lists_members |
contacts.email = lists_members.email |
segments_members |
contacts.email = segments_members.email |
spam_reports |
contacts.email = spam_reports.email |
created_at INTEGER |
custom_fields ARRAY |
STRING |
first_name STRING |
id STRING |
last_clicked INTEGER |
last_emailed INTEGER |
last_name STRING |
last_opened INTEGER |
updated_at INTEGER |
global_suppressions
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.
Key-based Incremental |
|
Primary Key |
|
Useful links |
created INTEGER |
STRING |
groups_all
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.
Full Table |
|
Primary Key |
id |
Useful links |
description STRING |
id INTEGER |
is_default BOOLEAN |
last_email_sent_at INTEGER |
name STRING |
unsubscribes INTEGER |
groups_members
The groups_members
table contains a list of email
and group_id
pairs, allowing you to identify recipients and the groups they are members of.
Full Table |
|
Primary Key |
|
Useful links |
Join groups_members with | on |
---|---|
blocks |
groups_members.email = blocks.email |
bounces |
groups_members.email = bounces.email |
contacts |
groups_members.email = contacts.email |
invalids |
groups_members.email = invalids.email |
lists_members |
groups_members.email = lists_members.email |
segments_members |
groups_members.email = segments_members.email |
spam_reports |
groups_members.email = spam_reports.email |
campaigns |
groups_members.group_id = campaigns.suppression_group_id |
STRING |
group_id INTEGER |
invalids
Key-based Incremental |
|
Primary Key |
|
Useful links |
Join invalids with | on |
---|---|
blocks |
invalids.email = blocks.email |
bounces |
invalids.email = bounces.email |
contacts |
invalids.email = contacts.email |
groups_members |
invalids.email = groups_members.email |
lists_members |
invalids.email = lists_members.email |
segments_members |
invalids.email = segments_members.email |
spam_reports |
invalids.email = spam_reports.email |
created INTEGER |
STRING |
reason STRING |
lists_all
Full Table |
|
Primary Key |
id |
Useful links |
Join lists_all with | on |
---|---|
campaigns |
lists_all.id = campaigns.list_ids |
id INTEGER |
name STRING |
recipient_count INTEGER |
lists_members
Full Table |
|
Primary Key |
id |
Useful links |
Join lists_members with | on |
---|---|
blocks |
lists_members.email = blocks.email |
bounces |
lists_members.email = bounces.email |
contacts |
lists_members.email = contacts.email |
groups_members |
lists_members.email = groups_members.email |
invalids |
lists_members.email = invalids.email |
segments_members |
lists_members.email = segments_members.email |
spam_reports |
lists_members.email = spam_reports.email |
created_at INTEGER |
custom_fields ARRAY |
STRING |
first_name STRING |
id STRING |
last_clicked INTEGER |
last_emailed INTEGER |
last_name STRING |
last_opened INTEGER |
list_id INTEGER |
updated_at INTEGER |
segments_all
Full Table |
|
Primary Key |
id |
Useful links |
Join segments_all with | on |
---|---|
campaigns |
segments_all.id = campaigns.segment_ids |
segments_members |
segments_all.id = segments_members.segment_id |
conditions ARRAY |
id INTEGER |
name STRING |
recipient_count INTEGER |
segments_members
Key-based Incremental |
|
Primary Key |
id |
Useful links |
Join segments_members with | on |
---|---|
blocks |
segments_members.email = blocks.email |
bounces |
segments_members.email = bounces.email |
contacts |
segments_members.email = contacts.email |
groups_members |
segments_members.email = groups_members.email |
invalids |
segments_members.email = invalids.email |
lists_members |
segments_members.email = lists_members.email |
spam_reports |
segments_members.email = spam_reports.email |
segments_all |
segments_members.segment_id = segments_all.id |
campaigns |
segments_members.segment_id = campaigns.segment_ids |
created_at INTEGER |
custom_fields ARRAY |
STRING |
first_name STRING |
id STRING |
last_clicked INTEGER |
last_emailed INTEGER |
last_name STRING |
last_opened INTEGER |
segment_id INTEGER |
updated_at INTEGER |
spam_reports
Key-based Incremental |
|
Primary Key |
|
Useful links |
Join spam_reports with | on |
---|---|
blocks |
spam_reports.email = blocks.email |
bounces |
spam_reports.email = bounces.email |
contacts |
spam_reports.email = contacts.email |
groups_members |
spam_reports.email = groups_members.email |
invalids |
spam_reports.email = invalids.email |
lists_members |
spam_reports.email = lists_members.email |
segments_members |
spam_reports.email = segments_members.email |
created INTEGER |
STRING |
status STRING |
templates_all
Full Table |
|
Primary Key |
id |
Useful links |
id STRING |
name STRING |
versions ARRAY |
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.