Dolibarr icon

Dolibarr

Add data to Dolibarr

Actions3

Overview

The Dolibarr node for n8n allows you to interact with the Dolibarr ERP/CRM system. Specifically, using the Agenda → Create Event operation, this node enables you to create new events in the Dolibarr agenda/calendar module. This is useful for automating the scheduling of meetings, interventions, or logging received emails as events directly from your workflows.

Common scenarios:

  • Automatically creating calendar events when a new lead is added.
  • Scheduling follow-up meetings after a support ticket is closed.
  • Logging incoming emails as agenda items for tracking purposes.

Practical example:
When a form is submitted on your website, use this node to create an "Intervention on Site" event in Dolibarr's agenda, assigning it to a specific user and setting the appropriate start and end times.


Properties

Name Meaning
Event Name The name/title of the event. (Required)
Description A description or note about the event.
Event Creator The ID of the user who owns/creates the event. (Hidden field, typically set automatically)
Event Type The type/category of the event. Options:
- Intervention on Site
- Meetings
- Reception of Email (Required)
Beginning Date of Event The start date and time of the event. (Required)
End Date of Event The end date and time of the event. (Required)
Email From The sender's email address, relevant if the event is related to an email.
Email Subject The subject line of the email, relevant if the event is related to an email.

Output

The node outputs a json object representing the created event in Dolibarr. The structure typically includes:

{
  "success": true,
  "event": {
    "id": "123",
    "label": "Event Name",
    "note": "Description",
    "type_code": "AC_INT",
    "start_date": "2024-07-01T09:00:00Z",
    "end_date": "2024-07-01T10:00:00Z",
    "email_from": "sender@example.com",
    "email_subject": "Subject here",
    // ...other fields as returned by Dolibarr API
  }
}
  • If binary data is involved (not typical for this operation), it would represent attached files or documents related to the event.

Dependencies

  • External Service: Requires access to a Dolibarr ERP/CRM instance with API enabled.
  • API Key/Credentials: You must configure the dolibarrApi credentials in n8n, including the base URL and authentication details.
  • n8n Configuration: Ensure the Dolibarr node is installed and credentials are set up under n8n’s Credentials section.

Troubleshooting

Common issues:

  • Authentication errors:
    Error message: "401 Unauthorized"
    Resolution: Check that your API key and credentials are correct and have sufficient permissions.

  • Missing required fields:
    Error message: "Missing parameter: label/start_date/end_date/type_code"
    Resolution: Ensure all required properties (Event Name, Event Type, Beginning Date, End Date) are provided.

  • Invalid date format:
    Error message: "Invalid date format"
    Resolution: Use ISO 8601 format for date/time fields.

  • Connection errors:
    Error message: "ENOTFOUND" or "ECONNREFUSED"
    Resolution: Verify the Dolibarr API endpoint URL and network connectivity.


Links and References

Discussion