Iubenda logo
Start generating

Documentation

Table of Contents

Webhooks Integration with Third-party Services

Managing consent across multiple tools can be challenging—but it doesn’t have to be. With iubenda’s 2-Way Sync, part of the Consent Database, synchronizing your marketing consents across platforms is seamless, real-time, and fully compliant.

This guide walks you through how to integrate iubenda’s Consent Database with third-party platforms using outbound webhooks, including tools like Zapier, Make, and N8N. We’ll also cover advanced topics, such as handling failed attempts, retries, and understanding the webhook payload structure.

How to Integrate an Outbound Webhook with Zapier

1. Create a Zap:

  1. Log into Zapier, create a new Zap, and choose Webhooks by Zapier.
  2. zapier webhooks
  3. Select Catch Hook as the trigger event and copy the webhook URL Zapier provides.
zapier webhooks 2

2. Set Up the Webhook in iubenda:

  • In iubenda, go to the Outbound Webhooks section. (From the iubenda Dashboard, select the project and click the settings icon, Open Consent Database Webhooks: In the side menu, click on “Consent database webhooks”)

    zapier webhooks 2
  • Create a new Outbound webhook, paste the Zapier URL, and select the preference you want to update (e.g., newsletter subscription).
  • zapier webhooks 2
  • Save the webhook.

3. Test and Publish:

  • Trigger an event (e.g., a subscription update), and test the trigger in Zapier.
  • zapier webhooks 2
  • [Optional] Define Filters or Paths:
    • If sending multiple values via webhooks (e.g., all newsletter preferences), set up filters or paths in Zapier to only proceed with specific values, such as only when the preference is set to “true”.
    • Add the service you want to connect (e.g., Mailchimp) and specify the changes you want to apply, such as updating the subscriber’s status based on the email field in the webhook.
  • zapier webhooks 2
  • Once everything works, publish the Zap.
zapier webhooks 2

💡 Tip: Use Zap history to make sure everything is running smoothly.

zapier webhooks 2

How to Integrate an Outbound Webhook with Make

1. Create a Scenario:

  • Log into Make and create a new scenario with Webhooks. Choose Custom webhook and copy the URL.
zapier webhooks 2

2. Set Up the Webhook in iubenda:

  • In iubenda, go to the Outbound Webhooks section. (From the iubenda Dashboard, select the project and click the settings icon, Open Consent Database Webhooks: In the side menu, click on “Consent database webhooks”)

    zapier webhooks 2
  • Create a new Outbound webhook, paste the Make URL, and select the preference you want to track (e.g., newsletter updates).
  • zapier webhooks 2
  • Save the webhook.

3. Run and Automate:

  • In Make, click Redetermine data structure and trigger an event in iubenda (e.g., a newsletter subscription update) and let Make detect it.
  • You can now link the webhook to a service like Mailchimp and apply the updates, such as managing subscribers based on their email.
  • Once confirmed, the system will run automatically.
  • [Optional] Add Filters:
    • If you send multiple values, set filters in Make to trigger only when specific values are sent.
zapier webhooks 2

💡 Tip: Check the Make dashboard to monitor the integration.

zapier webhooks 2

How to Integrate an Outbound Webhook with N8N

1. Create a Workflow:

  • In N8N, create a new workflow and add a Webhook node. Set the method to POST and copy the webhook URL.
zapier webhooks 2

2. Set Up the Webhook in iubenda:

  • In iubenda, go to the Outbound Webhooks section. (From the iubenda Dashboard, select the project and click the settings icon, Open Consent Database Webhooks: In the side menu, click on “Consent database webhooks”)

    zapier webhooks 2
  • Create a new Outbound webhook, paste the N8N URL, and select the preference you want to track.
  • zapier webhooks 2
  • Save the webhook.

3. Test and Go Live:

  • In N8N, listen for the test event (e.g., a subscription update), and let N8N confirm the data structure.
  • [Optional] Add Filters or Paths:
    • If sending multiple values, you can set up filters to only process certain values or create different paths for various outcomes.
    • Now, connect the webhook to an app like Mailchimp and apply any changes, such as creating a new contact.
    • zapier webhooks 2
    • Save your workflow and activate it. From now on, every time a subscriber is added to the Consent Database, it will automatically sync with Mailchimp.

💡 Tip: Use the Execution tab in N8N to ensure everything is working properly.

zapier webhooks 2

Advanced: What to Do If a Webhook Fails

If a webhook fails because the destination server isn’t responding, iubenda retries the request several times:

  • It retries 10 times, starting 2 minutes after the first failure and increasing the wait time after each attempt. Here’s the retry schedule:
    • First attempt: After 2 minutes
    • Second attempt: After 5 more minutes
    • Third attempt: After 10 more minutes
    • Fourth attempt: After 20 more minutes
    • Fifth attempt: After 45 more minutes
    • Sixth attempt: After 1 hour
    • Seventh attempt: After 1.5 hours
    • Eighth attempt: After 2 hours
    • Ninth attempt: After 2.5 hours
    • Tenth attempt: After 3 hours
  • After 10 failed attempts, the webhook is marked as failed and will not be retried again.

Circuit Breaker:

If a webhook fails 10 times in a row, it will be automatically disabled. You’ll receive an email, and it will be marked as disabled in your webhook settings.

Webhook Payload Example

Here’s an example of the data iubenda sends in a webhook:

{
"subject": {
"id": "9b05c70c5c78a31aeaf13f8f27c1f890",
"email": "subject@email.com"
},
"consent_preferences": {
"newsletter": "false"
},
"changes": {
"newsletter": "false"
}
}
  • subject: The user’s ID and email.
  • consent_preferences: The updated consent preferences, like subscribing or unsubscribing from a newsletter.
  • changes: Any changes from the previous consent record.