Mailgun Trigger

Start the workflow on a Mailgun event, such as delivered, opened, or failed.

v1.0.0Source

Install

Send emails with Mailgun, with text, HTML, attachments, tags, tracking, templates, and scheduled delivery, and start a workflow on a Mailgun event such as delivered, opened, clicked, or failed. Use it for transactional and bulk email.

Mailgun@zerodot/mailgunInstall
  1. Open System, then Nodes.
  2. Find Mailgun and click Install.
  3. Use the new nodes at once. You do not restart.

How it works

Mailgun Trigger (trigger.mailgun) is a trigger node in the Mailgun package (@zerodot/mailgun): Start the workflow on a Mailgun event, such as delivered, opened, or failed.

Starts a run on a Mailgun event:

  • Accepted, Delivered, Opened, Clicked
  • Failed (Permanent) and Failed (Temporary): Mailgun sends both as failed, with a severity
  • Complained, Unsubscribed, Rejected
  • All Events

In the Mailgun dashboard, go to Sending > Webhooks and add the webhook address of the trigger for each event type. Each request must have a valid signature. The trigger computes the HMAC-SHA256 of the timestamp and the token with the Webhook Signing Key, and compares it in constant time. A request with a wrong signature, or a credential without the signing key, gets HTTP 401.

Optional Replay Window (Seconds): the trigger refuses a request when the signed time is older than this.

The input has type, event, severity, recipient, timestamp, messageId, subject, tags, reason, url, deliveryStatus, userVariables, and eventData (the full event).

Mailgun sends events only to the address in the dashboard, so test listening is not available. Publish the workflow to get events.

Logins it can use

Mailgun API (mailgun.apiKey):

  • apiDomain: api.mailgun.net (US) or api.eu.mailgun.net (EU)
  • emailDomain: your sending domain, such as mg.example.com
  • apiKey: secret. Mailgun uses it as the Basic auth password with the user api
  • webhookSigningKey: secret and optional. Only the trigger needs it. Find it in the Mailgun dashboard, under Sending > Webhooks, as the HTTP webhook signing key

The Test button reads the information of the domain.

Guides and related hubs