Secure Web Form to Odoo CRM Lead Creation with UTM Tracking
    100%
    Automation
    0(0 reviews)
    230 downloads

    Secure Web Form to Odoo CRM Lead Creation with UTM Tracking

    NM

    Curated by n8n Markets team

    Last updated: March 8, 2026

    # Web-to-Odoo Lead Funnel (UTM-ready) Create `crm.lead` records in Odoo from any webform via a secure webhook. The workflow validates required fields, resolves UTMs by name (source, medium, campaign) and writes standard lead fields in Odoo. Clean, portable, and production-ready. ## Key features - ✅ Secure Webhook with Header Auth (`x-webhook-token`) - ✅ Required fields validation (`firstname`, `lastname`, `email`) - ✅ UTM lookup by name (`utm.source`, `utm.medium`, `utm.campaign`) - ✅ Clean consolidation before create (`name`, `contact_name`, `email_from`, `phone`, `description`, `type`, UTM IDs) - ✅ Clear HTTP responses: `200` success / `400` bad request ## Prerequisites - Odoo with Leads enabled (CRM → Settings → Leads) - Odoo API Key for your user (use it as the password) - n8n Odoo credentials: URL, DB name, Login, API Key - Public URL for the webhook (ngrok/Cloudflare/reverse proxy). Ensure `WEBHOOK_URL` / `N8N_HOST` / `N8N_PROTOCOL` / `N8N_PORT` are consistent - Header Auth secret (e.g., `x-webhook-token: <your-secret>`) ## How it works 1. Ingest – The Webhook receives a POST at `/webhook(-test)/lead-webform` with Header Auth. 2. Validate – An IF node checks required fields; if missing → respond with `400 Bad Request`. 3. UTM lookup – Three Odoo `getAll` queries fetch IDs by `name`: - `utm.source` → `source_id` - `utm.medium` → `medium_id` - `utm.campaign` → `campaign_id` If a record is not found, the corresponding ID remains `null`. 4. Consolidate – Merge + Code nodes produce a single clean object: `{ name, contact_name, email_from, phone, description, type: "lead", campaign_id, source_id, medium_id }` 5. Create in Odoo – Odoo node (`crm.lead → create`) writes the lead with standard fields + UTM Many2one IDs. 6. Respond – Success node returns `200` with `{ status: "ok", lead_id }`. ## Payload (JSON) Required: `firstname`, `lastname`, `email` Optional: `phone`, `notes`, `source`, `medium`, `campaign` ```json { "firstname": "John", "lastname": "Doe", "email": "john.doe@example.com", "phone": "+393331234567", "notes": "Wants a demo", "source": "Ads", "medium": "Website", "campaign": "Spring 2025" } ``` ## Quick test ```bash curl -X POST "https://<host>/webhook-test/lead-webform" \ -H "Content-Type: application/json" \ -H "x-webhook-token: <secret>" \ -d '{"firstname":"John","lastname":"Doe","email":"john@ex.com", "phone":"+39333...", "notes":"Demo", "source":"Ads","medium":"Website","campaign":"Spring 2025"}' ``` ## Notes - Recent Odoo versions do not use the `mobile` field on leads/partners: use `phone` instead. - Keep secrets and credentials out of the template; the user will set their own after import. - If you want to auto-create missing UTM records, add an IF after each `getAll` and a `create` on `utm.*`.

    What's Included

    • Complete n8n workflow template with 0 nodes. Ready to import and customize.

    Requirements

    n8n instance (self-hosted or cloud). credentials.

    How to Use

    1. Download the workflow JSON 2. Import into your n8n instance 3. Configure credentials for 4. Activate and enjoy automation

    How to import this template into n8n

    1. Download the workflow JSON file from this page.
    2. In n8n, open Workflows, create a new workflow and choose Import from File.
    3. Open each node that shows a warning and connect your own credentials.
    4. Run the workflow once manually to check the output before you activate it.
    Included in Pro
    • Importable n8n workflow JSON file
    • Download with Builder Pro or Agency Unlimited
    • Built for n8n v1.0++
    • Setup time: 15-30 min

    Included in Builder Pro — $19/mo, 4,177 premium workflows

    Before you activate

    Templates are reviewed before they are listed. Test with your own credentials and data before running it in production.

    Updated Mar 2026
    v1.0
    SSL
    Secure
    GDPR

    100% Secure Checkout

    Refund requests within 7 days of a new subscription

    Dependencies & Requirements

    Webhook
    Trigger
    No credentials needed

    Reviews

    0

    No reviews yet

    See all 0 reviews ↓
    —

    0 reviews

    5★
    0
    4★
    0
    3★
    0
    2★
    0
    1★
    0

    No reviews yet.

    Questions & Answers

    0

    Log in to ask a question.

    No questions yet. Be the first to ask!

    People Also Bought