I need help with filtering data in my n8n workflow
I’m building an automation that connects to Odoo using n8n’s Odoo connector. Both platforms are running as cloud services. My workflow pulls customer data from Odoo daily and then pushes it to Revo for synchronization.
The problem is that I want to limit which customer records get imported instead of pulling everything. I heard there’s a way to use domain filtering but I can’t figure out how to set it up properly.
Does anyone know how to configure selective filtering when fetching records through the Odoo node? Any examples or documentation would be really helpful.
Thanks for any advice you can share!
I’ve been using this exact setup for months and hit the same problem at first. The trick is formatting your domain filtering as proper JSON in the additional fields section. I usually do something like [[‘active’, ‘=’, True], [‘customer_rank’, ‘>’, 0]] to pull only active customers. Pro tip - test your domain syntax in Odoo’s developer mode first. Go to the customer list, use advanced search, and make sure your field names and operators actually work before dropping them into n8n. Also heads up - some fields have different technical names than what shows in the UI. If your filter’s not working, check Odoo’s field definitions to grab the right names.
In the Odoo node settings within n8n, navigate to the “Options” or “Additional Options” section where you can establish your domain criteria. Employ the standard domain format used by Odoo (Polish notation). For instance, [[‘is_company’, ‘=’, True]] allows you to filter specifically for companies, while [[‘customer_rank’, ‘>’, 0]] is useful for retrieving actual customers. You also have the option to combine conditions using ‘&’ or ‘|’ for more intricate queries. It’s advisable to first test your domain filters directly in Odoo to ensure they function correctly before incorporating them into your n8n workflow.
hey! yeah, the domain filter’s easy once you figure it out. go to your odoo node config, find ‘additional fields’, and add a domain parameter. use this format: [[‘field_name’, ‘operator’, ‘value’]] - like [[‘create_date’, ‘>=’, ‘2024-01-01’]] for recent customers. works perfectly!