Odoo icon

Odoo

Consume Odoo API

Contact → Get Many

AI-generated

Overview

The Odoo node for n8n allows you to interact with the Odoo API, specifically targeting the "Contact" resource. The Get Many operation (getAll) retrieves multiple contact records from your Odoo instance. This is useful for scenarios where you need to fetch lists of contacts for reporting, synchronization, or further processing in your automation workflows.

Practical examples:

  • Retrieve all contacts to sync them with another CRM.
  • Fetch a limited set of contacts for batch email campaigns.
  • Get specific fields (e.g., name, email) for all contacts to generate a report.

Properties

Name Meaning
Return All Whether to return all results or only up to a given limit. If enabled, all matching contacts are returned; if disabled, the number of results is limited by the "Limit" property.
Limit Max number of results to return. Only shown if "Return All" is false. Accepts values between 1 and 1000.
Options Additional options for the request:
- Fields to Include: Select which fields to include in the response. You can choose from a list or specify field IDs using an expression.

Output

The output is a JSON array where each item represents a contact record retrieved from Odoo. The structure of each object depends on the fields selected in "Fields to Include". By default, standard contact fields such as id, name, email, etc., may be included.

Example output:

[
  {
    "id": 1,
    "name": "John Doe",
    "email": "john.doe@example.com"
    // ...other fields as specified in "Fields to Include"
  },
  {
    "id": 2,
    "name": "Jane Smith",
    "email": "jane.smith@example.com"
    // ...other fields
  }
]
  • If no fields are specified, a default set of fields will be returned.
  • The output does not include binary data.

Dependencies

  • Odoo API: Requires access to an Odoo instance with valid credentials.
  • Credentials: You must configure the odooApi credential in n8n, including:
    • Odoo URL
    • Database name
    • Username
    • Password

Troubleshooting

Common issues:

  • Invalid Credentials: If authentication fails, ensure your Odoo URL, database, username, and password are correct.
  • Field Selection Errors: Specifying invalid or non-existent fields in "Fields to Include" may result in errors or empty responses.
  • API Limits: If "Limit" exceeds the allowed maximum (1000), the node may throw an error.

Error messages:

  • "Credentials are not valid": Check your Odoo credentials and try again.
  • "Settings are not valid: ...": There may be a misconfiguration in your Odoo connection settings.
  • "error" in output: If "Continue On Fail" is enabled, failed items will have an error property with the error message.

Links and References

Discussion