All Projects → wildbit → Postmark_webhooks

wildbit / Postmark_webhooks

Licence: mit
Lightweight quickstart app for receiving and processing webhooks from Postmark

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Postmark webhooks

github-release-notifier
Automatize tasks when a specific package got a new release - Github Release Notifier
Stars: ✭ 21 (+50%)
Mutual labels:  webhooks, webhook
telegram-bot-tutorial
Telegram bot tutorial using python and flask
Stars: ✭ 44 (+214.29%)
Mutual labels:  heroku, webhook
Self-Hosted-Asp.Net-WebHooks
Self hosted custom webhook receiver and sender
Stars: ✭ 50 (+257.14%)
Mutual labels:  webhooks, webhook
Achievibit
Github Gamification - Achievements system as a GitHub WebHook.
Stars: ✭ 93 (+564.29%)
Mutual labels:  webhook, webhooks
Taviloglu.Wrike.ApiClient
.NET Client for Wrike API
Stars: ✭ 24 (+71.43%)
Mutual labels:  webhooks, webhook
plaxt
Webhooks based Trakt.tv scrobbling for Plex
Stars: ✭ 20 (+42.86%)
Mutual labels:  heroku, webhook
tcWebHooks
WebHooks plugin for Teamcity. Supports many build states and payload formats.
Stars: ✭ 128 (+814.29%)
Mutual labels:  webhooks, webhook
Skyhook
Parses webhooks and forwards them in the proper format to Discord.
Stars: ✭ 263 (+1778.57%)
Mutual labels:  heroku, webhook
iris
Watch on Kubernetes events, filter and send them as standard wehbook to any system
Stars: ✭ 57 (+307.14%)
Mutual labels:  webhooks, webhook
discord-twitter-webhooks
🤖 Stream tweets to Discord
Stars: ✭ 47 (+235.71%)
Mutual labels:  webhooks, webhook
sre.surmon.me
💻 SRE service for Surmon.me blog.
Stars: ✭ 34 (+142.86%)
Mutual labels:  webhooks, webhook
Webhook
webhook is a lightweight incoming webhook server to run shell commands
Stars: ✭ 7,201 (+51335.71%)
Mutual labels:  webhook, webhooks
Twitch misc
Misc. Twitch bits and pieces
Stars: ✭ 26 (+85.71%)
Mutual labels:  webhooks
Heroku Wp
WordPress on Heroku
Stars: ✭ 865 (+6078.57%)
Mutual labels:  heroku
Java Fbchatbot
Messenger webhook implementation in java with jetty, contracts of facebook messenger webhook
Stars: ✭ 24 (+71.43%)
Mutual labels:  webhook
Heroku Connect Plugin
CLI plugin for Heroku Connect (experimental)
Stars: ✭ 23 (+64.29%)
Mutual labels:  heroku
Node Js Getting Started
Getting Started with Node on Heroku
Stars: ✭ 872 (+6128.57%)
Mutual labels:  heroku
Snipcart Craft Webhooks Plugin
Sample plugin to allow inventory management in a Craft application using Snipcart
Stars: ✭ 11 (-21.43%)
Mutual labels:  webhooks
Github To S3 Lambda Deployer
⚓️ GitHub webhook extension for uploading static pages to AWS S3 directly after commiting to master via Lambda written in Node.js
Stars: ✭ 23 (+64.29%)
Mutual labels:  webhook
Pingmydyno
Keep Heroku dynos awake forever ☕️
Stars: ✭ 22 (+57.14%)
Mutual labels:  heroku

Deploy

Postmark Webhooks Logo

Postmark Hooks

Brought to you by Postmark

About

This project is a quick start app you can use to host your own URLs for receiving, storing, processing, and viewing webhooks sent from Postmark. It is written in Meteor.js due to the framework's ability to quickly display server side data without needing a refresh in the browser. Be sure to read the Postmark webhooks documentation. Use the deploy to Heroku button (you can host it somewhere else if you want, like Galaxy) and begin taking advantage of Postmark's Open tracking webhook, Bounce webhook, Click webhook, Delivery Webhook, and Inbound webhook.

If you have not already done so, sign up for a Postmark account here.

alt tag

Features

  • Receive webhook POSTs (well formatted JSON) from Postmark for Bounces, Opens, Clicks, Delivery events, and Inbound messages, with minimal development/configuration effort on your part.
  • Automatically send notification emails (using Postmark) to yourself and/or others when you receive a new bounce, open, click, delivery event, or inbound message.
  • Searchable so you can easily find and view details of a specific bounce, open event, click event, delivery event, or inbound message.

Prerequisites

Getting Started

  • Use the Deploy to Heroku button at the top of this page to quickly host your own instance of the app.
  • Be sure to add a custom name for the app, rather than use one generated by Heroku:

alt tag

  • Use the custom name to enter in your ROOT_URL for the Heroku app:

alt tag

  • Once you have entered in your custom name and ROOT_URL, you can proceed to deploy the app to Heroku by clicking Deploy for Free. Once completed, click View to open your new app on the web.

