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

Singer Community

Stitch plan

Standard

API availability

Available

Singer GitHub repository

singer-io/tap-sendgrid

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.

  1. Sign into your SendGrid account.
  2. On the dashboard page, click Settings > API Keys.
  3. Click Create API Key.
  4. In the API Key Name field, enter a name for the key. For example: Stitch API key
  5. In the API Key Permissions section, select Restricted Access.
  6. 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
  7. Click Create & View.
  8. 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

  1. Sign into your Stitch account.
  2. On the Stitch Dashboard page, click the Add Integration button.

  3. Click the SendGrid Core icon.

  4. 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.

  5. 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:

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.

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

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.

Replication Method

Key-based Incremental

Primary Key

email

Useful links

blocks schema on GitHub

SendGrid Core API method

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

email

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.

Replication Method

Key-based Incremental

Primary Key

email

Useful links

bounces schema on GitHub

SendGrid Core API method

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

email

STRING

reason

STRING

status

STRING

campaigns

Replication Method

Full Table

Primary Key

id

Useful links

campaigns schema on GitHub

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.

Replication Method

Key-based Incremental

Primary Key

id

Useful links

contacts schema on GitHub

SendGrid Core API method

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

email

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.

Replication Method

Key-based Incremental

Primary Key

email

Useful links

global_suppressions schema on GitHub

SendGrid Core API method

created

INTEGER

email

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.

Replication Method

Full Table

Primary Key

id

Useful links

groups_all schema on GitHub

SendGrid Core API method

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.

Replication Method

Full Table

Primary Key

email

Useful links

groups_members schema on GitHub

SendGrid Core API method

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

email

STRING

group_id

INTEGER

invalids

Replication Method

Key-based Incremental

Primary Key

email

Useful links

invalids schema on GitHub

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

email

STRING

reason

STRING

lists_all

Replication Method

Full Table

Primary Key

id

Useful links

lists_all schema on GitHub

Join lists_all with on
campaigns
lists_all.id = campaigns.list_ids

id

INTEGER

name

STRING

recipient_count

INTEGER

lists_members

Replication Method

Full Table

Primary Key

id

Useful links

lists_members schema on GitHub

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

email

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

Replication Method

Full Table

Primary Key

id

Useful links

segments_all schema on GitHub

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

Replication Method

Key-based Incremental

Primary Key

id

Useful links

segments_members schema on GitHub

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

email

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

Replication Method

Key-based Incremental

Primary Key

email

Useful links

spam_reports schema on GitHub

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

email

STRING

status

STRING

templates_all

Replication Method

Full Table

Primary Key

id

Useful links

templates_all schema on GitHub

id

STRING

name

STRING

versions

ARRAY


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.