Odoo icon

Odoo

Consume Odoo API

Overview

This node allows you to retrieve a specific contact from your Odoo system by its unique Contact ID. It is useful in scenarios where you need to fetch detailed information about a single contact, such as for data enrichment, synchronization with other systems, or automated workflows that require up-to-date contact details.

Practical examples:

  • Fetching a contact's full profile to send a personalized email.
  • Retrieving contact details to update records in another CRM.
  • Getting contact information for reporting or analytics purposes.

Properties

Name Meaning
Contact ID The unique identifier of the contact you want to retrieve. This field is required.
Options Additional options for the request.
– Fields to Include Specify which fields of the contact to include in the response. You can select multiple fields from a list or specify their IDs using an expression.

Output

The output will be a JSON object containing the details of the requested contact. The structure and fields of the output depend on the "Fields to Include" option; only the selected fields will be present in the output. If no fields are specified, a default set of contact fields will be returned.

Example output:

{
  "id": 123,
  "name": "John Doe",
  "email": "[email protected]",
  "phone": "+1234567890"
}

Note: The actual fields depend on your selection in "Fields to Include".

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 Contact ID: If the provided Contact ID does not exist, the node may return an empty result or an error.
  • Missing or incorrect credentials: If the Odoo API credentials are missing or incorrect, authentication will fail.
  • Insufficient permissions: The user associated with the credentials must have permission to read contacts in Odoo.

Error messages and resolutions:

  • "Credentials are not valid": Check your Odoo URL, username, password, and database name.
  • "Settings are not valid: ...": There may be a configuration issue; verify all credential fields.
  • "Cannot read property 'fieldsList' of undefined": Ensure the "Options" property is properly configured if you are specifying fields.

Links and References

Discussion