Syncing specific Odoo contacts with n8n: How to filter?

Hey everyone! I’m new to n8n and I’m trying to set up a daily sync between Odoo and Revo for contacts. The Odoo node is working, but I can’t figure out how to import only certain contacts.

I’ve heard about using a ‘domain’ filter, but I’m lost on how to actually do this. Does anyone have experience with this? I’m using both Odoo and n8n in SaaS mode if that matters.

I’d really appreciate any tips or tricks for filtering contacts before they’re imported into n8n. It would save me a ton of time!

Thanks for any help you can give!

I’ve worked extensively with Odoo and n8n integration. For filtering contacts, you’ll want to utilize the ‘domain’ parameter in the Odoo node configuration. The syntax follows Odoo’s domain format, which can be a bit tricky at first.

A useful filter might be [[‘customer_rank’, ‘>’, 0]] to select only customers. You can combine multiple conditions using AND/OR operators. For instance, [[‘customer_rank’, ‘>’, 0], ‘|’, [‘supplier_rank’, ‘>’, 0], [‘employee’, ‘=’, true]] would select customers, suppliers, or employees.

Remember to test your domain filter in Odoo first to ensure it returns the expected results before implementing it in n8n. This approach should significantly streamline your daily sync process.

I’ve been in your shoes, Scarlett.

When I first started integrating Odoo with n8n, filtering contacts was a real headache. In the Odoo node settings, look for the ‘Additional Options’ section—there’s a field called ‘Operation Filter’ where you enter your domain filter.

For instance, if you want to sync only active customers, try using: [[‘active’, ‘=’, true], [‘customer_rank’, ‘>’, 0]]. You might also filter by creation date with: [[‘create_date’, ‘>’, ‘2023-01-01’]].

Keep in mind that the fields can vary depending on your Odoo configuration. It took some trial and error for me to get it right, so testing with n8n’s ‘Test Operation’ button can save you time and frustration.

Hope this helps, and best of luck with your sync!

hey scarlett! i’ve dealt with this before. for filtering odoo contacts, you can use the ‘domain’ parameter in the Odoo node. try something like [[‘is_company’, ‘=’, true]] to get only companies. you might need to play around with the syntax a bit. good luck with your sync!