Odoo CRM
Odoo is a suite of business apps with a CRM. Its automation rules have the action Send Webhook Notification: when a lead or an opportunity reaches a stage, Odoo sends the fields you choose to an address. Pointed at the Flows address, it starts your flows: a new lead gets a welcome, an opportunity at the next stage — the next message in Viber or SMS, with a reminder if nothing happens.
This page is written from the public documentation of Odoo and has not been checked on a live account yet.
What you need
- Odoo 17.0 or newer: the action Send Webhook Notification is in 17.0, 18.0 and 19.0.
- Automation rules are made in Studio or in developer mode (the Automation Rules form). Whether a given Odoo Online plan needs Studio (Enterprise) for this is not confirmed by the documentation.
- Only CRM leads and opportunities. Webhooks of other models, such as sales orders, are not recognised yet.
Step 1. Create a connection
- Open
Flows → Connections, press Connect a system and choose Odoo CRM. - Press Copy address. It looks like
https://events.alphasms.net/hooks/<TOKEN>— keep it secret.
Step 2. Set up an automation rule in Odoo
-
Open CRM → Pipeline, hover over the name of a stage and press ⚙ (Settings) → Automations: the trigger is already Stage is set to this stage. Or open Studio → Automations → New.
-
Name the rule, for example
AlphaFlow — Proposition. -
Trigger — Stage is set to and the stage. For new leads: Trigger — On save, Before Update Domain —
ID is not set, Apply on —ID is set, When updating — any field. -
Add an action → Type — Send Webhook Notification.
-
URL — the address from the cabinet.
-
Fields — Type, Stage, Phone, Email, Contact Name, Customer, Opportunity, Expected Revenue, Last Updated on. Type is required: AlphaFlow tells a lead from an opportunity by it, and without it the event has no name. Last Updated on gives the time of the event: Odoo sends it in UTC without a time zone, and AlphaFlow reads it as UTC. Without this field the event gets the time of receipt.
-
Check Sample Payload: all the fields must be in it. On an empty model Odoo shows placeholders, like this; once there are records, it shows the data of a real record:
{"_action": "Send Webhook Notification(#12)","_id": 1,"_model": "crm.lead","contact_name": "Hello World","email_from": "Hello World","expected_revenue": 42.42,"name": "Hello World","partner_id": 47,"phone": "Hello World","stage_id": 47,"type": "option1"} -
Save & Close. Repeat for the other stages — or make one rule with On save and When updating — Stage.
Step 3. Send a test
Drag a test opportunity into a stage with the rule. The event appears in
Flows → Connections → Event journal within seconds. The
connection shows Recognised: Odoo CRM.
Events
| Type in Odoo | AlphaFlow event | Properties |
|---|---|---|
lead | lead_submitted | lead_id, title, stage, expected_revenue |
opportunity | deal_stage_changed | lead_id, title, stage, expected_revenue |
Every event also carries model (crm.lead) and rule — the name of the action.
- Stage and Customer come as numbers — the id without the name; empty fields come as
false. Use the number of the stage in the conditions of a flow — you see it in the event in the journal. - The values of
stageare matched to events by the table of stages in the connection: it is empty, so every stage gives the event of the type. You can edit it in the connection.
The contact is found by the phone (phone), the email (email_from) and the id of the customer card
(partner_id); the name comes from contact_name. A lead without a customer has false instead of the id — AlphaFlow
drops it and finds the contact by the phone or the email. The names of the events are the ones the ready-made
templates expect — see Recommended events.
Good to know
- No retries. Odoo sends once and waits 1 second; on an error or an answer other than
2XXit only writes to its server log. If the address cannot be reached, the event is lost. - The body is fixed: the chosen fields and
_id,_model,_action. You cannot add your own headers or body, and there is no signature. - A record that comes into the same stage again is taken for a repeat and gives no event.
- The address always answers
200. Above the daily event limit the event is refused in AlphaFlow withquota_exceededand shown in the journal; the rule in Odoo stays on.