Documentation / Product / Integrations / SendGrid

SendGrid: Configuring Webhooks

Lytics highly recommends setting up SendGrid event notifications to post event data to the Lytics. This will allow Lytics to get real-time activity data such as clicks, opens, etc. on your marketing campaigns and transactional emails. If you are running the SendGrid Import Audiences, the job will configure webhooks for you. However if you want to set them up manually, or you had previously configured webhooks to send to another system, you may need to update your settings.

Lytics requires that webhooks are enabled to use SendGrid Experiences as part of the Lytics Canvas because it allows for the collection of reporting metrics for your SendGrid Experiences.

To set up event notifications to go to Lytics, you will need to have a Lytics API token ready, you can read how to generate a new API token if you do not already have one. Then follow these steps:

  1. Login to your SendGrid account.
  2. Navigate to Mail Settings under the Settings menu.
  3. Click on Event Notification to open your webhook settings.
  4. Click edit in the top right corner to change your event notification settings.
  5. In the HTTP POST URL textbox, enter the following URL:{API_TOKEN} Replace {API_TOKEN} with your Lytics API token.
  6. Under Select Actions check the boxes for the events you would like to recieve in Lytics. You may select All, or the following event types are recommended for collection:
    • Dropped
    • Delivered
    • Bounced
    • Opened
    • Clicked
    • Unsubscribed From
    • Mark as Spam
    • ASM Group Unsubscribe
    • ASM Group Resubscribe
  7. Once you've selected event types, click the check mark button in the top right corner. Then make sure you toggle the button in the left-hand corner to On. Screenshot from 2019-05-24 16-22-11

Lytics will then receive real-time event data to the sendgrid_webhooks stream. If you've run the SendGrid Import Audiences job, default mapping is automatically provided. Otherwise, contact Lytics support to add the mappings for SendGrid activity in your account.