Odoo icon

Odoo

Consume Odoo API

Overview

This node updates an existing Contact in Odoo via its API. It is designed for scenarios where you need to programmatically modify contact details—such as updating addresses, phone numbers, emails, or other profile information—in your Odoo CRM from within n8n workflows.

Common use cases:

  • Synchronizing contact data between Odoo and another system (e.g., after a user changes their email in a web app).
  • Bulk-updating contact records based on external triggers.
  • Automating enrichment of contact profiles with new information.

Example:
When a customer updates their address in your e-commerce platform, this node can automatically update the corresponding contact record in Odoo.


Properties

Name Meaning
Contact ID The unique identifier of the contact to update. Required.
Update Fields A collection of fields to update for the contact. You can specify one or more of the following:
  • Address: Structured address fields (City, Country Name or ID, State Name or ID, Street, Street 2, Zip Code)
  • Email: Email address
  • Internal Notes: Free-form notes about the contact
  • Job Position: The contact's job title or function
  • Mobile: Mobile phone number
  • Name: Full name of the contact
  • Phone: Landline phone number
  • Tax ID: VAT or tax identification number
  • Website: Website URL

Output

The output will be a JSON object representing the updated contact record as returned by the Odoo API. The structure typically includes all standard Odoo contact fields, such as:

{
  "id": 123,
  "name": "John Doe",
  "email": "[email protected]",
  "phone": "+1234567890",
  "mobile": "+0987654321",
  "website": "https://example.com",
  "vat": "DE123456789",
  "comment": "VIP client",
  "function": "Manager",
  "address": {
    "city": "Berlin",
    "country_id": 49,
    "state_id": 12,
    "street": "Main St 1",
    "street2": "",
    "zip": "10115"
  },
  ...
}

If an error occurs and "Continue On Fail" is enabled, the output will include an error field with the error message.


Dependencies

  • Odoo instance: You must have access to an Odoo server with API access enabled.
  • API Credentials: Requires an n8n credential named odooApi containing:
    • Odoo URL
    • Database name
    • Username
    • Password

No additional environment variables are required beyond the credentials.


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 Odoo URL, database name, username, and password in your n8n credentials.
  • Contact Not Found: If the provided Contact ID does not exist, the update will fail.
    • Resolution: Ensure the Contact ID is correct and exists in Odoo.
  • Missing Required Fields: If required fields are omitted or incorrectly formatted, Odoo may reject the update.
    • Resolution: Verify that all required fields are provided and correctly formatted.
  • Field Value Errors: For fields like Country or State, ensure you provide valid IDs or names as expected by Odoo.

Links and References

Discussion