Actions21
Overview
This node allows you to interact with custom resources in an Odoo instance via the n8n workflow automation platform. Specifically, for the Custom Resource with the Delete operation, the node deletes a record from a user-specified Odoo model (custom resource) by its ID. This is useful when you need to automate the removal of specific records from any custom table/model in your Odoo system.
Common scenarios:
- Automating cleanup tasks by deleting obsolete or test records from custom models.
- Integrating Odoo with other systems where deletion of data in Odoo is triggered by external events.
- Building workflows that manage the lifecycle of custom business objects in Odoo.
Example:
You have a custom model x_my_custom_model
in Odoo and want to delete a record with a specific ID as part of a larger automated process.
Properties
Name | Meaning |
---|---|
Custom Resource Name or ID | Choose the Odoo model (custom resource) to operate on. You can select from a list or specify the technical name using an expression. |
Custom Resource ID | The unique identifier (ID) of the record in the selected custom resource/model that you want to delete. |
Output
The output will be a JSON object indicating the result of the delete operation for each input item. Typically, this will include:
- A success indicator (e.g.,
true
if the record was deleted). - If an error occurs and "Continue On Fail" is enabled, the output will contain an
error
field with the error message.
Example output:
[
{
"success": true
}
]
or, on failure (with continue on fail):
[
{
"error": "Record not found"
}
]
Dependencies
- Odoo API: Requires access to an Odoo server with valid credentials (URL, username, password, database name).
- n8n Credentials: You must configure Odoo API credentials in n8n under the name
odooApi
.
Troubleshooting
Common issues:
- Invalid Credentials: If the Odoo credentials are incorrect, authentication will fail. Ensure the URL, username, password, and database name are correct.
- Model Not Found: If the specified custom resource/model does not exist, the node will throw an error.
- Record Not Found: If the provided ID does not correspond to any record in the selected model, deletion will fail.
- Insufficient Permissions: The Odoo user must have permission to delete records in the specified model.
Error messages:
"Credentials are not valid"
: Check your Odoo API credentials."Record not found"
: Verify the ID exists in the selected model."Settings are not valid: ..."
: There may be a misconfiguration in the Odoo connection settings.
Links and References
- Odoo Documentation
- n8n Expressions Guide
- n8n Odoo Node Docs (if available)