odoo
Execute operations on any Odoo model using the XML-RPC API.
Overview
Execute operations on any Odoo model using the XML-RPC API.
This step provides a unified interface to interact with any Odoo module including CRM, Sales, Inventory, Accounting, and custom modules. It supports all standard Odoo operations: search, read, create, write, unlink, and search_read. You can filter records using Odoo's domain syntax, specify which fields to retrieve, and perform CRUD operations on any model. The connector handles authentication via XML-RPC and supports template substitution for dynamic workflows.
Setup: 1. Have access to an Odoo instance (Odoo Online or self-hosted) 2. Get the instance URL (e.g., https://yourcompany.odoo.com) 3. Create or use an existing database name 4. Get API credentials (username and password or API key) 5. Store credentials securely (e.g., environment variables)
Authentication: Requires URL, database name, username, and password (or API key)
Examples
Search CRM leads
Get qualified leads from Odoo CRM with filtering
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: crm.lead
method: search_read
domain:
- ["stage_id.name", "=", "Qualified"]
- ["create_date", ">=", "2025-01-01"]
fields:
- name
- email_from
- phone
- expected_revenue
limit: 100
output_to: leads
Create sale order with line items
Create a new sale order with multiple products
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: sale.order
method: create
record:
partner_id: ${customer.odoo_id}
date_order: ${event.timestamp}
order_line:
- product_id: 123
product_uom_qty: 2
price_unit: 50.00
- product_id: 456
product_uom_qty: 1
price_unit: 75.00
output_to: new_order
Update contact information
Update partner/contact details
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: res.partner
method: write
ids:
- ${partner.id}
record:
phone: ${partner.new_phone}
email: ${partner.new_email}
street: ${partner.address}
output_to: update_result
Search products with pagination
Get products with stock info using pagination
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: product.product
method: search_read
domain:
- ["sale_ok", "=", true]
- ["qty_available", ">", 0]
fields:
- name
- list_price
- qty_available
- default_code
limit: 50
offset: 0
output_to: products
Count records
Count leads matching specific criteria
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: crm.lead
method: search_count
domain:
- ["stage_id.name", "=", "New"]
- ["user_id", "=", ${env:ODOO_USER_ID}]
output_to: lead_count
Read specific records by ID
Fetch full details of specific records
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: sale.order
method: read
ids:
- ${order.id}
fields:
- name
- partner_id
- amount_total
- state
- order_line
output_to: order_details
Search for record IDs only
Get list of IDs without full record data
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: res.partner
method: search
domain:
- ["is_company", "=", true]
- ["country_id.code", "=", "US"]
limit: 1000
output_to: company_ids
Create inventory adjustment
Update product stock quantity
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: stock.quant
method: write
ids:
- ${stock.quant_id}
record:
inventory_quantity: ${stock.new_quantity}
output_to: inventory_update
Create invoice from order
Generate an invoice for a sale order
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: account.move
method: create
record:
move_type: out_invoice
partner_id: ${customer.id}
invoice_date: ${event.date}
invoice_line_ids:
- product_id: ${item.product_id}
quantity: ${item.quantity}
price_unit: ${item.price}
output_to: invoice
Delete obsolete records
Remove unwanted records from Odoo
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: crm.lead
method: unlink
ids:
- ${lead.id}
output_to: delete_result
Complex domain search
Search with multiple conditions and operators
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: sale.order
method: search_read
domain:
- "|"
- ["state", "=", "sale"]
- ["state", "=", "done"]
- ["date_order", ">=", "2025-01-01"]
- ["amount_total", ">", 1000]
fields:
- name
- partner_id
- amount_total
- state
limit: 200
output_to: orders
Sync external contact to Odoo
Create or update partner from external system
type: odoo
url: ${env:ODOO_URL}
database: ${env:ODOO_DB}
username: ${env:ODOO_USERNAME}
api_key: ${env:ODOO_API_KEY}
object: res.partner
method: create
record:
name: ${contact.name}
email: ${contact.email}
phone: ${contact.phone}
street: ${contact.address}
city: ${contact.city}
zip: ${contact.postal_code}
country_id: ${contact.country_id}
is_company: false
comment: Synced from external system on ${event.timestamp}
output_to: partner_id
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Odoo instance URL (e.g., https://yourcompany.odoo.com) |
database | string | Yes | Odoo database name |
username | string | Yes | Odoo username (email) |
api_key | string | Yes | Odoo API key or password for authentication |
object | string | Yes | Odoo model name (e.g., 'crm.lead', 'sale.order', 'res.partner') |
method | string | No | Odoo method to execute: 'search', 'read', 'create', 'write', 'unlink', 'search_read', 'search_count'
Default: "search_read" |
domain | string | No | Odoo domain filter (list of tuples). Used for search operations. |
fields | string | No | List of field names to retrieve. If None, returns all fields. |
ids | string | No | List of record IDs for read, write, or unlink operations. Supports template substitution. |
record | string | No | Record data for create or write operations (dictionary of field:value) |
limit | string | No | Maximum number of records to return for search operations |
offset | integer | No | Number of records to skip for pagination
Default: 0 |
timeout | integer | No | Request timeout in seconds
Default: 30 |
output_to | string | No | Event key where the Odoo response will be stored
Default: "odoo" |
Base Configuration
These configuration options are available on all steps:
| Parameter | Type | Default | Description |
|---|---|---|---|
name | | null | Optional name for this step (for documentation and debugging) |
description | | null | Optional description of what this step does |
retries | integer | 0 | Number of retry attempts (0-10) |
backoff_seconds | number | 0 | Backoff (seconds) applied between retry attempts |
retry_propagate | boolean | false | If True, raise last exception after exhausting retries; otherwise swallow. |