Automate approvals with Zapier, Make and n8n: the webhook recipe
Register a DueReason webhook, verify its HMAC signature, and wire approval.approved and approval.executed events into Zapier, Make or n8n to automate approvals.
Updated · 13 min read
In short
- DueReason's webhook already carries everything a no-code tool needs: register one endpoint, pick approval.approved and approval.executed, and verify the HMAC signature before you trust the payload.
- A webhook tells you a decision happened; it does not hand you a usable credential. Fetch the approval right after approval.approved to read its grant, and keep that call in your flow rather than skip it.
- n8n's Webhook node, Zapier's Catch Raw Hook and Make's Custom webhook module can all keep the exact raw body a signature check needs, as long as you turn that option on.
- Close the loop: once your flow has acted on the grant, call POST /approvals/{id}/executions. DueReason records the grant you presented and fires approval.executed with it, so the audit trail shows what authorized the action.
- Three worked examples below wire the same loop into a concrete downstream action: deprovisioning access in Okta or Google Workspace, sending a contract out for e-signature in DocuSign or PandaDoc, and creating the bill in Xero or QuickBooks once a payment is approved.
DueReason's webhook already sends everything a no-code tool needs: a signed, retried delivery for every step of an approval, including the moment it is decided and the moment someone reports having acted on it. This recipe registers the endpoint, verifies the signature without a server of your own, and wires approval.approved and approval.executed into n8n, Zapier or Make so a flow can act and report back, not just notify.
What's actually in the payload
Every delivery is a JSON body with id, type, createdAt and data; data always carries requestId and seq, plus the event's own fields. Two events matter for automation:
| Field | approval.approved | approval.executed |
|---|---|---|
| grantId | the grant's id | the grant's id |
| grant | not present | the signed grant (JWS) that was presented |
| approvers | who decided | — |
| outcome | — | succeeded or failed |
| detail | — | free text, e.g. a payment or deployment id |
approval.approved tells you a request was decided; it does not carry a usable grant. The grant is a signed, single-use credential bound to the exact payload, and DueReason signs it fresh on every read rather than storing it, so your flow fetches it with GET /approvals/{id} right after the webhook fires, using an API key with the approval:read scope. approval.executed, by contrast, does carry the grant, because by then it has already been spent: it is the one your own flow (or whatever executed the action) presented when it reported the outcome, kept as a record of what authorized the execution, not as something to act on again.
Register the webhook in DueReason
In Settings, Webhooks, add your endpoint's HTTPS URL and choose approval.approved and approval.executed (or * for everything). The signing secret, whsec_..., is shown once; store it wherever your flow keeps credentials, never inline in the flow's JSON export. Rotating the secret later signs every delivery sent from that moment with the new one; the secret it replaces stays viewable in Settings for 24 hours, so you can still check deliveries signed before the rotation while you update your flow.
Verify the signature before you trust it
The DueReason-Signature header looks like t=1730000000,v1=3f29a1...: t is the Unix time of signing, v1 is a hex HMAC-SHA256 of the timestamp, a literal dot, and the raw request body, in that order, keyed with your endpoint's secret — not a value your tool re-serialized from its own parsed JSON, which reorders keys and changes whitespace and breaks the comparison. Recompute the same HMAC over the timestamp and the raw body, compare it to v1 in constant time, and reject anything where the timestamp is more than five minutes from now. The full Node.js example in the API reference shows the same check your own server would run; every recipe below is the same four steps in a no-code tool.
Build it in n8n
- Add a Webhook node: method POST, and in its options turn on Raw Body so the node keeps the unparsed bytes alongside the parsed JSON. Copy the Production URL into DueReason's webhook settings.
- Add a Code node that reads the signature header and the raw body from the incoming request, computes the HMAC with Node's built-in
cryptomodule (available inside the Code node) and throws if it does not matchv1or the timestamp is stale. A failed check should stop the workflow, not just log it. - Add a Switch node on
{{$json.body.type}}: one branch forapproval.approved, one forapproval.executed. - On the approved branch, add an HTTP Request node with an HTTP Bearer Auth credential holding your DueReason API key, calling GET
/approvals/{{$json.body.data.requestId}}to read itsgrant. Pass that grant into whatever node performs your action. - After acting, add a second HTTP Request node, POST
/approvals/{{requestId}}/executions, body{ "grant": ..., "outcome": "succeeded", "detail": ... }, so DueReason's record and the next approval.executed delivery both show it.
Build it in Zapier
Zapier's plain Catch Hook trigger parses the body for you, which is exactly what breaks signature verification: reordered keys produce a different HMAC than the one DueReason computed. Use Catch Raw Hook instead (Webhooks by Zapier), which keeps the unparsed body and the request headers for later steps.
- Trigger: Webhooks by Zapier, Catch Raw Hook. Register the URL it gives you with DueReason.
- A Code by Zapier (Node.js) step: read the
DueReason-Signatureheader and the raw body frominputData, compute the HMAC and compare it tov1; return an error (or set a flag the next step checks) when it fails, rather than letting the Zap continue. - A Paths step branching on the parsed
typefield (parse the raw body into JSON in the Code step once the signature has checked out, and pass the parsed object forward). - On the approved path, a Webhooks by Zapier: Custom Request (GET) to
/approvals/{requestId}with your API key in the Authorization header, to readgrant. - After your action runs, a second Custom Request (POST) to
/approvals/{requestId}/executionsreporting the outcome.
Build it in Make
Make's Webhooks > Custom webhook module needs its advanced setting for request headers turned on to see DueReason-Signature at all, and its parsed output is not guaranteed to be byte-identical to what DueReason sent, the same trap as Zapier's plain Catch Hook. Make ships a built-in sha256() text function but no keyed HMAC function, so verifying the signature inside Make alone takes an extra step: either a short custom app function (if your plan includes Make's code tooling) or a small relay in front of Make — a one-function serverless endpoint that checks the signature and only forwards verified deliveries to Make's webhook URL. Don't skip this step because Make happened to parse the JSON for you; an unverified webhook is an anonymous HTTP endpoint that anyone who finds the URL can post to.
- Trigger: Webhooks > Custom webhook, with "Get request headers" enabled.
- Verify the signature (relay or code step) before the scenario's next module runs.
- A Router with two routes, filtered on
{{1.body.type}}equal toapproval.approvedorapproval.executed. - On the approved route, an HTTP > Make a request module, GET
/approvals/{{1.body.data.requestId}}with your API key, to readgrant. - After acting, another HTTP module, POST
/approvals/{{requestId}}/executionswith the outcome.
Worked example: deprovision access in Okta or Google Workspace
Pair this with DueReason's access-or-account-action template, used for restricting, suspending or revoking someone's account or system access: its request payload already carries subjectRef (the person or account) and measure (restrict, suspend or revoke), so GET /approvals/{id} hands your flow a concrete target to act on, not just a decision.
- On the approved branch, after reading the grant with GET
/approvals/{id}as above, also readactionandpayloadfrom the same response: filter onactionequal toaccess.actionso this branch only fires for access requests, then readpayload.subjectRefandpayload.measure. - Map
measureto a built-in Zapier, Make or n8n app action:revokeorsuspendto Okta's Deactivate User action, or Google Workspace Admin's Suspend User action, keyed onsubjectRefas the person's email or Okta/Google user id;restrictto a narrower action your IdP exposes, such as removing specific app or group assignments instead of deactivating the whole account. - Report back exactly as every recipe above: POST
/approvals/{id}/executionswith the grant you read,outcome: "succeeded"or"failed", and adetailnaming the IdP action that ran, for example"Okta: user deactivated". A failed Okta or Google Workspace call should reportoutcome: "failed", not stop silently, so the audit trail and any retry logic both see it.
DueReason never calls Okta or Google Workspace itself: it tells your flow a human approved the action and hands it a grant to prove that when it reports back. This is the same four-step loop as every recipe above — webhook, read the grant, act, report — only the action in the middle changes.
Worked example: send a contract for e-signature via DocuSign or PandaDoc
This pairs with the contract-signoff template: its payload carries counterparty, title and draftUrl (plus an optional value that routes contracts above a threshold to Legal), so an approved request already points your flow at the document and who it goes to.
- On the approved branch, filter on
actionequal tocontract.signoff, then readpayload.draftUrl,payload.counterpartyandpayload.titlefrom the same GET/approvals/{id}response you used to fetch the grant. - Use Zapier's or Make's built-in DocuSign or PandaDoc app action to create an envelope from
draftUrl, addressed to the counterparty; set the envelope or document name fromtitleso the signer and your own records agree on what was approved. - Report back the same way: once the envelope is sent (or, for a stricter audit trail, once it comes back signed — the DocuSign and PandaDoc apps both have their own events your flow can wait on), POST
/approvals/{id}/executionswith the grant,outcome: "succeeded"or"failed", and adetailsuch as"DocuSign envelope sent to legal@acme.com".
Nothing here replaces DueReason's own approval step: the contract is still approved by an account lead (and Legal, above the value threshold) before any envelope goes out. E-signature only automates what happens after that decision, the same way the Okta/Google Workspace example above automates what happens after an access decision.
Worked example: create the bill in Xero or QuickBooks
This pairs with the agent-payment template: its payload carries amount, currency, payee, iban, purpose and an optional invoiceUrl (routed to Finance above 100, and to Finance plus Management above 5,000), so an approved payment already has everything a bill needs before any money moves.
- On the approved branch, after reading the grant with GET
/approvals/{id}as above, also readactionandpayloadfrom the same response: filter onactionequal topaymentso this branch only fires for payment requests, then readpayload.amount,payload.currency,payload.payee,payload.iban,payload.purposeandpayload.invoiceUrl. - Map those fields to Zapier's Create Bill action for Xero, or QuickBooks Online's Create Bill (Item Based) or Create Bill (Account Based) action; in Make, both apps ship a Create a Bill module. Either way:
payeebecomes the bill's contact or vendor (matched or created by name),amountandcurrencyset the line total, andpurposeandinvoiceUrlgo into the bill's reference or memo field so the accounting record still points back at the original invoice. - Report back exactly as every recipe above: once Xero or QuickBooks confirms the bill, POST
/approvals/{id}/executionswith the grant you read,outcome: "succeeded"or"failed", and adetailnaming the created record, for example"Xero: bill created for Acme Ltd". The resulting approval.executed event carries the same grant back alongsidepayload.invoiceUrlfrom the original request, so reconciling the bill against the invoice it was approved for does not need a separate lookup.
DueReason never calls Xero or QuickBooks itself: Finance (and, above the threshold, Management) approve the payment first, and your flow only creates the accounting record once that decision exists, with a grant to prove it when it reports back. The same four-step loop as above — webhook, read the grant, act, report — only the downstream app changes.
Keep the loop closed
A grant is single-use: DueReason accepts the first execution report and answers already_executed to a second one for the same request, so retries in your no-code tool are safe to re-send but will not double-act. Treat already_executed as success, not failure, when your flow's own retry logic resends the report. And because the grant itself proves the action was approved, treat it the way you would an API key in the flow's logs: redact it from anywhere your automation platform stores step history for longer than the grant's own expiry, and never paste one into a shared workspace.
Questions
- Does approval.approved give me a grant I can act on right away?
- No. It tells you the decision happened and includes the grant's id, not the signed grant itself. Call GET /approvals/{id} right after the webhook to read the grant field, then act with that.
- My HMAC check fails in Zapier or Make even though the secret is right. Why?
- The trigger probably re-serialized the body before your check ran. Zapier's plain Catch Hook and Make's default Custom webhook parse the JSON, which can reorder keys or change whitespace; switch to Zapier's Catch Raw Hook, or verify with a relay in front of Make, so the exact bytes DueReason sent reach your HMAC check.
- Can I skip signature verification for an internal, low-stakes flow?
- No. An unverified webhook URL is a public HTTP endpoint; anyone who finds it, guesses it or replays an old delivery can trigger your flow. The check is four lines in any language and the same in every recipe above.
- What happens if my no-code tool's call to report an execution fails or retries?
- POST /approvals/{id}/executions accepts the first report for a grant and answers already_executed to any later one. Build your flow to treat already_executed as a successful outcome, not an error, so a retried step does not fail the whole run.
- What API scope does this need?
- approval:read covers reading an approval request (and its grant) and verifying a grant; reporting an execution needs approval:request, the same write scope used to create and cancel requests — give the key both, even when your flow never submits a new approval itself.
- Can I use this to deprovision access in Okta or Google Workspace, or do I need a bespoke integration?
- No bespoke integration: pair this recipe with DueReason's access-or-account-action template, read subjectRef and measure from the approved request's payload, and call Zapier's, Make's or n8n's built-in Okta or Google Workspace app action with them, keyed on subjectRef. See the worked example above.
- Does this guide cover sending a contract out for e-signature?
- Yes, with DocuSign or PandaDoc: pair this recipe with the contract-signoff template, read draftUrl, counterparty and title from the approved request, and use Zapier's or Make's built-in DocuSign or PandaDoc app action to create the envelope. See the worked example above.
- Can I use this to create the bill in Xero or QuickBooks once a payment is approved?
- Yes: pair this recipe with the agent-payment template, read amount, currency, payee, iban, purpose and invoiceUrl from the approved request's payload, and map them to Zapier's Create Bill (Xero) or Create Bill (Item Based)/(Account Based) (QuickBooks Online) action, or Make's Create a Bill module for either app. See the worked example above.
Read the full webhook and grant reference
Every event's exact fields, the signature header format and the Node.js verification example this recipe is built on live in the API reference.
Read the API docsSources
- n8n Docs: Webhook node (Raw Body option)
- Zapier Help Center: Trigger Zap workflows from webhooks (Catch Hook vs Catch Raw Hook)
- Make Help Center: Webhooks
- DueReason API reference: webhooks and signature verification
- Okta Support: How to Deactivate and Delete a User in Okta
- Google Workspace Admin Help: Suspend a user temporarily
- Zapier: DocuSign integrations
- Zapier: PandaDoc integrations
- Zapier: Xero integrations
- Zapier: QuickBooks Online integrations
- Make: Xero integration
- Make: QuickBooks integration
This guide explains the regulation as we read it; it is not legal advice. Check the official text and your national law, which may add obligations.