Odoo icon

Odoo

Consume Odoo API

Overview

The Odoo Opportunity Get operation node retrieves detailed information about a specific opportunity from an Odoo instance using its unique Opportunity ID. This is useful in scenarios where you need to fetch and process data for a particular sales opportunity, such as displaying opportunity details, integrating with CRM dashboards, or triggering follow-up actions based on the opportunity's status.

Practical examples:

  • Fetching opportunity details to enrich leads in another system.
  • Retrieving opportunity data for reporting or analytics.
  • Using opportunity information to trigger automated workflows (e.g., send notifications when an opportunity reaches a certain stage).

Properties

Name Meaning
Opportunity ID The unique identifier of the opportunity to retrieve. Required.
Options Additional options for the request. Contains:
  • Fields to Include: Select which fields of the opportunity to include in the response. You can choose from a list or use IDs.

Output

  • The output is a JSON object containing the details of the requested opportunity.
  • The structure of the output depends on the selected "Fields to Include" option:
    • If no fields are specified, default fields are returned.
    • If specific fields are chosen, only those fields will be present in the output.
  • Example output (fields may vary):
{
  "id": 123,
  "name": "Big Deal",
  "stage_id": 4,
  "expected_revenue": 10000,
  "probability": 75,
  ...
}
  • If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

Dependencies

  • External Service: Requires access to an Odoo instance with API enabled.
  • Credentials: Needs valid Odoo API credentials configured in n8n (odooApi).
    • URL
    • Username
    • Password
    • Database name (db)
  • n8n Configuration: No special environment variables required beyond credential setup.

Troubleshooting

Common Issues:

  • Invalid Opportunity ID: If the provided ID does not exist, the node will return an error indicating that the record was not found.
  • Missing or Incorrect Credentials: If authentication fails, you'll receive an error about invalid credentials.
  • Insufficient Permissions: The user account must have permission to read opportunities in Odoo.

Error Messages:

  • "Credentials are not valid": Check your Odoo API credentials.
  • "Settings are not valid: ...": Review your Odoo connection settings.
  • "Record not found" or similar: Ensure the Opportunity ID exists in your Odoo instance.

Links and References

Discussion