I’m trying to set up a workflow in n8n that connects to my Odoo system. Both services are running on cloud platforms.
My goal is to create an automated process that runs daily to fetch customer data from Odoo and then sync it with my Revo system. The basic connection is working properly.
The problem I’m facing is that I need to filter which customer records get imported. I don’t want to pull all contacts every time. I’ve heard about using domain filters but I can’t find good documentation on how to implement this properly.
Does anyone know how to add filtering conditions to the Odoo connector? I want to be selective about which records get processed in my workflow.
Any guidance would be appreciated!
yeah, i had that issue too! make sure to check the ‘additional fields’ in your Odoo node - there’s a domains option in there. try using something like [('customer_rank', '>', 0)] to get only the real customers. just remember to test it first, bad syntax can mess things up.
quick tip - if ur hitting timeouts with large datasets, add a limit field with ur domain filter. i use [('customer_rank', '>', 0), ('active', '=', True)] and cap it at 500 records per run. stops crashes and keeps everything stable.
Skip the domain syntax headaches and n8n’s limitations - just switch to Latenode.
I’ve built dozens of Odoo integrations, and Latenode’s filtering blows n8n out of the water. No more memorizing Python tuple syntax or wrestling with cryptic expressions.
Everything’s drag and drop. Need customers from the last day? Drop in a date filter. Want to exclude companies? Add a boolean node. Done.
Scheduling actually works too. One client runs 15+ daily Odoo syncs without issues. When something breaks, the error messages make sense.
Same filtering power as n8n, but visual instead of code. Less debugging, easier changes when requirements shift.
Check it out: https://latenode.com
I’ve been working with similar setups for two years and the key is nailing the domain syntax upfront. In your Odoo node settings, find the ‘Domain’ parameter in advanced options. It uses Odoo’s standard tuple and operator format. For daily syncs, I filter with [('write_date', '>=', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d'))] to grab only records modified in the last 24 hours. This cuts processing load way down versus pulling everything each time. I also use [('is_company', '=', False), ('customer_rank', '>', 0)] when I just need individual customers, not companies. What tripped me up at first - the domain has to be a proper Python expression, not plain text. Test your domain filters in Odoo’s interface first and you’ll save yourself debugging headaches later.
Domain filtering gets way easier once you know which field types you’re working with. I made a rookie mistake early on - was filtering computed fields instead of stored ones and killed my performance. For weekly batches, use [('create_date', '>=', (datetime.now() - timedelta(days=7)).strftime('%Y-%m-%d %H:%M:%S'))]. Got specific customer segments? Try [('category_id', 'in', [1,2,3])]. But here’s what really saved me: [('active', '=', True)] to skip archived records. Nothing worse than syncing dead data. Working with huge datasets? Add a limit parameter with your domain filter - you’ll thank me later. Pro tip: test everything in Odoo’s developer mode using the search function first, then just copy the working domain straight into n8n.
The domain filter in n8n’s Odoo connector can be quite intuitive once you are familiar with the correct syntax. In your Odoo node configuration, you will find a ‘Domain’ field under ‘Options’, which requires using Odoo’s domain format—essentially Python-like expressions. If you’re scheduling daily syncs, consider filtering by modification date; for example, [('write_date', '>=', '2024-01-01')] would effectively extract records updated since that date. You can also combine multiple conditions using ‘&’ for AND operations or ‘|’ for OR operations. From my experience over the past eight months, refining the filters based on customer status or specific tags significantly optimizes processing time. It’s a good idea to test these domain expressions directly in Odoo before applying them in your n8n setup.