Opencell icon

Opencell

Consume Opencell API

Overview

The Generic API - Search operation for the Opencell n8n node allows users to perform filtered searches on any supported Opencell entity via a generic REST API endpoint. This is particularly useful when you need to retrieve records from various entities (such as customers, products, invoices, etc.) based on dynamic filter criteria, without needing a dedicated node or operation for each entity type.

Common scenarios:

  • Fetching all customers with a specific status or attribute.
  • Retrieving products that match certain characteristics.
  • Searching for invoices within a date range or by customer code.

Practical example:
Suppose you want to find all "Customer" entities where the country is "FR" and the status is "active". You would select the "Customer" entity and add two filters: country = FR and status = active.


Properties

Name Type Meaning
Authentication options Selects the authentication method for the API request. Options: Basic Authentication or OAuth2.
Entity Name or ID options Specifies the target entity to search. Choose from a list or provide an ID using an expression.
Nested Entity Names or IDs multiOptions (Optional) Specify related/nested entities to include in the response. Can be selected from a list or specified via expressions.
Filters fixedCollection Defines one or more key-value pairs to filter the search results. Each filter consists of a Key (field name) and Value (filter value).
Body Content Type hidden Internal property; defaults to "multipart-form-data". Not user-configurable.

Output

  • The output is a JSON object containing the search results returned by the Opencell API for the specified entity and filters.
  • The structure of the output depends on the entity being queried and the API's response format, but typically includes an array of matching records under a relevant key (e.g., customers, products, etc.).
  • Example output:
{
  "customers": [
    {
      "code": "CUST001",
      "name": "Acme Corp",
      "country": "FR",
      "status": "active"
    },
    ...
  ]
}
  • No binary data is produced by this operation.

Dependencies

  • External Service: Requires access to an Opencell API instance.
  • Authentication: Needs valid credentials for either Basic Authentication or OAuth2, configured in n8n credentials.
  • n8n Configuration: The node must be properly set up with the correct credentials and have network access to the Opencell API endpoint.

Troubleshooting

Common issues:

  • Invalid Credentials: If authentication fails, ensure your credentials are correct and have sufficient permissions.
  • Entity Not Found: If the specified entity does not exist, verify the entity name or ID.
  • Malformed Filters: Ensure that filter keys correspond to valid fields in the selected entity.
  • Empty Results: If no records are returned, check your filter criteria for typos or overly restrictive conditions.

Error messages:

  • "Username/password error. Error code : ..." – Check your authentication details.
  • "Host error. Error code : ..." – Verify the Opencell API URL and network connectivity.
  • "Invalid credentials (unknown error)" – Double-check credential configuration.
  • "Unable to get custom fields. Server response: ..." – May occur if attempting to use unsupported custom fields.

Links and References

Discussion