Actions21
Custom Resource → Delete
AI-generatedOverview
This node allows you to interact with custom resources in an Odoo instance from n8n. Specifically, for the Custom Resource with the Delete operation, the node deletes a record of a specified custom resource (model) in your Odoo system. This is useful when you need to automate the removal of specific records from any custom model in Odoo, such as cleaning up test data, removing obsolete entries, or integrating Odoo with other systems where deletions must be synchronized.
Example scenarios:
- Automatically delete outdated or invalid records from a custom Odoo model.
- Integrate with external systems to remove corresponding Odoo records when they are deleted elsewhere.
- Clean up data as part of a workflow after processing or migration.
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 model name using an expression. |
| Custom Resource ID | The unique identifier of the record in the selected custom resource (model) that you want to delete. This field is required. |
Output
The output will be a JSON object indicating the result of the deletion operation. Typically, this will include a success indicator or the response from Odoo's API regarding the deletion. 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, in case of error (with "Continue On Fail"):
[
{
"error": "Record not found"
}
]
Dependencies
- Odoo Instance: You must have access to an Odoo server with the appropriate custom models defined.
- API Credentials: Requires valid Odoo API credentials (
odooApi) configured in n8n, including URL, username, password, and database name. - n8n Configuration: No special environment variables beyond standard credential setup.
Troubleshooting
Common issues:
- Invalid Credentials: If the Odoo credentials are incorrect, the node will fail authentication. 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 return an error.
- Record Not Found: If the provided Custom Resource ID does not correspond to an existing record, the node will return an error.
- Insufficient Permissions: The Odoo user may lack permission to delete records in the specified model.
Error messages and resolutions:
"Credentials are not valid": Check your Odoo API credentials."Record not found": Verify the Custom Resource ID exists in the selected model."Model not found": Ensure the Custom Resource Name or ID matches an existing Odoo model.
Links and References
- Odoo Documentation
- n8n Expressions Guide
- n8n Odoo Node Docs (if available)