Linking SendGrid as a source
This source is currently in alpha. The interface and available tables may change.
Enter your SendGrid API key to pull your SendGrid data into the PostHog data warehouse.
Adding a data source
- Go to the sources tab of the data pipeline section in PostHog.
- Click + New source and then click Link next to SendGrid.
- You need an API key from SendGrid. Create one in your SendGrid account settings under Settings → API Keys. Grant the following read access (Restricted Access) so the key can reach the data you want to sync:
- Suppressions — bounces, blocks, invalid emails, spam reports, global unsubscribes, unsubscribe groups
- Marketing — marketing lists
- Template Engine — templates
- Back in PostHog, paste the key in the
API keyfield and click Next. - Select the tables you want to sync, set the sync method and frequency, then click Import.
Once the syncs are complete, you can start using SendGrid data in PostHog.
Available tables
| Table | Description | Sync method |
|---|---|---|
bounces | Suppressed addresses that hard or soft bounced | Incremental |
blocks | Addresses blocked from receiving mail | Incremental |
invalid_emails | Addresses rejected as invalid | Incremental |
spam_reports | Recipients who marked your mail as spam | Incremental |
global_unsubscribes | Globally unsubscribed addresses | Incremental |
unsubscribe_groups | Unsubscribe (suppression) groups | Full refresh |
marketing_lists | Marketing contact lists | Full refresh |
templates | Email templates (legacy and dynamic) | Full refresh |
Incremental tables sync only new or updated records on each run. Full refresh tables reload all data on each sync.
Configuration
| Option | Type | Required |
|---|---|---|
API key | password | Yes |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
bounces | Email addresses that bounced — the receiving server rejected the message. | Incremental, Full refresh | created | — |
blocks | Email addresses blocked due to temporary delivery issues such as a full mailbox or server outage. | Incremental, Full refresh | created | — |
invalid_emails | Email addresses that are invalid or malformed and cannot receive mail. | Incremental, Full refresh | created | — |
spam_reports | Email addresses of recipients who marked your mail as spam. | Incremental, Full refresh | created | — |
global_unsubscribes | Email addresses on the global unsubscribe list, suppressed from all future mail. | Incremental, Full refresh | created | — |
unsubscribe_groups | Suppression (unsubscribe) groups used to let recipients opt out of specific categories of mail. | Full refresh | — | — |
marketing_lists | Marketing contact lists used to segment recipients for campaigns. | Full refresh | — | — |
templates | Email templates (legacy and dynamic) used to compose messages. | Full refresh | — | — |