Actions21
Opportunity → Update
AI-generatedOverview
This node allows you to update an existing Opportunity in Odoo via the Odoo API. It is useful for automating CRM workflows, such as updating opportunity details when a lead progresses through your sales pipeline or when new information becomes available from other systems.
Common scenarios:
- Automatically updating the probability or expected revenue of an opportunity based on external triggers.
- Synchronizing opportunity data between Odoo and other platforms (e.g., marketing automation tools).
- Adding internal notes or changing the priority of opportunities as part of workflow automations.
Example:
When a deal stage changes in another system, use this node to update the corresponding Opportunity's probability and internal notes in Odoo.
Properties
| Name | Meaning |
|---|---|
| Opportunity ID | The unique identifier of the Opportunity record in Odoo that you want to update. Required. |
| Update Fields | A collection of fields to update on the Opportunity. You can add one or more of the following: |
| - Email: Email address associated with the opportunity. - Expected Revenue: Numeric value representing the anticipated revenue. - Internal Notes: Free-text notes for internal use. - Name: The name/title of the opportunity. - Phone: Phone number related to the opportunity. - Priority: Priority level; options are "1", "2", or "3". - Probability: Numeric value (0–100) indicating the likelihood of closing the opportunity. |
Output
The output will be a JSON object reflecting the updated Opportunity record as returned by the Odoo API. The structure typically includes all standard and custom fields of the Opportunity after the update.
Example output:
{
"id": 123,
"name": "Updated Opportunity",
"email_from": "contact@example.com",
"expected_revenue": 5000,
"description": "Follow up next week.",
"phone": "+123456789",
"priority": "2",
"probability": 75,
...
}
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 the Opportunities module enabled.
- API Credentials: Requires an n8n credential of type
odooApiwith the following:- URL of your Odoo instance
- Database name
- Username
- Password
No additional environment variables are required beyond the credentials.
Troubleshooting
Common issues:
- Invalid Opportunity ID: If the provided Opportunity ID does not exist, the node will return an error.
- Missing Required Fields: If required fields are omitted, Odoo may reject the update.
- Authentication errors: Incorrect credentials will result in authentication failures.
Error messages:
"Credentials are not valid": Check your Odoo API credentials."Settings are not valid: ...": There may be a misconfiguration in the Odoo connection settings."error": "<message>"in output: Indicates a problem with the update operation (e.g., invalid field values).
How to resolve:
- Double-check the Opportunity ID and ensure it exists in Odoo.
- Verify all required fields are provided and correctly formatted.
- Ensure your Odoo credentials are correct and have sufficient permissions.