Simple nodejs app that polls for Events (Logs) from Mailgun API and sends them as messages to Slack channel using the Incoming Webhooks API
Define following NODE_ENV parameters and run app by calling yarn run.
- MAILGUN_DOMAIN Mailgun domain name to use for polling for events
- MAILGUN_API_KEY Mailgun private API key
- SLACK_WEBHOOK_URL Webhook url created for your slack domain and channel, see Documentation
Allows you to configure Mailgun query options and customize slack message colors. Change the values from config.json:
filterQuery to pass to Mailgun events request.beginandendvalues will be ignored and created at rutime. See Mailgun API referencecolorsColor to use for slack attachments based on Mailgun Event Typepolling_timeValue in seconds to wait between polling calls. Each call will ask for events between timestamp of last fetched result orpolling_timeago, and the next one will happen afterpolling_timehas passed once the results are processed (sent to Slack).