This article describes how to use the SendGrid data source to create a webhook in your SendGrid account to send actionable events into EventStream.
In this article:
SendGrid offers a webhook API that sends outgoing requests to an endpoint that you specify. These requests act like push notifications to EventStream to inform it about things that happened in your SendGrid account. When you add the SendGrid data source in the UDH, a unique endpoint will be generated that you will use to configure Event notifications in your SendGrid account.
The SendGrid data source generates a unique URL to use as the HTTP POST URL in your SendGrid configuration. The generated URL is in the format of:
Add the SendGrid data source before proceeding. (Learn how to add a data source)
Once you have your data source endpoint you can proceed to your SendGrid account to create the webhook.
All incoming SendGrid events are automatically converted to event attributes prefixed and underscored with
sendgrid_. For example, when the SendGrid webhook sends
smpt-id, the matching event attribute is
See the full list of webhook events and attributes generated by SendGrid:
|sendgrid_event||String||"processed", "dropped", "delivered", "deferred", "bounce", "click", "spamreport", "unsubscribe", "group_resubscribe", or "group_unsubscribe"|
|sendgrid_reason||String||"500 unknown recipient"|
|sendgrid_response||String||"400 try again later"|
|sendgrid_useragent||String||"Mozilla/4.0 (compatible; MSIE 6.1; Windows XP; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"|