Tameson Odoo icon

Tameson Odoo

Consume Odoo API

Actions20

Overview

The Tameson Odoo node for n8n allows you to interact with custom resources in an Odoo instance via its API. Specifically, the Custom Resource → Get Many operation retrieves multiple records from a user-specified Odoo model (custom resource), supporting advanced filtering, field selection, and pagination.

Common scenarios:

  • Fetching lists of custom objects or models from Odoo for reporting, synchronization, or further automation.
  • Integrating Odoo data with other systems by retrieving filtered datasets.
  • Building dashboards or workflows that require dynamic access to various Odoo models.

Practical examples:

  • Retrieve all "Project" records with a specific status from a custom Odoo module.
  • Export a paginated list of custom sales orders with selected fields for analysis.
  • Sync only those custom resource entries that match certain criteria (e.g., date range, status).

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 specify a model name/ID using an expression.
Return All boolean If enabled, returns all matching results. If disabled, limits the number of results returned according to the "Limit" property.
Limit number Maximum number of results to return (only shown if "Return All" is false). Minimum value is 1.
Offset number Number of records to skip before starting to collect the result set (only shown if "Return All" is false).
Options → Fields to Include multiOptions Specify which fields of the custom resource to include in the output. You can select from a list or use expressions to specify field names/IDs.
Filters fixedCollection Add one or more filter conditions to restrict which records are returned. Each filter includes:
- Field Name or ID
- Operator (=, !=, etc.)
- Value for comparison

Output

  • The output is a JSON array where each element represents a record from the selected custom resource/model.
  • The structure of each object in the array depends on:
    • The fields selected in Fields to Include (if specified).
    • The underlying Odoo model's schema.
  • If no fields are specified, default fields may be returned as per Odoo's API behavior.
  • Example output (structure will vary):
[
  {
    "id": 123,
    "name": "Example Record",
    "status": "active"
    // ...other fields as selected
  },
  {
    "id": 124,
    "name": "Another Record",
    "status": "inactive"
  }
]
  • Binary Data: This operation does not output binary data; all output is in JSON format.

Dependencies

  • Odoo Instance: Requires access to a running Odoo server with the relevant custom models.
  • API Credentials: Needs valid Odoo API credentials (URL, database name, username, password) configured in n8n under the odooApi credential type.
  • n8n Configuration: No special environment variables required beyond standard credential setup.

Troubleshooting

Common issues:

  • Invalid Credentials: If the Odoo API credentials are incorrect, authentication will fail. Error message:
    "Credentials are not valid" or "Settings are not valid: ..."

    • Resolution: Double-check the URL, database name, username, and password in your n8n credentials.
  • Model or Field Not Found: If the specified custom resource or field does not exist in Odoo, you may receive errors such as:

    • "model 'xyz' does not exist" or "field 'abc' not found"
    • Resolution: Ensure the model name/ID and field names/IDs are correct and available in your Odoo instance.
  • Insufficient Permissions: If the Odoo user lacks permission to read the selected model or fields, the request may fail.

    • Resolution: Verify the user's permissions in Odoo.
  • Empty Results: If filters are too restrictive or the model contains no data, the output array will be empty.


Links and References


Discussion