Actions20
Overview
This node allows you to interact with custom resources in an Odoo system via the Tameson Odoo integration for n8n. Specifically, when using the Custom Resource resource and the Get operation, the node retrieves a single record from a specified custom Odoo model by its ID. You can also specify which fields of the record to include in the output.
Common scenarios:
- Fetching detailed information about a specific custom object (e.g., a custom sales order, invoice, or any user-defined model) from Odoo.
- Integrating Odoo custom data into other workflows, such as reporting, notifications, or synchronizing with external systems.
Example use case:
Retrieve a custom "Project" record by its ID and only include selected fields like "name", "status", and "start_date" in the result.
Properties
| Name | Type | Meaning |
|---|---|---|
| Custom Resource Name or ID | options | Select the Odoo model (custom resource) to query. You can choose from a list or provide a model name/ID using an expression. |
| Custom Resource ID | string | The unique identifier of the record in the selected custom resource/model that you want to retrieve. |
| Options → Fields to Include | multiOptions | List of field names to include in the output. You can select from available fields or specify them using an expression. |
Output
The node outputs a JSON object representing the requested record from the custom Odoo model. The structure of the output depends on the fields you select:
{
"field1": "value1",
"field2": "value2",
...
}
- Each key corresponds to a field name from the custom resource.
- Only the fields specified in "Fields to Include" will be present in the output (if provided).
- If no fields are specified, the default set of fields defined by the Odoo model may be returned.
Dependencies
- Odoo API: Requires access to an Odoo instance 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 your Odoo credentials are incorrect, authentication will fail. Ensure the URL, username, password, and database name are correct.
- Model or ID not found: If the specified custom resource or record ID does not exist, the node will return an error.
- Field selection errors: Specifying non-existent fields in "Fields to Include" may result in missing data or errors.
Error messages and resolutions:
"Credentials are not valid": Double-check your Odoo API credentials in n8n."Settings are not valid: ...": There may be a configuration issue with your Odoo connection; verify all settings."Cannot read property '...' of undefined": This may occur if the custom resource or ID is incorrect; ensure both are valid and exist in Odoo.