Actions2
- Contact Actions
- Custom Resource Actions
Overview
This node integrates with the Odoo ERP system to find contact records based on specified field criteria. It is useful when you need to search for contacts in Odoo by matching one or more fields with given values and operators. For example, you can use it to retrieve contacts whose email contains a certain domain, or contacts created after a specific date.
Typical scenarios include:
- Filtering contacts by custom attributes stored in Odoo.
- Retrieving a limited set or all contacts matching complex search conditions.
- Sorting and selecting specific fields from the contact records.
Properties
Name | Meaning |
---|---|
Model | The Odoo model representing contacts. Default is res.partner . |
Search Fields | A collection of fields to search by. Each includes: - Field Name: The name of the field to filter on. - Field Value: The value to compare against. - Operator: Comparison operator ( = , != , like , > , < , >= , <= ). |
Return All | Boolean flag indicating whether to return all matching results or limit the number of returned records. |
Limit | Maximum number of records to return if "Return All" is false. Minimum is 1. Default is 50. |
Options | Additional options including: - Return Fields: Comma-separated list of fields to include in the output (empty means all fields). - Sort: Comma-separated sorting instructions, e.g., name asc, id desc . |
Output
The node outputs an array of JSON objects representing the found contact records. Each object contains the fields retrieved from Odoo according to the specified "Return Fields" option or all fields if none specified.
If binary data were involved (not indicated here), it would be summarized accordingly, but this node focuses on JSON data output.
Dependencies
- Requires connection credentials to an Odoo instance, including URL, database name, username, and either password or API key authentication.
- The node depends on an external method (
findByField
) implemented in the bundledmethods
module to perform the actual query to Odoo. - Proper configuration of the Odoo API credentials within n8n is necessary.
Troubleshooting
- No results returned: Check that the field names and values are correct and exist in the Odoo model. Also verify the operator used matches the expected data type.
- Authentication errors: Ensure the provided Odoo credentials (URL, database, username, password/API key) are valid and have sufficient permissions.
- Invalid field or model name: Confirm the model name (default
res.partner
) and field names are accurate and accessible in your Odoo instance. - Limit vs Return All confusion: If no results appear, verify if "Return All" is false and the limit is too low; increase the limit or enable "Return All".
- Sorting issues: Incorrect syntax in the "Sort" option may cause errors; use the format
fieldName asc
orfieldName desc
separated by commas.