FlowKit

Connecting Odoo to n8n: Native Node, JSON-RPC API, and Real-World Use Cases

Published 2 August 2026 · 6 min read

Odoo is one of the most widely deployed open-source ERP/CRM suites, especially in Europe: sales, invoicing, inventory, accounting, and CRM in a single database. The problem is everything living around it — web forms, e-commerce platforms, marketing tools — that ends up re-typed into Odoo by hand. n8n ships a native Odoo node that solves most of this, and Odoo's JSON-RPC/XML-RPC API covers the rest. This guide walks through the credentials, the supported resources, the Custom Resource option, and three concrete use cases.

The stakes are real: a study by Hitt, Wu, and Zhou published in 2002 in the Journal of Management Information Systems (study on Google Scholar) found that firms investing in ERP systems perform better across a wide range of financial metrics — provided the processes follow. An ERP fed by manual copy-paste captures only a fraction of that value.

Setting up the Odoo credentials in n8n

The Odoo node uses a single credential with four fields:

  • Site URL: your instance URL (https://your-company.odoo.com or the URL of your self-hosted server).
  • Username: your login (the account email, as displayed on Odoo's change-password screen).
  • Password or API key: the account password or, preferably, an API key.
  • Database name: the name of the database (on Odoo Online this is usually the instance name).

To generate an API key (available since Odoo 14):

  1. In Odoo, open your profile and go to Preferences.
  2. Open the Account Security tab and find the Developer API Keys section.
  3. Create a new key, give it a description ("n8n"), and generate it.
  4. Copy the key immediately (it is shown only once) and paste it into the Password or API key field of the n8n credential.

Two classic pitfalls. First, on Odoo Online (SaaS), external API access is limited to paid Custom-type plans: the One App Free and Standard tiers do not include it. A self-hosted Community instance has no such restriction. Second, the API key inherits exactly the rights of its user: create a dedicated integration user with minimal permissions, and follow the good practices for securing API credentials in n8n.

The native Odoo node: resources and operations

The node offers four resources, each with the five classic CRUD operations (Create, Get, Get All, Update, Delete):

  • Contact: res.partner records — customers, vendors, prospects.
  • Opportunity: CRM opportunities (the sales pipeline), with the usual fields such as name, email, phone, or internal note.
  • Note: Odoo's internal notes.
  • Custom Resource: the wildcard resource that reaches any model.

For a simple flow — create a contact on every signup, update an opportunity when a deal moves — the first three resources are enough and take a few clicks: pick the resource, pick the operation, then map fields with expressions like {{ $json.email }}.

Custom Resource: reaching any Odoo model

This is what makes the node genuinely powerful. By selecting Custom Resource, you type the technical name of an Odoo model and apply the same CRUD operations to it. A few useful models:

  • crm.lead: leads and opportunities (with more control than the Opportunity resource).
  • sale.order: quotations and sales orders.
  • account.move: customer and vendor invoices.
  • product.product: product variants.
  • stock.quant: stock levels.

To find a model's or a field's technical name, enable developer mode in Odoo: names appear on hover, and the full list lives in the technical settings. When reading ("Get All"), the node lets you filter and cap the results; always start with a small limit before pulling thousands of rows.

Three concrete use cases

1. Syncing web form leads into the CRM

The pattern: an n8n Form Trigger or webhook receives the submission, and an Odoo node (Opportunity resource, or crm.lead via Custom Resource) creates the lead with name, email, and source. In between, you can enrich the lead automatically (company, headcount, industry) or qualify it with an AI model before creation, so sales reps open Odoo on records that are already clean.

This use case removes manual re-entry, whose cost is well documented: Raymond Panko's research published in 1998 in the Journal of End User Computing (reference on Google Scholar) shows that data entered and handled manually by humans contains errors almost systematically — the majority of audited spreadsheets contained at least one. Every field copied by hand is a failure point.

2. Creating an invoice when an order comes in

When an order arrives from your store (Shopify, WooCommerce, or PrestaShop), an n8n workflow can create the customer if missing (Contact), then the order (sale.order) or the invoice directly (account.move) via Custom Resource. One caveat: creating the record is not always enough — confirming an order or posting an invoice goes through Odoo business methods that the native node's CRUD does not cover. That is the RPC API's job (next section). And if you need to produce the PDF document on the n8n side, see how to generate quotes and invoices as PDFs.

3. Alerting on stalled opportunities

A daily Schedule Trigger reads open opportunities (Get All on crm.lead), a Filter node keeps those with no activity for more than X days, then a Slack message or email nudges the owner. It is the same pattern as syncing a HubSpot or Pipedrive CRM, applied to Odoo.

Beyond the node: the JSON-RPC/XML-RPC API via HTTP Request

The native node covers CRUD, but not method calls (action_confirm on an order, searches with complex domains, read_group for aggregates). For those, Odoo exposes its legacy external API over XML-RPC (/xmlrpc/2/common for authentication, /xmlrpc/2/object for calls) and JSON-RPC (/jsonrpc). From n8n, JSON-RPC is the practical choice: the HTTP Request node speaks JSON natively.

Example: finding opportunities with no activity for 14 days through execute_kw. After a first call to the common service (authenticate method) to fetch your uid, POST to https://your-instance.odoo.com/jsonrpc:

{
  "jsonrpc": "2.0",
  "method": "call",
  "params": {
    "service": "object",
    "method": "execute_kw",
    "args": [
      "database_name",
      2,
      "YOUR_API_KEY",
      "crm.lead",
      "search_read",
      [[["activity_date_deadline", "<", "2026-07-19"]]],
      { "fields": ["name", "email_from", "user_id"], "limit": 100 }
    ]
  },
  "id": 1
}

The 2 is the uid returned by authenticate, and the API key goes where the password would. For large volumes, combine limit and offset as described in our guide to API pagination with HTTP Request. One caution: Odoo has announced the eventual deprecation of these legacy RPC endpoints in favor of a new JSON API introduced with Odoo 19 — check the documentation for your version before building heavy integrations on them.

Good practices and limits

  • Dedicated user + API key: never the admin account, never the main password.
  • Idempotency: before creating a contact or lead, look it up first (Get All filtered on the email) to avoid duplicates when a webhook is replayed.
  • Relational fields: Odoo's many2one fields expect numeric IDs (stage ID, salesperson ID), not labels. Fetch those IDs once and keep them in the workflow.
  • Volumes: the Odoo node is not built for mass migrations; for tens of thousands of rows, use the API with pagination, or a direct database export/import.
  • Odoo Online plans: remember the external API restriction to Custom plans before promising an integration to a client on One App Free.

Key takeaways

The n8n Odoo node needs four pieces of information (URL, database, login, API key) and covers CRUD on contacts, opportunities, and notes — plus any model through Custom Resource. For business methods and complex queries, the JSON-RPC API via HTTP Request takes over. Start with a simple flow, web form to crm.lead, then extend to invoicing and pipeline alerts. You will find ready-to-adapt starting points among our n8n workflows.

FAQ

Frequently asked questions

Does the n8n Odoo node work with self-hosted Odoo Community?

Yes. The node connects to any Odoo instance reachable over HTTP(S), including a self-hosted Community installation. You need the instance URL, the database name, your login, and a password or API key. On Odoo Online (SaaS), however, external API access is restricted to paid Custom-type plans.

How do I work with an Odoo model the n8n node does not list?

Use the Odoo node's Custom Resource option: it lets you run CRUD operations on any technical model (sale.order, account.move, product.product, and so on) by typing its name. For business methods such as confirming an order or posting an invoice, call Odoo's JSON-RPC or XML-RPC API through the HTTP Request node.

Should I use my password or an API key in the credentials?

Always prefer an API key, generated from your Odoo profile (Preferences > Account Security > Developer API Keys, available since Odoo 14). You paste it into the password field of the n8n credential. It can be revoked without changing the account password and limits the blast radius if it leaks.

What is the difference between XML-RPC and JSON-RPC for Odoo?

Both protocols expose the same methods (authenticate, execute_kw) on the same models. JSON-RPC is easier to use from n8n because the HTTP Request node speaks JSON natively, with no XML to build. Note that Odoo has announced the deprecation of these legacy endpoints in favor of a new JSON API introduced with Odoo 19.

Bundle FlowKit Complet

€269