Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

This node integrates with the Dolibarr API to manage contacts, specifically allowing users to add categories to a contact. It is useful in scenarios where you want to organize or classify contacts by assigning them to one or more categories within Dolibarr, such as grouping customers by industry, priority, or region.

For example, a sales team could use this node to tag contacts with categories like "VIP", "Prospect", or "Supplier" to streamline follow-ups and reporting.

Properties

Name Meaning
Contact ID The unique identifier of the contact to which categories will be added. Must be a number greater than or equal to 1.
Category ID The unique identifier of the category to add to the specified contact. Must be a number greater than or equal to 1.

Output

The node outputs the full HTTP response from the Dolibarr API after attempting to add the category to the contact. The json output field contains the API's JSON response, which typically confirms success or provides error details.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to a Dolibarr instance via its REST API.
  • Needs an API authentication token or key configured in n8n credentials for Dolibarr.
  • The base URL of the Dolibarr API must be set in the credentials configuration.

Troubleshooting

  • Invalid Contact ID or Category ID: If either ID does not exist in Dolibarr, the API may return an error. Verify that the IDs are correct and correspond to existing records.
  • Authentication Errors: Ensure the API key or token is valid and has sufficient permissions to modify contacts.
  • Network Issues: Check connectivity to the Dolibarr server and that the base URL is correctly configured.
  • API Endpoint Changes: If the Dolibarr API version changes, verify that the endpoint /contacts/{contactID}/categories/{categoryID} remains valid.

Common error messages:

  • 404 Not Found: The contact or category ID does not exist.
  • 401 Unauthorized: Authentication failed; check API credentials.
  • 400 Bad Request: Invalid input parameters; ensure IDs are numbers and properly provided.

Links and References

Discussion