Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

This node integration allows creating a new Contact in the Dolibarr system via its API. It is useful for automating the addition of contact records into Dolibarr CRM or ERP, such as when importing contacts from other systems, capturing leads from forms, or syncing user data.

Typical use cases include:

  • Automatically adding new customer contacts after form submissions.
  • Syncing contacts from external databases or CRMs into Dolibarr.
  • Creating contacts programmatically during business workflows.

The node sends the provided contact details to Dolibarr's API and returns the created contact information.

Properties

Name Meaning
Last Name The last name or label of the contact (required).
First Name The first name of the contact.
Third-Party Name or ID The associated third-party entity, selectable by list, URL containing an ID, or direct ID number.
Civility Name or ID The civility code/title of the contact, selectable from a loaded list or specified by ID.
Job Position The job position or role of the contact.
Email The email address of the contact.
Address A collection of address fields including: Address, Zip Code, City, Country (name or ID), State/Province (name or ID).
Phones Number A collection of phone numbers including Business, Mobile, Personal, and Fax.
Private Boolean flag indicating if the contact is private (true/false).
Personal A collection with personal info: Date of Birth and Birthday Alert (boolean).
Extra Fields Multiple custom attribute fields with name and value pairs, dynamically loaded from Dolibarr extra fields.
Fields Other contract fields (generic assignment collection, usage depends on context).

Output

The node outputs the full response from the Dolibarr API after creating the contact. The main output is a JSON object representing the newly created contact record, including all fields sent and any additional data returned by Dolibarr (such as the assigned contact ID).

No binary data output is involved.

Dependencies

  • Requires access to a Dolibarr instance with API enabled.
  • Needs an API authentication credential configured in n8n to authorize requests.
  • Uses Dolibarr API endpoints under /api/index.php.
  • Dynamic options (e.g., civilities, countries, states, extra fields) are loaded via API calls to Dolibarr.
  • The node relies on the dolibarrApiRequest helper function for making authenticated HTTP requests.

Troubleshooting

  • Missing Required Fields: The "Last Name" field is mandatory; omitting it will likely cause API errors.
  • Invalid Third-Party Reference: When specifying a third-party by URL or ID, ensure the URL matches the expected pattern and contains a valid socid parameter.
  • API Authentication Errors: Ensure the API key or token credential is correctly set up and has sufficient permissions.
  • Loading Options Failures: If dynamic dropdowns like Civilities or Countries fail to load, verify API connectivity and credentials.
  • Unexpected API Errors: Check the Dolibarr server logs for detailed error messages if the node returns HTTP errors.
  • Field Validation: Some fields have regex validations (e.g., IDs must be positive integers); invalid inputs will be rejected before sending.

Links and References

Discussion