Mailgun
Receive Mailgun email events (delivered, opened, bounced) in Wexio flows
Wexio verifies the signature block that Mailgun puts in every webhook body. Each signature token works once, and requests older than 5 minutes are rejected. Inbound webhooks need the Pro or Enterprise plan.
Provider docs: Setting up webhooks in Mailgun
Setup
1. Connect It in Wexio
Go to Settings → Webhooks and API → Webhooks → New connection → Inbound and click the Mailgun chip under Dedicated providers, or set Authentication mode to Mailgun manually. Copy the Wexio endpoint URL.
2. Set Up the Provider
In Mailgun, open Sending → Webhooks and add the Wexio endpoint URL for each event you need.
Mailgun signs with your HTTP webhook signing key. Copy it from Sending → Webhooks → HTTP webhook signing key (or Settings → API Security). Paste it into the Wexio Signing secret field.
Mailgun's signature covers a timestamp and a token, not the body. Wexio therefore accepts each token once per connection, so a replayed request is rejected.
3. Resolve Contacts
Pick the field in the Mailgun payload that matches a Wexio contact. Capture a sample event to see the payload shape, as described in Inbound Webhooks.
4. Bind a Flow
Attach a Webhook Received trigger to the connection and branch on the event type field in the payload.
Check That It Works
Trigger a Mailgun event, then open Webhook History. A request that passed verification is listed as received. A failed one shows its error.
Troubleshooting
| Symptom | Fix |
|---|---|
UNAUTHORIZED: Mailgun signature mismatch | The signing key is wrong. Copy the HTTP webhook signing key again from Mailgun |
UNAUTHORIZED: Missing or malformed Mailgun signature object in body | The request body has no signature block. Make sure Mailgun sends the event as JSON |
UNAUTHORIZED: MAILGUN token already used (replay) | The same signature token arrived twice. Send a new event from Mailgun |
Related
- Inbound Webhooks - auth modes, contact resolution and response codes
- Webhook Received - the trigger that starts your flow
- Webhook History - check why a request failed