Odoo Trigger icon

Odoo Trigger

Handle Odoo events via webhooks (v.1.0.1)

Overview

The Odoo Trigger node for n8n enables workflows to react to events occurring in an Odoo system via webhooks. It allows you to monitor changes (such as creation, update, or deletion) on any Odoo model and trigger automated processes in n8n when those events happen. This is particularly useful for integrating Odoo with other systems, automating notifications, synchronizing data, or initiating business logic based on real-time changes in your Odoo database.

Practical examples:

  • Automatically send a Slack message when a new sales order is created in Odoo.
  • Sync customer updates from Odoo to a CRM whenever a contact is modified.
  • Archive records in another system when they are deleted in Odoo.

Properties

Name Meaning
Resource Name or ID Choose the Odoo model to watch for events. You can select from a list of available models or specify a model ID using an expression.
Trigger The type of event in Odoo that should activate the webhook. Options:
- On Create
- On Update
- On Create And Update
- On Delete

Output

The node outputs a JSON object representing the Odoo record(s) involved in the triggering event. The structure of this object matches the fields of the Odoo model being monitored. If multiple records are sent by Odoo, the output will be an array of such objects.

Example output:

[
  {
    "id": 42,
    "name": "Sample Record",
    "field1": "value1",
    "field2": "value2"
    // ...other fields as defined in the selected Odoo model
  }
]
  • The exact fields depend on the chosen Odoo model.
  • No binary data is produced; all output is in JSON format.

Dependencies

  • Odoo instance: Requires access to an Odoo server with API credentials (URL, username, password, and optionally database name).
  • API Credentials: Must be configured in n8n under the credential type odooApi.
  • n8n Configuration: The node must be accessible from the Odoo server (publicly reachable URL for webhooks).

Troubleshooting

Common issues:

  • Invalid credentials: If the Odoo API credentials are incorrect, authentication will fail. Error messages like "Credentials are not valid" or "Settings are not valid" may appear. Double-check the URL, username, password, and database name.
  • Node name contains spaces: The webhook URL cannot contain spaces. If the node's name includes spaces, you'll see an error:
    "The name of the Odoo Trigger Node is not allowed to contain any spaces!"
    Rename the node to remove spaces.
  • Webhook not triggered: Ensure the Odoo server can reach the n8n webhook URL. Firewalls or network restrictions may block requests.
  • Model selection issues: If the list of models does not load, verify that the Odoo credentials are correct and that the user has sufficient permissions.

Links and References

Discussion