> Source: https://help.wastenot.io/connectors/sendgrid

# Twilio SendGrid

Connect Twilio SendGrid to WasteNot to sync recent email delivery, open, and click activity. Use this data to build audiences that reflect how customers interact with your transactional email.

WasteNot uses SendGrid's Email Activity API message summaries. It reads the latest message activity and maps delivered, not-delivered, opened, and clicked messages into audience-rule events.

## Prerequisites

Before connecting SendGrid, you will need:

* A Twilio SendGrid account
* Email Activity access enabled for your SendGrid account
* A SendGrid API key with Email Activity access

> **Note:**
>
> SendGrid may require additional Email Activity history access on your plan. If
> the API key is valid but no activity appears, confirm that Email Activity is
> available in your SendGrid account.

## Connecting SendGrid

### Step 1: Create a SendGrid API key

1. Log in to your [Twilio SendGrid account](https://app.sendgrid.com/settings/api_keys)
2. Go to **Settings > API Keys**
3. Create a new API key
4. Give the key a clear name, such as "WasteNot Integration"
5. Grant the key access to Email Activity
6. Copy the API key

> **Note:**
>
> SendGrid only shows the API key value when it is created. Copy it before
> leaving the page.

### Step 2: Connect SendGrid in WasteNot

1. [Add a new SendGrid data source](https://app.wastenot.io/integrations/connectors/new/sendgrid)
   in WasteNot
2. Enter a **Name**
3. Paste your SendGrid **API Key**
4. Click **Connect**

WasteNot saves the data source, then checks the API key before sync work runs.

## What gets synced

WasteNot syncs recent SendGrid message summaries into these event streams:

* **Delivered** — messages with a delivered status
* **Not delivered** — messages with a not-delivered status
* **Opened** — messages with one or more recorded opens
* **Clicked** — messages with one or more recorded clicks

Each event is keyed by the recipient's email address, so you can use recent SendGrid delivery and engagement in audience rules.

## Frequently asked questions

### Why am I only seeing recent message activity?

WasteNot reads recent SendGrid Email Activity message summaries. The available history depends on your SendGrid account's Email Activity access and retention.

### My data source shows "Failed" status

Common causes:

* The API key was copied incorrectly
* The API key was deleted or rotated in SendGrid
* The API key does not have Email Activity access
* Email Activity history is not enabled for your SendGrid account

Create a new SendGrid API key if needed, then update the data source in [Data Sources](https://app.wastenot.io/integrations).
