Connecting Odoo to your other tools: APIs, n8n, and when to build custom
Online store, bank, carrier, payroll, AI: how to link Odoo to the rest of your information system without double entry, and how to choose between a connector, n8n and custom development.
By Sudo System Team
Development & Integrations Practice
Every morning, in many of the companies we visit, someone opens two windows side by side. On the left, the online store or the carrier's portal. On the right, Odoo. And for an hour, sometimes two, that person copies over orders, tracking numbers and amounts. They do it well, carefully. But now and then they make a mistake, like anyone would, and those mistakes are expensive. An ERP only delivers its full value when it talks to the company's other tools. The good news: Odoo is fairly open. The less good news: there are ten ways to connect it, and they are not all equal.
What Odoo offers out of the box
Odoo has long exposed an external API available over XML-RPC and JSON-RPC. In practice, any authorised program can read, create, update or search records: orders, customers, invoices, products, stock moves. Everything you see on screen is, in principle, reachable through the API, with the same access rules as the user who logs in.
Since Odoo 19, a new API called JSON-2 is available, and the older XML-RPC and JSON-RPC endpoints have been announced as deprecated in the long run. For a new project, check your instance's version and Odoo's roadmap before choosing. On the versions still widely used in Morocco, JSON-RPC remains the most common route.
On the event side, Odoo's automated actions can, in recent versions, send a webhook when a record changes and receive incoming calls. This is useful for reacting in real time rather than polling Odoo every five minutes. Finally, the Odoo App Store and the OCA community offer many ready-made connectors, of very variable quality.
An example: reading orders in Python
To demystify things, here is a deliberately simple snippet that retrieves the latest confirmed orders via JSON-RPC. It uses an API key rather than a password, generated from the preferences of a user dedicated to the integration.
import os
import requests
ODOO_URL = "https://erp.your-company.ma"
ODOO_DB = "production"
ODOO_USER = "integration@your-company.ma"
# The API key is never hard-coded: it comes from the environment
ODOO_KEY = os.environ["ODOO_API_KEY"]
# Generic JSON-RPC call to Odoo
def call(service, method, *args):
payload = {"jsonrpc": "2.0", "method": "call",
"params": {"service": service, "method": method, "args": args}}
r = requests.post(f"{ODOO_URL}/jsonrpc", json=payload, timeout=30)
r.raise_for_status()
data = r.json()
if "error" in data:
# Odoo returns business errors in the body, not as an HTTP status
raise RuntimeError(data["error"]["data"]["message"])
return data["result"]
# 1. Authentication: get the user's numeric ID
uid = call("common", "login", ODOO_DB, ODOO_USER, ODOO_KEY)
# 2. Orders confirmed since 8 July, most recent first
orders = call("object", "execute_kw", ODOO_DB, uid, ODOO_KEY,
"sale.order", "search_read",
[[["state", "=", "sale"], ["date_order", ">=", "2026-07-08"]]],
{"fields": ["name", "partner_id", "amount_total", "date_order"],
"limit": 50, "order": "date_order desc"})
for o in orders:
print(o["name"], o["partner_id"][1], o["amount_total"])
Twenty lines are enough to read data. What takes time in a real project is not the call itself but everything around it: field mappings, error cases, duplicates, recovery after an outage.
Automation platforms: n8n, Make, Zapier
Between the off-the-shelf connector and pure code lies a very handy middle ground. Automation platforms let you build visual workflows: "when an order arrives in the store, create the customer if they don't exist, then the order in Odoo, then notify the warehouse".
Zapier and Make are hosted services, quick to learn and billed by usage. They work well for modest volumes and simple flows. Their limits show when volumes grow, because the bill grows with them, and when your data must not pass through foreign servers.
n8n is our preferred option for most Moroccan SMEs, because it can be self-hosted on your own server. Your data stays with you, the cost does not depend on the number of executions, and when a visual node is no longer enough, you can drop in a few lines of JavaScript or Python. It is low-code in the true sense: visual for the most part, coded where necessary.

When to build custom: Odoo module or microservice
Some integrations justify specific development. There are two forms. First, the Odoo module: it lives inside the ERP, adds fields, screens and business rules, and benefits directly from Odoo's security and interface. It is the right choice when the integration changes the way users work in Odoo.
Second, the microservice: a small standalone program, hosted next to Odoo, that orchestrates heavy or complex exchanges. You turn to it when the logic is rich, volumes are high, or several systems must be coordinated without weighing down the ERP.
"A client once asked us why we didn't do everything in n8n. We opened his stock sync workflow together: sixty nodes, three nested loops, manual fixes every week. The day a visual workflow becomes harder to read than the equivalent code, it's time to change tools." — a developer from the Development & Integrations practice
Five integrations we see often
The e-commerce store first. WooCommerce, Shopify or PrestaShop: connectors exist, but they almost always need adjusting for variants, discounts and returns. Allow time for product mapping; that is where most stock discrepancies are born.
Then the bank. Ideally, statements are imported automatically to speed up reconciliation. Depending on the bank, this goes through an API, a file dropped at regular intervals or a structured manual import. An n8n workflow that fetches the file, normalises it and imports it into Odoo often saves the accounting team several hours a month.
The carrier: shipments created automatically from the delivery order, labels and tracking numbers retrieved, then status updates. For payroll, the usual approach is to push accounting entries from the existing payroll software into Odoo rather than migrate everything. Finally, the AI pipeline: a supplier document arrives by email, a model extracts the data, and a draft invoice is created in Odoo for a human to validate.
No-code, low-code, custom: the comparison
To help you decide, here is the grid we use during our scoping sessions. It does not replace case-by-case analysis, but it prevents the obvious mistakes.
| Criterion | No-code (connector, Zapier, Make) | Low-code (self-hosted n8n) | Custom (module, microservice) |
|---|---|---|---|
| Initial cost | Low | Moderate | High |
| Recurring cost | Grows with volume | Stable (server and maintenance) | Maintenance at each version upgrade |
| Robustness | Fine for simple flows | Good if well designed | Highest |
| Data control | Passes through a third party | Full if self-hosted | Full |
| Ideal case | Small volumes, standard needs | Varied business flows, SMEs | Critical logic, large volumes |
Key takeaway — Start with the simplest option that holds up. A connector or a well-built n8n workflow covers most needs; keep custom development for exchanges that are critical, high-volume or that change the way people work in Odoo.
Good practices that prevent nasty surprises
Whatever the approach, three principles make the difference between an integration that lasts for years and one you fix every Monday.
Logging, first. Every exchange should leave a readable trace: what, when, with what result. When a customer calls about a missing order, you should be able to answer in two minutes, not two days.
Error recovery, second. Networks drop, APIs go down, servers restart. A good integration retries automatically, queues whatever could not go through and, above all, does not create duplicates when it replays a message. This is called idempotency, and it is often what rushed integrations lack.
Key security, finally. One dedicated Odoo user per integration, with strictly the rights it needs. API keys stored in a vault or environment variables, never in the code or a shared spreadsheet. And regular rotation, especially when a contractor or employee leaves.
Where to start
List your current re-keying tasks and estimate, even roughly, how much time they take each week. Rank them by volume and error risk. The first on the list is your best candidate for a pilot integration, ideally achievable in a few weeks. Measure the result, then move on to the next one.
If you would like an opinion on the approach best suited to your context, the Sudo System team can support you through this scoping work.