Skip to content

๐Ÿ’Œ A simple lambda function that can be used to transfer SendGrid event data to Mixpanel pings.

Notifications You must be signed in to change notification settings

weilandia/sendgrid-webhook-to-mixpanel-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SendGrid Event Webhook to Mixpanel Lambda Function

A simple lambda function that can be used to transfer SendGrid event data to Mixpanel pings.

Getting Started

  1. To get started, you'll need the Serverless Framework installed. You'll also need your environment configured with AWS credentials.

  2. Recommended: Map relevant Mixpanel characteristics to SendGrid SMTP API unique_args for the emails you are sending through SendGrid.

  3. Add the MIXPANEL_TOKEN env var for each environment to serverless.env.yml.

  dev:
    MIXPANEL_TOKEN: "DEV TOKEN"
  staging:
    MIXPANEL_TOKEN: "STAGING TOKEN"
  prod:
    MIXPANEL_TOKEN: "PROD TOKEN"
  1. Add your AWS credentials profile to serverless.yml.

  2. Deploy.

  sls deploy --stage prod
  1. Setup the SendGrid Event Webhook with the lambda endpoint.
  HTTP POST URL

  https://EXAMPLE.execute-api.us-east-1.amazonaws.com/dev/mixpanel_sendgrid_events
  1. ๐ŸŽ‰ SendGrid event data is in Mixpanel and I don't have to run the webhook through our app!

About

๐Ÿ’Œ A simple lambda function that can be used to transfer SendGrid event data to Mixpanel pings.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages