Odoo Webhook
This component acts as a dedicated receiver for automatic notifications coming from your Odoo system. When a record in Odoo is created or modified, this node captures the notification, extracts the relevant information, and packages it into a structured format that can be easily used by other steps in your automation workflow. Think of it as a smart mailbox that catches Odoo updates and hands them off for further action.
How it Works
The component continuously monitors your Odoo environment for changes. When a change occurs (for example, a new sales order is placed or a customer’s profile is updated), Odoo automatically sends a notification. This component catches that message, reads the details, and organizes the data so downstream steps can clearly understand what changed, when it changed, and which record was affected. It works quietly in the background, ensuring your automation stays in sync with your business data without requiring manual refreshes.
Connection & Credentials
This component requires configuring a credential in the Nappai panel before interacting with the external service:
- Go to the Credentials section in your Nappai panel.
- Create a new credential of the type Odoo API and fill in the required fields (Odoo Server URL, Database Name, Username, and Api Key).
- In your workflow, select the saved credential in the Credential input field of this node.
Inputs
Input Fields
- Odoo Model: The specific type of Odoo record you want to monitor for changes (e.g., Sales Orders, Invoices, Customers). Leave the default (
sale.order) if you only care about sales orders. - Events: The types of changes you want to track. Select
Record Createdto catch new records, andRecord Updatedto catch modifications. Both are detected automatically by checking when a record was last saved. - Additional Domain Filter: An optional text box where you can type a simple JSON filter to narrow down only the specific records you care about. Leave this empty to receive all updates matching the selected model and events.
Outputs
- Data: Structured information about each detected change. This output contains both a human-readable summary and a structured list of fields (like ID, model name, date, and full record details) that you can connect to other nodes for further processing, logging, AI analysis, or triggering automated actions.
Output Data Example (JSON)json
[ { “text”: “[updated] sale.order Order #SO2024-001”, “data”: { “event”: “updated”, “model”: “sale.order”, “id”: 45821, “name”: “SO2024-001”, “write_date”: “2024-05-20T14:32:00Z”, “record”: { “state”: “sale”, “amount_total”: 1250.00, “partner_id”: 123 } } } ]
Connectivity
This component is designed to feed structured event data into downstream workflow nodes. It typically connects to:
- Condition/Routing Nodes: To split the workflow based on the event type (
createdvsupdated) or specific record values. - AI/LLM Assistants: To analyze the record details and generate summaries, draft responses, or suggest next steps.
- Email/Notification Nodes: To alert teams or managers when important records change.
- Database/CRM Updaters: To log the change, sync data across systems, or trigger follow-up tasks.
The output
Datafield is the primary connection point, providing both readable text and structured fields for precise routing or processing.
Usage Example
Automated Sales Order Approval
When a new sales order is created in Odoo, the Odoo Webhook component catches the event. You can connect its Data output to a Condition node that checks if the total amount exceeds a certain threshold. If it does, the workflow branches to an Email node that sends an approval request to the finance manager. If not, the workflow automatically logs the order and moves to the next step, keeping your team informed without manual intervention.
Tips and Best Practices
- Start with the default settings and adjust the
Odoo ModelandEventsonly if your workflow requires monitoring different record types. - Use the
Additional Domain Filterto focus only on high-priority records (e.g.,state = "confirmed"), which reduces unnecessary workflow runs and improves performance. - Combine this component with a Condition node early in your workflow to route
createdandupdatedevents through different automation paths. - Keep your workflow modular by sending the
Dataoutput to dedicated action nodes rather than mixing multiple tasks in a single step.
Security Considerations
- Always use strong, uniquely generated API keys in your Odoo API credential. Avoid sharing credentials or using personal account keys for automation.
- Restrict the
Additional Domain Filterto only include data necessary for your workflow. Overly broad filters may expose sensitive records unintentionally. - Ensure your Odoo server URL uses HTTPS to encrypt data in transit between Odoo and Nappai.
- Regularly review connected models and filters to ensure they align with your current data access policies and compliance requirements.