Skip to main content

Webhook (example: Meta Lead Ads via Zapier or Make)

In the tab Webhook press "Generate webhook URL", copy the URL at once (it is shown only once, Odoo stores a hash only) and tick "Webhook active". The URL looks like https://<your-odoo>/wb_voip/kampagne/eingang/<secret>.

  • The URL contains the secret: treat it like a password. Odoo's own access log masks it (/wb_voip/kampagne/eingang/***); logs of the sender or of a proxy in front of Odoo do not. If it shows up anywhere, generate a new one with "Generate new webhook URL"; the old one stops working.
  • Only POST with JSON (application/json) or a form (application/x-www-form-urlencoded) is accepted; multipart/form-data is refused with 400. The reply is always {"ok": true} or {"ok": false} with status 200, 400, 404, 413, 429 or 500, never with details. Limits: 64 KiB per request, 200 fields, 60 requests per minute per list and 20 per minute per IP. Control characters (except tab and line breaks) and lone UTF-16 surrogates are removed from field names and values.
  • A phone number or an email address is required, otherwise 400.

Set up in Zapier ("Webhooks by Zapier › POST") or Make ("HTTP › Make a request"), trigger "New Lead" of Facebook Lead Ads, payload type JSON:

Webhook fieldContent from the lead
idMeta lead id (idempotency key)
namefull name
telefonphone number
emailemail address
firmacompany name (if the form asks for it)
einwilligung_textthe form's consent text, word for word
einwilligung_artausdruecklich if the form asks for explicit consent
einwilligung_zeittime of the submission (ISO 8601 or Unix seconds)
utm_source, utm_campaigne.g. meta and the campaign name

Field mapping​

Without a mapping an incoming field is used if it carries the name of the target (vorname, nachname, name, telefon, email, firma, einwilligung_art, einwilligung_text, einwilligung_zeit, utm_source, utm_campaign, notiz). If your fields have other names (e.g. full_name, phone_number), enter one row per field under "Webhook field mapping": incoming field and target. The note and fields without a target go to "Webhook details" on the opportunity: readable by managers only and shown on the card to the agent who holds the lead; when a closing code hands the lead to a seller they are appended to the description (they may contain special-category data, and opportunities without a seller are visible to all agents). For an opportunity that already has a seller they go to the description directly.

Send the consent text of the form with every lead: it is your evidence. einwilligung_art takes only ausdruecklich, bestandskunde or b2b_mutmasslich; if it is missing or invalid, the list's "Consent without information" applies (default "None", and the lead is then not called).

Idempotency and duplicates​

  • Send the header Idempotency-Key or the field id (at most 128 characters): a repeated key creates nothing new. Keys are remembered for 30 days, the retention of the intake log (Call lists › Configuration › Webhook intake).
  • Contacts are never modified. A contact is found by phone number or email address and only linked. If the email address matches but the number does not, the opportunity is created without a contact and carries the hint "Possible duplicate contact."; a manager links it by hand.
  • If someone submits again whose opportunity is still on the list, only a note is added (plus a new valid consent). If the entry is exhausted and the submission brings a valid consent other than "None", the entry is reopened (open, attempts reset, without the waiting time of the number). An opportunity whose entry was removed from the list is not reopened: only a note is added, and the manager decides.
  • Parallel submissions of the same person without an idempotency key: while one is being processed (per list and number or email), Odoo retries the other one automatically (whole request, up to five attempts with growing pauses); the retry finds the first opportunity. A small gap remains: a submission that started just before the first one finished can still create a second opportunity. Send an idempotency key (header Idempotency-Key or field id) where the tool repeats submissions.