> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dittofeed.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SendGrid Integration

Dittofeed can integrate with SendGrid to send emails.

## Integration Instructions

Visit the SendGrid API Keys page [https://app.sendgrid.com/settings/api\_keys](https://app.sendgrid.com/settings/api_keys).

Click "Create API Key", then select "Restricted Access". Grant "Full Access" in the following categories.

* Mail Send
* Mail settings
* Tracking

Then grant "Read Access" in the following categories.

* Stats

<Frame>
  <img src="https://mintcdn.com/dittofeed/abmbv2I9puhRd1Zb/images/sendgrid-api-access.png?fit=max&auto=format&n=abmbv2I9puhRd1Zb&q=85&s=3307f73b763b18fb16f7d8703ba7d3f1" alt="SendGrid API Access" width="2022" height="1804" data-path="images/sendgrid-api-access.png" />
</Frame>

Click "Create & View". You will then be directed to a page containing your API key.

Add that same API key to Dittofeed on the settings page `/dashboard/settings#email-channel`.

<Frame>
  <img src="https://mintcdn.com/dittofeed/abmbv2I9puhRd1Zb/images/sendgrid-config.png?fit=max&auto=format&n=abmbv2I9puhRd1Zb&q=85&s=b79eff4d47418bca387400d377d88583" alt="Sendgrid Config" width="3680" height="2382" data-path="images/sendgrid-config.png" />
</Frame>

Finally, select SendGrid as your default email provider.

<Frame>
  <img src="https://mintcdn.com/dittofeed/abmbv2I9puhRd1Zb/images/sendgrid-provider.png?fit=max&auto=format&n=abmbv2I9puhRd1Zb&q=85&s=d08f0004eb2e84505d365bb77dd391dd" alt="Sendgrid Provider" width="3680" height="2382" data-path="images/sendgrid-provider.png" />
</Frame>

That's it! At this point you should be able send emails with Dittofeed and SendGrid.

## Tracking

In order to receive sendgrid tracking data, you have to create a webhook in SendGrid.

Go to the Webhook settings page. [https://app.sendgrid.com/settings/mail\_settings/webhook\_settings](https://app.sendgrid.com/settings/mail_settings/webhook_settings)

<img src="https://mintcdn.com/dittofeed/abmbv2I9puhRd1Zb/images/sendgrid-webhook.png?fit=max&auto=format&n=abmbv2I9puhRd1Zb&q=85&s=99ddccb0bff893f2c429dd0f762107ac" alt="SendGrid Webhook Settings" width="3680" height="2262" data-path="images/sendgrid-webhook.png" />

Create a new webhook with the following actions to be posted.

* Opened
* Clicked
* Spam Reports
* Dropped
* Bounced
* Delivered
* Processed

With the Post URL `https://app.dittofeed.com/api/public/webhooks/sendgrid` or your own custom domain if you're self-hosting.

Enable the "Signature Verification" feature. Save the webhook.

<Frame>
  <img src="https://mintcdn.com/dittofeed/abmbv2I9puhRd1Zb/images/sendgrid-new-webhook.png?fit=max&auto=format&n=abmbv2I9puhRd1Zb&q=85&s=a0890eae55e907ff4e95b0220d50ffa2" alt="Sendgrid New Webhook" width="3680" height="2240" data-path="images/sendgrid-new-webhook.png" />
</Frame>

Now, re-open the webhook's settings. You should see your "Verification Key".

<Frame>
  <img src="https://mintcdn.com/dittofeed/abmbv2I9puhRd1Zb/images/sendgrid-webhook-verification-key.png?fit=max&auto=format&n=abmbv2I9puhRd1Zb&q=85&s=d5d29df8bbe0e1c5c13f15fda37a5490" alt="Sendgrid Webhook Verification Key" width="1192" height="598" data-path="images/sendgrid-webhook-verification-key.png" />
</Frame>

Copy that key and paste it into Dittofeed's settings page in the "Webhook Key" field `/dashboard/settings#email-title` and click save.

<Frame>
  <img src="https://mintcdn.com/dittofeed/abmbv2I9puhRd1Zb/images/sendgrid-config.png?fit=max&auto=format&n=abmbv2I9puhRd1Zb&q=85&s=b79eff4d47418bca387400d377d88583" alt="Sendgrid Config" width="3680" height="2382" data-path="images/sendgrid-config.png" />
</Frame>

Here's a video showing the full setup.

<iframe class="w-full aspect-video" src="https://www.youtube.com/embed/oxtC9NId2T8?si=g16Vd9iItcbZ-Ip9" title="Integrating SendGrid with Dittofeed to Automate Emails" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />
