Actions20
Overview
This node allows you to interact with the Odoo API, specifically targeting the "Opportunity" resource. The "Delete" operation enables users to remove an existing opportunity from their Odoo system by specifying its unique ID. This is useful in scenarios where opportunities are no longer relevant or were created by mistake and need to be cleaned up from your CRM or sales pipeline.
Practical examples:
- Automatically deleting stale or duplicate opportunities as part of a workflow.
- Cleaning up test data after running automated tests.
- Removing opportunities that have been disqualified or lost.
Properties
| Name | Type | Meaning |
|---|---|---|
| Opportunity ID | String | The unique identifier of the opportunity you want to delete. This field is required. |
Output
The output will be a JSON object indicating the result of the deletion operation. If successful, it typically returns a confirmation (such as a boolean or status message) that the opportunity was deleted. If there is an error, the output will contain an error field with the error message.
Example output on success:
[
{
"success": true
}
]
Example output on failure (if "Continue On Fail" is enabled):
[
{
"error": "Opportunity not found"
}
]
Dependencies
- Odoo API: Requires access to an Odoo instance with appropriate permissions to delete opportunities.
- Credentials: You must configure the
odooApicredentials in n8n, including URL, username, password, and database name.
Troubleshooting
Common issues:
- Invalid Opportunity ID: If the provided ID does not exist, the node may return an error such as
"Opportunity not found". - Authentication errors: Incorrect Odoo credentials will prevent the node from connecting. Error messages like
"Credentials are not valid"or"Settings are not valid"indicate authentication problems. - Insufficient permissions: The user account used for the connection must have permission to delete opportunities in Odoo.
How to resolve:
- Double-check the Opportunity ID for typos or ensure it exists in Odoo.
- Verify your Odoo credentials in the n8n credential settings.
- Ensure the connected Odoo user has the necessary rights to perform deletions.