Tameson Odoo icon

Tameson Odoo

Consume Odoo API

Overview

The Tameson Odoo node for n8n allows you to interact with the Odoo API, specifically targeting the "Opportunity" resource. The Get Many (getAll) operation retrieves multiple opportunity records from your Odoo instance. This is useful for scenarios such as:

  • Listing all sales opportunities for reporting or dashboarding.
  • Fetching a filtered set of opportunities for further automation or analysis.
  • Integrating Odoo opportunity data with other systems.

Practical examples:

  • Retrieve all open opportunities and send summary emails.
  • Sync Odoo opportunities with a CRM or spreadsheet.
  • Generate reports on sales pipeline stages.

Properties

Name Type Meaning
Return All boolean Whether to return all available opportunity records (true), or limit the number of results (false).
Limit number Maximum number of opportunity records to return. Only shown if "Return All" is false.
Options collection Additional options for the request.
└─ Fields to Include multiOptions List of specific fields to include in each returned opportunity record. You can select from available fields or specify field IDs via expressions.

Output

  • The output is an array of JSON objects, each representing an Odoo Opportunity.
  • The structure of each object depends on the selected "Fields to Include". If no fields are specified, default fields are returned by Odoo.
  • Example output (fields will vary):
[
  {
    "id": 123,
    "name": "Big Deal",
    "stage_id": 4,
    "expected_revenue": 10000,
    ...
  },
  {
    "id": 124,
    "name": "New Lead",
    "stage_id": 1,
    "expected_revenue": 5000,
    ...
  }
]
  • No binary data is produced by this operation.

Dependencies

  • Odoo API: Requires access to an Odoo instance with API 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 API credentials are incorrect, authentication will fail. Error message:
    "Credentials are not valid"
    Resolution: Double-check your Odoo URL, username, password, and database name.

  • Insufficient Permissions: The user may lack permission to read opportunities.
    Resolution: Ensure the Odoo user has appropriate access rights.

  • Field Selection Errors: Specifying invalid field names in "Fields to Include" may result in errors or missing data.
    Resolution: Use the field selector or verify field names in your Odoo model.

  • Large Data Volumes: Retrieving all records without filters may lead to performance issues.
    Resolution: Use "Limit" or apply filters where possible.


Links and References

Discussion