Reusable webhook bridge for connecting Odoo Community with n8n workflows.
Odoo n8n Bridge is a reusable integration addon for Odoo Community 18.0 that standardizes how Odoo exchanges webhook traffic with n8n. It provides inbound webhook handling, outbound event dispatch, delivery logging, retry controls, and supporting documentation so teams can build automation workflows without rebuilding the plumbing for every project.
Many Odoo automation projects need the same operational layer:
- authenticated inbound callbacks from n8n or external systems
- outbound business event delivery to webhook-based workflows
- auditable request and response history
- retry logic for transient failures
- a clean foundation that works without Odoo Enterprise dependencies
This repository packages that layer into a standalone addon and local development environment that can be reused across CRM, sales, accounting, onboarding, support, and middleware use cases.
- Generic inbound webhook endpoint with
shared_secret,bearer,api_key_header,hmac_sha256, andnoneauthentication modes - Outbound event subscriptions with payload templates and endpoint-specific retry controls
- Delivery attempt logging with redacted sensitive headers
- Company-aware access control with dedicated user, manager, and administrator roles
- Docker-based local environment for Odoo, PostgreSQL, and n8n
- Importable n8n workflow examples and a Postman collection for onboarding and testing
flowchart LR
A["Odoo Business Event"] --> B["Odoo n8n Bridge"]
B --> C["n8n Webhook Workflow"]
C --> D["External System / AI / Notification / API"]
E["External System"] --> F["n8n Workflow"]
F --> G["Odoo Bridge Inbound Endpoint"]
G --> H["Odoo Record / Event Log"]
addons/odoo_n8n_bridge/: production addon code, views, security, demo data, testsn8n/workflows/: importable n8n examplesdocs/: architecture, setup, security, deployment, and roadmapscripts/: bootstrap, startup, reset, and validation scriptspostman/: API collection for inbound endpoint testing.github/: issue templates, pull request template, and CI workflows
cp .env.example .env
docker compose up --build
docker compose exec odoo bash
python3 /opt/odoo/odoo-bin -c /etc/odoo/odoo.conf -d odoo -u odoo_n8n_bridge --stop-after-init- Start the stack with
docker compose up --build. - Open Odoo at
http://localhost:8069. - Enable developer mode and update the app list.
- Install
Odoo n8n Bridge.
- Start n8n from the same Docker stack at
http://localhost:5678. - Import one of the workflows from
n8n/workflows/. - Configure environment variables or credentials for the target Odoo base URL and webhook secret.
- Activate the workflow after validating endpoint URLs and auth settings.
- Open
n8n Bridge > Configuration > Secrets. - Create a shared secret and click
Generateor enter a controlled value. - Open
n8n Bridge > Configuration > Endpoints. - Create an endpoint with:
Direction:bothEndpoint Type:genericCode:crm_enrichment_callbackAuth Mode:shared_secretTarget URL: your n8n webhook URL for outbound flows
res.partnerwrite: sync contact updates to downstream automation flowsres.partnercreate: trigger onboarding or enrichment pipelines- Custom optional model subscriptions: extend the same pattern for
crm.lead,sale.order, oraccount.movein deployments where those apps are installed
To create the first subscription:
- Open
n8n Bridge > Event Subscriptions. - Create a subscription on
Contacts(res.partner) with event typewrite. - Choose the endpoint created above.
- Leave
sync_modeasqueuedfor safer retries during setup.
POST /n8n/bridge/inbound/<endpoint_code>: authenticated inbound webhook entry point
See docs/api-contract.md for full request, response, and authentication mode details.
- Secret values are restricted to bridge administrators and masked in the UI
- Delivery logs redact sensitive header values before persistence
- Inbound authentication is validated before payload parsing
- Company-aware record rules scope operational data for standard users and managers
See docs/security-model.md for the full design and hardening guidance.
The local stack includes:
postgresodoon8n
The bootstrap script clones Odoo Community at the configured ODOO_VERSION, writes config/odoo.conf, and mounts the local addon path into the container runtime.
curl -X POST "http://localhost:8069/n8n/bridge/inbound/crm_enrichment_callback" \
-H "Content-Type: application/json" \
-H "X-Bridge-Secret: your_shared_secret_here" \
-d '{
"event": "crm.lead.enriched",
"model": "crm.lead",
"record_id": 45,
"external_id": "lead_123",
"data": {"lead_score": 82},
"metadata": {"workflow": "crm_lead_enrichment", "run_id": "manual-test"}
}'- Import
n8n/workflows/outbound_sale_order_event_example.jsonorgeneric_model_event_router.json. - Configure the workflow webhook URL on your outbound endpoint.
- Update a contact in Odoo to trigger the bundled
res.partnerwrite subscription or create your own subscription. - Review
n8n Bridge > Event LogsandDelivery Attempts.
- Architecture
- Local Setup
- Security Model
- API Contract
- Event Subscriptions
- n8n Workflow Setup
- Deployment
- Roadmap
- Phase 2: inbound record update allowlists, replay protection, payload builder
- Phase 3: dead-letter queue, exponential backoff, rate limiting
- Phase 4: queue integration, observability, vault-backed secrets
17.0: XML view syntax andmail.threadusage remain close; re-test settings inheritance and cron ids.18.0: primary target in this repository.19.0: verify any framework changes around settings views, list tags, and HTTP controller request APIs before release.
LGPL-3.0. See LICENSE.
Maintained by Omni Academy Consulting & Technologies.
See CONTRIBUTING.md.