PactbasePactbase DocsDocs
Integrations

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.

Example: when someone withdraws consent for the newsletter, stop emailing them.

  1. In n8n, add a Webhook node with method POST, and copy its production URL.
  2. Set its Authentication to Header Auth and create a credential, for example with name X-N8N-Auth and a long random value.
  3. 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).
  4. Activate the workflow, then click Send test event in Pactbase.
  5. 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.

Example: a Typeform or HubSpot form submission is recorded as consent.

  1. In the form tool, add a checkbox worded from the collection point's purposes.
  2. Send the submission to an n8n Webhook node.
  3. Add an HTTP Request node: POST https://v1.pactbase.in/api/v1/consent, header Authorization: Bearer YOUR_KEY (store the key as an n8n credential), and a JSON body with collection_point, email and decisions.
  4. Map the checkbox answers to purpose ids, as true or false.

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.

On this page