Odoo icon

Odoo

Consume Odoo API

Opportunity → Get Many

AI-generated

Overview

The Odoo Opportunity - Get Many operation retrieves multiple opportunity records from an Odoo instance. This node is useful for automating the extraction of sales opportunities, leads, or pipeline data from Odoo for reporting, synchronization, or further processing in your workflows.

Common scenarios:

  • Exporting all or a filtered set of opportunities to another system (e.g., CRM, spreadsheet).
  • Generating reports or dashboards based on Odoo opportunity data.
  • Synchronizing Odoo opportunities with other business tools.

Practical example:
You can use this node to fetch all open opportunities and send them to a Google Sheet for your sales team to review.


Properties

Name Meaning
Return All Whether to return all results or only up to a given limit. If enabled, all matching opportunities are returned; if disabled, you can specify a maximum number using "Limit".
Limit Max number of results to return (when "Return All" is false). Accepts values between 1 and 1000.
Options Additional options for customizing the output. Includes:
• Fields to Include: Select which fields to include in the response. You can choose from a list or specify field IDs using an expression.

Output

  • The output is an array of JSON objects, each representing an Odoo opportunity record.
  • The structure of each object depends on the fields selected in "Fields to Include" (if specified); otherwise, default fields are returned.
  • Example output:
[
  {
    "id": 123,
    "name": "Big Deal",
    "stage_id": [4, "Qualified"],
    "expected_revenue": 50000,
    ...
  },
  ...
]
  • If an error occurs and "Continue On Fail" is enabled, the output will contain an error property with the error message.

Dependencies

  • Odoo API: Requires access to an Odoo instance with valid credentials (URL, username, password, database name).
  • n8n Credentials: Must configure "odooApi" credentials in n8n.

Troubleshooting

Common issues:

  • Invalid credentials: If authentication fails, ensure the Odoo URL, username, password, and database name are correct.
  • Field selection errors: Specifying invalid or non-existent field names in "Fields to Include" may result in errors or missing data.
  • API limits: Large datasets may cause timeouts or performance issues; use "Limit" to restrict results.

Error messages:

  • "Credentials are not valid": Check your Odoo credentials and try again.
  • "Settings are not valid: ...": There may be a configuration issue with your Odoo connection.
  • "error": "<message>" in output: Indicates a runtime error for that item; review the message for details.

Links and References

Discussion