n8n
Connect Pactbase to your other tools without writing a server.
n8n connects Pactbase to HubSpot, Mailchimp, Zoho, Google Sheets and hundreds of other tools. Pactbase provides the two ends: webhooks push events out, and the API takes decisions in.
Pactbase to your tool: act on consent changes
Example: when someone withdraws consent for the newsletter, stop emailing them.
- In n8n, add a Webhook node with method POST, and copy its production URL.
- Set its Authentication to Header Auth and create a credential, for example with name
X-N8N-Authand a long random value. - In Pactbase, open Settings, then Webhooks, then Add endpoint. Paste the URL, add a custom header with that same name and value, and tick the events you need (consent updated and consent withdrawn by default).
- Activate the workflow, then click Send test event in Pactbase.
- In n8n, branch on
{{$json.body.type}}with a Switch node, and call your tool.
Header Auth makes sure only Pactbase can call the workflow. To also verify the signature in n8n, use a Code node with the check in Verify a webhook, and turn on the Webhook node's Raw Body option.
Your tool to Pactbase: record consent from a form tool
Example: a Typeform or HubSpot form submission is recorded as consent.
- In the form tool, add a checkbox worded from the collection point's purposes.
- Send the submission to an n8n Webhook node.
- Add an HTTP Request node:
POST https://v1.pactbase.in/api/v1/consent, headerAuthorization: Bearer YOUR_KEY(store the key as an n8n credential), and a JSON body withcollection_point,emailanddecisions. - Map the checkbox answers to purpose ids, as
trueorfalse.
See Record consent for the body, and Forms and CRM tools for which tools need this.
Retention: tell Pactbase what you deleted
When a retention schedule's deletion falls due, Pactbase sends a retention.deletion_due webhook. An n8n flow can delete the data in your system and then log it with Log a deletion.