Filtering contacts in n8n Odoo integration using domain parameters

I’m trying to set up an automated workflow in n8n that connects to my Odoo instance. The basic connection works well, but I need help with filtering specific contacts during the import process.

My goal is to create a daily automation that pulls only certain contacts from Odoo and then syncs them with another system. I’ve heard about using domain filters for this purpose, but I can’t find clear documentation on how to implement them properly.

Both platforms are running as cloud services. Does anyone know the correct syntax for domain filtering in the Odoo node, or is there an alternative method to select specific records before importing?

Any guidance would be really helpful!

Domain filtering in Odoo can be challenging initially, but once you grasp the concepts, it becomes very effective. To streamline your daily automation, consider implementing time-based queries alongside specific filters for contacts. For instance, you can utilize the syntax [('create_date', '>=', (datetime.now() - timedelta(days=1)).strftime('%Y-%m-%d'))] to target records created within the last day. In case your filtering needs become complex, it’s advisable to break down the filters into separate n8n nodes instead of placing all the conditions within a single expression, which can simplify troubleshooting.

For domain filtering in n8n’s Odoo integration, use this syntax: [('field_name', 'operator', 'value')]. If you’re looking for contacts modified after a specific date, try [('write_date', '>=', '2024-01-01')]. You can also chain conditions - ['&', ('is_company', '=', False), ('active', '=', True)] will filter for active individual contacts. A useful tip is to test these expressions in Odoo’s advanced search first, as it can greatly reduce debugging time in your n8n workflows.

for domain filters in odoo, try using syntax like [('is_company', '=', True)] for companies or [('customer_rank', '>', 0)] for customers. u can mix conditions with & and | operators. it gets easier once you get used to it!