Tameson Odoo icon

Tameson Odoo

Consume Odoo API

Overview

The Tameson Odoo node for n8n allows you to interact with the Odoo API, specifically targeting the "Contact" resource. The Get Many (getAll) operation retrieves multiple contact records from your Odoo instance. This is useful for scenarios where you need to list, filter, or process batches of contacts—such as syncing contacts to another system, generating reports, or performing bulk updates.

Practical examples:

  • Fetching all contacts to synchronize with a CRM or marketing tool.
  • Retrieving a limited set of contacts for review or processing in an automation workflow.
  • Selecting specific fields from each contact to minimize data transfer and focus on relevant information.

Properties

Name Type Meaning
Return All Boolean Whether to return all available contact records (true), or limit the number of results (false).
Limit Number The maximum number of contact records to return. Only shown if "Return All" is false.
Options Collection Additional options for the request.
Fields to Include MultiOptions Within "Options": Specify which fields of the contact records to include in the output. You can select from a list or provide field IDs/expressions.

Output

  • The output is a JSON array, where each element represents a contact record retrieved from Odoo.
  • Each object contains the fields requested via "Fields to Include", or all default fields if none are specified.
  • Example output structure:
[
  {
    "id": 123,
    "name": "John Doe",
    "email": "john.doe@example.com"
    // ...other fields as selected
  },
  {
    "id": 124,
    "name": "Jane Smith",
    "email": "jane.smith@example.com"
    // ...other fields as selected
  }
]
  • No binary data is returned by this operation.

Dependencies

  • Odoo API: Requires access to an Odoo instance with valid credentials (URL, username, password, database name).
  • n8n Credentials: You must configure Odoo API credentials in n8n under the name odooApi.

Troubleshooting

Common issues:

  • Invalid Credentials: If the Odoo API credentials are incorrect, authentication will fail. Error message:
    "Credentials are not valid" or "Settings are not valid: ..."

    • Resolution: Double-check the URL, username, password, and database name in your n8n credentials.
  • Insufficient Permissions: The user may lack permission to read contacts.

    • Resolution: Ensure the Odoo user has appropriate access rights to the Contact model.
  • Field Selection Errors: Specifying invalid or misspelled field names in "Fields to Include" may result in missing data or errors.

    • Resolution: Use the provided field selector or verify field names in your Odoo instance.
  • Large Data Volumes: Requesting all contacts without filters in large databases may lead to performance issues.

    • Resolution: Use the "Limit" property or apply filters to reduce the dataset size.

Links and References

Discussion