Sendgrid-python: Create a Dockerized event webhook consumer

Created on 7 Oct 2018  路  7Comments  路  Source: sendgrid/sendgrid-python

Issue Summary

SendGrid has an Event Webhook which posts events related to your email activity to a URL of your choice. We want to have an easily deployable solution that allows for customers to easiy get up and running processing (parse and save) their event webhooks.

Acceptance Criteria

  • A folder which contains a Dockerized solution
  • Example documentation on how to deploy locally and start processing events
  • Example documentation on how to deploy on at least one cloud service and start processing events
  • An example complete payload with a test to verify the data is parsed properly
very hard hacktoberfest invalid sendgrid enhancement

Most helpful comment

@Taiters another idea is to just dump the data to a file in a mounted volume?

All 7 comments

I'd be interested in picking this up, however I'd like to confirm what "save" means in this context? Would outputting the parsed events to a web page be sufficient? Or should this plug into a separate database which the customer could be running to persist the events?

Hello @Taiters,

I think either of your proposed solutions would be sufficient. The goal is to get someone up and running ASAP to start experimenting or use this as a reference implementation for their own custom solution.

Thanks for taking this on!

With Best Regards,

Elmer

Note that we do have much of this code ready, hopefully that will help: https://github.com/sendgrid/sendgrid-python/tree/master/sendgrid/helpers/inbound

Perfect, sounds good. I can start on this this afternoon

@Taiters another idea is to just dump the data to a file in a mounted volume?

Hey, I've opened a WIP PR with a basic webhook consumer. It currently just prints the events to stdout and writes them as json lines to a file.

Let me know if there's a specific directory you'd like this in as it's currently just under /events in the repo.

Closing this issue as the v4 branch is no longer being maintained.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DougCal picture DougCal  路  3Comments

hugomallinson picture hugomallinson  路  3Comments

hanhaa picture hanhaa  路  4Comments

thinkingserious picture thinkingserious  路  3Comments

thinkingserious picture thinkingserious  路  5Comments