Odoo v2
Provides integration with Odoo, a business management (ERP) suite whose apps cover sales, invoicing, accounting, inventory, CRM, purchasing and more. Every app stores its data as records of a model, for example contacts in res.partner.
The Node queries, creates, updates and deletes records of any persistent model in the connected Odoo database. Templates are built from the database itself, so they list the models and fields of the apps you have installed. It works with Odoo Online, Odoo.sh, custom domains and on-premises servers.
Revision History
0.0.0.1 - Initial release.
Connection
| Property | Type | Description |
|---|---|---|
ApiType |
Enum | Json2, the default, uses an API key and requires Odoo 19 or later. JsonRpc uses a username and password, for servers before Odoo 19. |
BaseUrl |
String | The Odoo server root, for example https://mycompany.odoo.com. Use an https address with no path. Plain http is accepted only for localhost. |
Database |
String | The Odoo database name. Required for JsonRpc. Optional for Json2; set it when the server hosts several databases. |
ApiKey |
Masked | The Odoo API key of the user the Workflow acts as. Required for Json2. |
Username |
String | The Odoo login, usually an email address. Required for JsonRpc. |
Password |
Masked | The Odoo password, or an API key in place of the password. Required for JsonRpc. |
TimeoutSeconds |
Integer | Timeout for each request to Odoo, from 1 to 3600 seconds. The default is 100. |
Setup Notes
- Choose the
ApiTypethat matches your Odoo version:Json2for Odoo 19 and later, orJsonRpcfor earlier versions. - For
Json2, create an API key for the Odoo user the Workflow should act as and enter it inApiKey. ForJsonRpc, enter the user's login inUsernameand the password or an API key inPassword. - Enter the server root in
BaseUrland, when needed, the database name inDatabase. - Test the
Connection. ForJson2, a server older than Odoo 19 fails withJson2 requires Odoo 19 or later; select JsonRpc.
Keep the following in mind when you set up the Connection:
- The Node can only read and change the records the Odoo user is allowed to access.
- On Odoo Online, the external API needs Odoo's Custom plan. A
JsonRpcuser on Odoo Online needs a local password. - An expired or revoked API key fails with
Odoo authentication failed. Check the connection's ApiKey.Replace the key in theConnectionto continue. - Odoo is removing the JSON-RPC API in Odoo 22 and Odoo Online 21.1. Use
Json2on Odoo 19 and later.
This Node runs on the Cloud Cluster and on local Clusters. Use a local Cluster when your Odoo server is not reachable from the internet. When the local Cluster Host runs on the same machine as Odoo, BaseUrl can use plain http, for example http://localhost:8069.
Methods
The Node exposes four Methods: Query, Create, Update and Delete. Each Method lists one template per model in the connected database, named <Method> <Model Name> (<model>), for example Query Contact (res.partner). Select a template so Flowgear fills in the OperationId, Options and, for mutations, the Items fields of that model. Fields of types such as reference, properties and json are left out and named in the template description.
Query
Reads records of the selected model. Use it to export contacts, products, orders or any other Odoo records into other systems.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | The Odoo Connection. |
OperationId |
String | The template key that identifies the Odoo model. |
Options |
Object | Optional Domain, Fields, Order, Lang and CompanyIds values. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per Odoo record, without a Flowgear object. No matching records return zero rows. |
Options accepts these text values:
Domain: an Odoo domain as JSON text, for example[["active","=",true]]. Leave it empty to read every record.Fields: a comma-separated list of field names, for exampleid,name,email. Leave it empty to read the fields shown in the template'sResponse.Order: the sort order, for examplename asc.Lang: a language code for translated values, for exampleen_US.CompanyIds: a comma-separated list of company IDs the user may act in, for example1,2.
When Lang and CompanyIds are not set, the Odoo user's own defaults apply.
In the returned rows:
- Empty fields are
null. - A
many2onefield returns the related record's ID, plus a<field>_display_namecolumn with its display name, for examplecountry_idandcountry_id_display_name. one2manyandmany2manyfields return the related record IDs as comma-separated text, for example1,2.- Stored
binaryfields, such asimage_*fields, are not read unless you name them inFields.
Create
Creates one record of the selected model for each item.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | The Odoo Connection. |
OperationId |
String | The template key that identifies the Odoo model. |
Items |
Array | The records to create, one per item. Required. |
Options |
Object | Optional Lang and CompanyIds values. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per item with the new record's id and the Flowgear object with IsSuccess, Message and Request. id is null when the item failed. |
Fields that Odoo requires are listed first in the template and marked Required. in their description.
Update
Updates one existing record of the selected model for each item.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | The Odoo Connection. |
OperationId |
String | The template key that identifies the Odoo model. |
Items |
Array | The records to update, one per item. Each item's id selects the record, and its other fields are the values to write. Required. |
Options |
Object | Optional Id fallback record ID, plus Lang and CompanyIds values. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per item with the targeted record's id and the Flowgear object with IsSuccess, Message and Request. |
Fields you leave out of an item keep their current values in Odoo.
Delete
Deletes one record of the selected model for each item.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | The Odoo Connection. |
OperationId |
String | The template key that identifies the Odoo model. |
Items |
Array | The records to delete, one per item. Each item's id selects the record. Required. |
Options |
Object | Optional Id fallback record ID. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per item with the targeted record's id and the Flowgear object with IsSuccess, Message and Request. |
Usage Notes
- For
UpdateandDelete, each item'sidselects its record, so one Step can change or delete many records. Items without aniduseOptions.Id. - Write
many2onefields as the related record's ID, for example"country_id": 3. Writeone2manyandmany2manyfields as comma-separated record IDs:"3,7"replaces the related records with records3and7, and""removes them all. - Templates show
datevalues as2026-01-31,datetimevalues as2026-01-31 13:45:00, andbinaryvalues as base64 text. - If you change
ApiTypefromJsonRpctoJson2, keepDatabasefilled in so saved Steps keep working. - If a Step fails with
The selected template key is stale or unknown. Refresh the template list., reselect the template. Queryerrors fail the Step. A failedCreate,UpdateorDeleteitem returnsFlowgear.IsSuccessset tofalsewith Odoo's message, and later items still run. A timeout or an authentication failure fails the Step, and earlier items are already saved.Create,UpdateandDeleterequests are not retried. A write that times out may still have been applied in Odoo, so check the records before you run the Step again.
Known Issues
- Only reading, creating, updating and deleting records are supported. Other model methods, such as
action_confirmandmessage_post, as well as aggregates, attachments and upsert, are not supported. - A saved Step only works with a
Connectionthat points at the same Odoo server and database. If you switch a Workflow to aConnectionfor another server or database, reselect the template on each Odoo Step. - An on-premises Odoo server that only serves plain
httpacross a network cannot be reached. Put TLS in front of it, or run the Workflow on a local Cluster Host on the same machine and use alocalhostaddress.