alt tag

Configure Postmark Account

Our next step is to configure our server(s) in Postmark with the new URLs we have available for receiving webhooks. Setting these URLs tells in Postmark determines where to send the webhook events. Use the following URLs, where yourappname.herokuapp.com is replaced with your webhook receiving app's root domain.

Set URL for each webhook type

From your server's Webhooks tab in Postmark, follow these steps for each webhook type you want to use.

  1. Click Add webhook

alt tag

  1. Enter in the appropriate URL for that event (use your Bounces webhook URL when setting up the Bounces webhook, for example).

alt tag

  1. Click Save webhook

Included Heroku Add-On(s)

Deploying to Heroku sets you up with an mLab MongoDB account with their free sandbox plan. You can upgrade your mLab MongoDB plan in Heroku if you need additional storage. Upgrade your mLab MongoDB plan if you plan to use this heavily in production as their sandbox instances do not include redundancy for their databases.

Built With

Security

  • Only Postmark's listed IPs for webhooks can POST to URLs built by this app. Any other received request is ignored and no document is added to the collections in the database.
  • Received data is also validated against a schema to ensure appropriate data received and stored as a document in its associated collection.
  • Insecure removed so the database cannot be accessed from the client (browser dev tools)
  • Option to receive notification emails if an unauthorized source attempts to post to your URL

Modifying Your Application's Codebase

Once you have deployed your own instance of the application to Heroku, you will need to get a local version of the repository where you can make edits and push back to Heroku. If you simply clone your Heroku app's repo, you will end up with an empty repository locally. You can get a local copy of the source code using the following commands:

  1. heroku git:clone -a YourAppName
  2. cd YourAppName
  3. git remote add origin https://github.com/pgraham3/postmark_webhooks
  4. git pull origin master

Once you have the local repo for your application, you can then make changes and commit them in the usual fashion. When you are ready to push your local changes to your Heroku application, use this command:

git push heroku master

Customize Your Notification Settings

In addition to receiving and processing Postmark webhooks, this app also allows for you to send emails using Postmark when you receive a bounce, open event, delivery event, or inbound message.

Grab the Server API Token for the Server you wish to send notifications from in Postmark (found in Credentials when viewing the server in Postmark) and add it as a Heroku config variable named POSTMARK_API_TOKEN. You can do this in the Heroku UI Settings for your app or using this command from the Heroku CLI:

heroku config:set POSTMARK_API_TOKEN=YourTokenValue

You can then send emails based on the following events:

  • Bounce received
  • Inbound Message received
  • Open Event received
  • Click Event received
  • Delivery Event received
  • Unauthorized (not from Postmark's IP addresses) POST received to one of your webhook URLs

Open up server/settings.js to view and modify the settings.

By default, notifications will not be sent for events unless you enable them by changing their value to true. Sending notifications for events can be turned on/off for each of these event types by changing these fields to true/false:

  • SendBouncesNotifications (for bounces)
  • SendOpensNotifications (for open events)
  • SendClicksNotifications (for click events)
  • SendInboundNotifications (for inbound messages)
  • SendViolationsNotifications (for unauthorized POSTs to your URLs)
{
  "SendBouncesNotifications": false,
  "SendOpensNotifications": false,
  "SendClicksNotifications": false,
  "SendInboundNotifications": false,
  "SendDeliveredNotifications": false,
  "SendViolationsNotifications": false,
  "SendBouncesToSender": false,
  "BouncesFromEmailAddress": "[email protected]",
  "OpensFromEmailAddress": "[email protected]",
  "ClicksFromEmailAddress": "[email protected]",
  "InboundFromEmailAddress": "[email protected]",
  "DeliveredFromEmailAddress": "[email protected]",
  "OpensToEmailAddress": "[email protected]",
  "ClicksToEmailAddress": "[email protected]",
  "InboundToEmailAddress": "[email protected]",
  "BouncesToEmailAddress": "[email protected]",
  "DeliveredToEmailAddress": "[email protected]",
  "ViolationsFromEmailAddress": "[email protected]",
  "ViolationsToEmailAddress": "[email protected]"
}

Set the From email addresses for your notifications to email addresses that you have added as Sender Signatures or are on your verified domains in Postmark to be sure you are able to send notification emails. These notification emails can be sent to any recipient.

Note on Inbound Message Size Limits

MongoDB has an inherent limit of ~16.8 MB, which means documents (entries in a MongoDB collection) cannot be larger than this amount. If you receive an inbound webhook notification larger than 16.8 MB due to attachment size, it will not be stored in your collection or display in the Inbound tab and you will see a MongoDB error in your Heroku Logs:

Error: Document exceeds maximum allowed bson size of 16777216 bytes

Authors

  • Patrick Graham

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Meteor Community
  • Mark Otto | Bootstrap
  • Tom Coleman | Iron Router & Atmosphere
  • Matteo De Micheli | Easy Search
  • Charlie DeTar | Meteor.js buildpack for Heroku
  • Rico Sta. Cruz | NProgress
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].