Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

This node interacts with the Dolibarr API to list contracts stored in a Dolibarr system. It allows users to retrieve multiple contract records with flexible filtering, sorting, and pagination options. This is useful for automating workflows that require contract data extraction, such as reporting, synchronization with other systems, or triggering actions based on contract attributes.

Practical examples include:

  • Fetching all active contracts sorted by creation date.
  • Retrieving a limited number of contracts related to specific third parties.
  • Applying custom SQL-like filters to narrow down contracts matching complex criteria.

Properties

Name Meaning
Sort Field The database field used to sort the returned contracts (e.g., t.rowid).
Sort Order The order direction for sorting: ASC (ascending) or DESC (descending).
Limit Maximum number of contract results to return per request.
Page The page number to query for paginated results (starting from 0).
Get All Whether to return all matching contracts (true) or limit to the specified number (false).
Thirdparty IDs Comma-separated list of third party IDs to filter contracts by (e.g., "1" or "1,2,3").
SQL Filters Additional SQL-like filter criteria to apply, e.g., (t.label:like:'%dol%') and (t.datec:...).

Output

The node outputs an array of JSON objects representing contracts retrieved from Dolibarr. Each object corresponds to a contract record with fields as defined by the Dolibarr API response.

If binary data were involved (not indicated here), it would be summarized accordingly, but this operation focuses on JSON contract data only.

Dependencies

  • Requires an active connection to a Dolibarr instance via its REST API.
  • Needs an API authentication credential configured in n8n to authorize requests.
  • The base URL of the Dolibarr API must be set in the credentials.
  • No additional external services are required beyond Dolibarr itself.

Troubleshooting

  • Common issues:

    • Incorrect API credentials or base URL will cause authentication failures.
    • Invalid SQL filter syntax may result in API errors or empty responses.
    • Requesting pages beyond available data returns empty results.
    • Using unsupported sort fields might lead to unexpected ordering or errors.
  • Error messages:

    • Authentication errors typically indicate invalid or missing API keys; verify credentials.
    • HTTP 404 errors when searching third parties or users mean no matching records found.
    • Malformed filter expressions can cause API to reject the request; check filter syntax carefully.

Links and References

Discussion