Actions28
Overview
This node enables creating a new contract record in Dolibarr, an open-source ERP and CRM system. It is useful for automating contract management workflows by programmatically adding contracts linked to customers, vendors, and third parties. Typical scenarios include integrating Dolibarr with other systems to automatically generate contracts when sales or procurement events occur.
For example, a sales automation workflow could create a contract in Dolibarr whenever a deal is closed in a CRM, specifying the customer, vendor, contract date, and responsible sales representatives.
Properties
Name | Meaning |
---|---|
Ref Customer | Reference identifier for the customer related to the contract. |
Ref Vendor | Reference identifier for the vendor/supplier related to the contract. |
Third-Party Name or ID | The third party associated with the contract. Can be selected from a list, specified by URL, or given as an ID. This identifies the company or entity involved. |
Sales representative following-up contract | The user responsible for following up on the contract. Selectable from a list, URL, or ID. |
Sales representative signing contract | The user responsible for signing the contract. Selectable from a list, URL, or ID. |
Date | The date of the contract. Required field. |
Notes | Collection of notes including: - Public Note: visible to all relevant users. - Private Note: internal remarks. |
Extra Fields | Additional custom attributes for the contract. Multiple key-value pairs can be added dynamically. |
Fields | Other contract fields that can be assigned (generic assignment collection). |
Output
The node outputs the JSON response from the Dolibarr API after creating the contract. This typically includes details of the newly created contract such as its unique ID, status, and any metadata returned by the API.
If binary data were involved (not indicated here), it would represent attachments or documents related to the contract, but this node focuses on JSON data only.
Dependencies
- Requires connection to a Dolibarr instance via its REST API.
- Needs an API authentication token or API key credential configured in n8n to authorize requests.
- The base URL of the Dolibarr API must be set in the credentials.
- Uses Dolibarr API endpoints for contracts, third parties, and users to validate and send data.
Troubleshooting
- Invalid URL errors: When specifying third-party or user by URL, ensure the URL matches the expected pattern (
societe/card.php?socid=...
for third parties,user/card.php?id=...
for users). Incorrect URLs will cause validation errors. - Missing required fields: The contract date, third-party, and sales representatives are required. Omitting these will result in API errors.
- API authentication failures: Ensure the API key or token is valid and has sufficient permissions to create contracts.
- 404 Not Found errors: May occur if referenced third parties or users do not exist or are inaccessible.
- Extra fields misconfiguration: Custom attribute names must match those defined in Dolibarr; otherwise, the API may reject them.