Changes

Adding link to integration tutorial
Line 1: Line 1: −
== Prerequisites ==
+
If you want a tutorial to th integration of Dolibarr to the n8n automation platform you can find it [[Integration of Dolibarr to the n8n automation platform|here.]]
 +
 
 +
==Prerequisites==
 
The following tutorial assumes that you have completed the following prerequisites:
 
The following tutorial assumes that you have completed the following prerequisites:
   −
* You have access to an instance of Dolibarr configured to use SSL encryption (with the HTTPS protocol),
+
*You have access to an instance of Dolibarr configured to use SSL encryption (with the HTTPS protocol),
* You have access to a user account with rights to use some specific modules such as Calendar, Project or Documents,
+
*You have access to a user account with rights to use some specific modules such as Calendar, Project or Documents,
* You have obtained an API key for your user account that you will use to test your integration (generated by an administrator, or by the user himself if he has permission to modify his user account information).
+
*You have obtained an API key for your user account that you will use to test your integration (generated by an administrator, or by the user himself if he has permission to modify his user account information).
    
When necessary, we will use the following URL to refer to your Dolibarr instance: `https://yourdolibarrurl`. You will have to replace it with the URL of your own Dolibarr instance, without trailing slash.
 
When necessary, we will use the following URL to refer to your Dolibarr instance: `https://yourdolibarrurl`. You will have to replace it with the URL of your own Dolibarr instance, without trailing slash.
 
<br />
 
<br />
   −
== Connecting to n8n ==
+
==Connecting to n8n==
 
As explained in previous parts, once you have created your n8n self-hosted instance on your computer and started it with the command : <code>n8n start</code> or <code>n8n</code>.
 
As explained in previous parts, once you have created your n8n self-hosted instance on your computer and started it with the command : <code>n8n start</code> or <code>n8n</code>.
   Line 19: Line 21:       −
== Creating a Workflow using Dolibarr Node ==
+
==Creating a Workflow using Dolibarr Node==
 
When you have signed in, you can create you first Workflow and selected the Dolibarr node.
 
When you have signed in, you can create you first Workflow and selected the Dolibarr node.
   Line 26: Line 28:       −
== Explanation of the different functionalities ==
+
==Explanation of the different functionalities==
 
[[File:Different scenarios.png|center|thumb|Different scenarios]]
 
[[File:Different scenarios.png|center|thumb|Different scenarios]]
   Line 33: Line 35:  
<br />
 
<br />
   −
=== General informations ===
+
===General informations===
   −
==== Credentials ====
+
====Credentials====
 
A Dolibarr node needs to have set up credentials in order to connect your Dolibarr instance to n8n.
 
A Dolibarr node needs to have set up credentials in order to connect your Dolibarr instance to n8n.
   Line 47: Line 49:  
<br />
 
<br />
   −
==== Fields in every node ====
+
====Fields in every node====
 
<br />
 
<br />
 
[[File:Add event n8n.png|center|thumb|Fields in every node]]
 
[[File:Add event n8n.png|center|thumb|Fields in every node]]
Line 56: Line 58:  
These fields are the first three one on the picture below :
 
These fields are the first three one on the picture below :
   −
* '''Credential to connect with'''  : this is where you can set your '''credentials''' as explained just before,
+
*'''Credential to connect with'''  : this is where you can set your '''credentials''' as explained just before,
* '''Resource''' : this is where you choose which module of Dolibarr will be affected, there are 4 options : Calendar, Task, Document and Custom API Call (use this one only if you know what you are doing),
+
*'''Resource''' : this is where you choose which module of Dolibarr will be affected, there are 4 options : Calendar, Task, Document and Custom API Call (use this one only if you know what you are doing),
* '''Operation''' : this is in this field where you select the kind of operation you want to do on this specific resource, for now it only supports creation operation.
+
*'''Operation''' : this is in this field where you select the kind of operation you want to do on this specific resource, for now it only supports creation operation.
    
<br />
 
<br />
   −
=== Creating a Calendar Event ===
+
===Creating a Calendar Event===
 
The first node is used to create an event in the calendar in Dolibarr.
 
The first node is used to create an event in the calendar in Dolibarr.
 
[[File:Add event n8n.png|center|thumb|Add event in n8n]]
 
[[File:Add event n8n.png|center|thumb|Add event in n8n]]
Line 71: Line 73:  
For the next fields :
 
For the next fields :
   −
* '''Event Name''' corresponds with the '''Label''' field in Dolibarr interface (this field is required),
+
*'''Event Name''' corresponds with the '''Label''' field in Dolibarr interface (this field is required),
* '''Description''' corresponds with the '''Description''' field (this field is optional),
+
*'''Description''' corresponds with the '''Description''' field (this field is optional),
* '''Event Type''' corresponds with the '''Type''' type field, three options are available : '''Intervention on site''', '''Meetings''' and '''Reception of Email''' (this field is required),
+
*'''Event Type''' corresponds with the '''Type''' type field, three options are available : '''Intervention on site''', '''Meetings''' and '''Reception of Email''' (this field is required),
* '''Beginning Date of Event''' corresponds with the left date in the '''Date''' field (this field is required),
+
*'''Beginning Date of Event''' corresponds with the left date in the '''Date''' field (this field is required),
* '''End Date of Event''' corresponds with the right date in the '''Date''' field (this field is required),
+
*'''End Date of Event''' corresponds with the right date in the '''Date''' field (this field is required),
* '''Email From''' is not corresponding to any field for now on Dolibarr but since this field is present in Dolibarr API, it is possible that is the next updates a dedicated Mail Sender field will be available on the Dolibarr interface (this field is optional),
+
*'''Email From''' is not corresponding to any field for now on Dolibarr but since this field is present in Dolibarr API, it is possible that is the next updates a dedicated Mail Sender field will be available on the Dolibarr interface (this field is optional),
* '''Email Subject''' is also not corresponding to any field for now on Dolibarr and as the previous one we can expect that a dedicated field appears is the next updates (this field is optional).
+
*'''Email Subject''' is also not corresponding to any field for now on Dolibarr and as the previous one we can expect that a dedicated field appears is the next updates (this field is optional).
    
<br />
 
<br />
Line 83: Line 85:  
<br />
 
<br />
   −
==== Creating an event in Calendar when an event is created in Google Calendar ====
+
====Creating an event in Calendar when an event is created in Google Calendar====
 
To produce this use case you will have to connect a '''Google Calendar Trigger node''' on the '''Dolibarr node'''.
 
To produce this use case you will have to connect a '''Google Calendar Trigger node''' on the '''Dolibarr node'''.
   Line 102: Line 104:  
Here :
 
Here :
   −
* <code>$json.summary</code> corresponds to the Google Caldendar Event Name,
+
*<code>$json.summary</code> corresponds to the Google Caldendar Event Name,
* <code>$json.htmlLink</code> corresponds to the Google Caldendar event URL (doing this is optional since description can be empty as explained before, entering the URL only facilitate the Google Calendar event access from Dolibarr),
+
*<code>$json.htmlLink</code> corresponds to the Google Caldendar event URL (doing this is optional since description can be empty as explained before, entering the URL only facilitate the Google Calendar event access from Dolibarr),
* <code>$json.start.dateTime</code> corresponds to the starting time of the Google Calendar event,
+
*<code>$json.start.dateTime</code> corresponds to the starting time of the Google Calendar event,
* <code>$json.end.dateTime</code> corresponds to the ending time of the Google Calendar event.
+
*<code>$json.end.dateTime</code> corresponds to the ending time of the Google Calendar event.
    
<br />
 
<br />
   −
==== Creating an event in Calendar when an email is received ====
+
====Creating an event in Calendar when an email is received====
 
To produce this use case you will have to connect an '''Email Trigger node''' on the '''Dolibarr node''', for example the '''Email Trigger (IMAP) node''' or the '''Gmail Trigger node'''.
 
To produce this use case you will have to connect an '''Email Trigger node''' on the '''Dolibarr node''', for example the '''Email Trigger (IMAP) node''' or the '''Gmail Trigger node'''.
   Line 127: Line 129:  
Here :
 
Here :
   −
* <code>$json.subject</code> corresponds to the subject of the mail,
+
*<code>$json.subject</code> corresponds to the subject of the mail,
* <code>$json.textPlain</code> corresponds to the email sender,
+
*<code>$json.textPlain</code> corresponds to the email sender,
* <code>$json.from</code> corresponds to the body of the email,
+
*<code>$json.from</code> corresponds to the body of the email,
* <code>$json.date</code> corresponds to the date when the email was sent.
+
*<code>$json.date</code> corresponds to the date when the email was sent.
    
The '''Gmail Trigger node''' will be similar, you can find the desired field using the '''INPUT''' window on the left in '''Schema''' mode to help yourself.
 
The '''Gmail Trigger node''' will be similar, you can find the desired field using the '''INPUT''' window on the left in '''Schema''' mode to help yourself.
Line 140: Line 142:  
<br />
 
<br />
   −
=== Creating a document ===
+
===Creating a document===
 
The second node is used to create a document on a specific Dolibarr module.
 
The second node is used to create a document on a specific Dolibarr module.
 
<br />
 
<br />
Line 150: Line 152:  
For the next fields :
 
For the next fields :
   −
* '''File Name''' corresponds to the file name is Dolibarr, it is important not to forget the file extension if you want it to have one (this field is required),
+
*'''File Name''' corresponds to the file name is Dolibarr, it is important not to forget the file extension if you want it to have one (this field is required),
* '''Module Name''' corresponds to the Dolibarr module where the file will be created (this field is required),
+
*'''Module Name''' corresponds to the Dolibarr module where the file will be created (this field is required),
* '''Reference''' corresponds to the `Ref.` of the object to which the file will be linked (this field is required),
+
*'''Reference''' corresponds to the `Ref.` of the object to which the file will be linked (this field is required),
* '''File Content''' corresponds to the content that will be written in the file (this field is optional),
+
*'''File Content''' corresponds to the content that will be written in the file (this field is optional),
* '''File Encoding''' is an additionnal field that needs to be activated if you want to add file with formatting, like pdf which needs to be encoded in base64 (this field is optional),
+
*'''File Encoding''' is an additionnal field that needs to be activated if you want to add file with formatting, like pdf which needs to be encoded in base64 (this field is optional),
* '''Overwrite File if It Already Exists ?''' is an additionnal field that when activated will allow file overwriting if the File Name entered already exists (this field is optional),
+
*'''Overwrite File if It Already Exists ?''' is an additionnal field that when activated will allow file overwriting if the File Name entered already exists (this field is optional),
* '''Create Subdirectories if Necessary ?''' is an additionnal field that when activated creates a Subdirectory for your file if this is necessery (this field is optional).
+
*'''Create Subdirectories if Necessary ?''' is an additionnal field that when activated creates a Subdirectory for your file if this is necessery (this field is optional).
    
<br />
 
<br />
   −
==== Add a document in Dolibarr Document Gestion containing Zoom meeting information ====
+
====Add a document in Dolibarr Document Gestion containing Zoom meeting information====
 
To produce this use case you will have to connect an '''Zoom Get Meeting node''' on the '''Dolibarr node''' with a '''n8n Trigger node''' at the beggining of the workflow.
 
To produce this use case you will have to connect an '''Zoom Get Meeting node''' on the '''Dolibarr node''' with a '''n8n Trigger node''' at the beggining of the workflow.
   Line 178: Line 180:  
Here :
 
Here :
   −
* <code>$json.topic</code> corresponds to the topic of the Zoom meeting,
+
*<code>$json.topic</code> corresponds to the topic of the Zoom meeting,
* <code>$json.host_email</code> corresponds to the email of the person who host the Zoom meeting,
+
*<code>$json.host_email</code> corresponds to the email of the person who host the Zoom meeting,
* <code>$json.duration</code> corresponds to the duration of the Zoom metting,
+
*<code>$json.duration</code> corresponds to the duration of the Zoom metting,
* <code>$json.timezone</code> corresponds to the time zone where was done the Zoom metting.
+
*<code>$json.timezone</code> corresponds to the time zone where was done the Zoom metting.
    
Besides, a .docx file extension is added to generate a file compatible with LibreOffice Writer, this format does not need '''File Encoding'''.
 
Besides, a .docx file extension is added to generate a file compatible with LibreOffice Writer, this format does not need '''File Encoding'''.
Line 190: Line 192:  
<br />
 
<br />
   −
=== Creating a Project Task ===
+
===Creating a Project Task===
 
The third node is used to create a task in the project module of Dolibarr.
 
The third node is used to create a task in the project module of Dolibarr.
 
<br />
 
<br />
Line 200: Line 202:  
For the next fields :
 
For the next fields :
   −
* '''Task Reference''' corresponds with the '''Ref.''' field in Dolibarr interface, the '''Task Reference''' is a '''string''' that must be unique, (this field is required),
+
*'''Task Reference''' corresponds with the '''Ref.''' field in Dolibarr interface, the '''Task Reference''' is a '''string''' that must be unique, (this field is required),
* '''Project ID''' corresponds with the '''Child of project''' field, this is a number corresponding to the id of the project from which the task will be a child (this field is required),
+
*'''Project ID''' corresponds with the '''Child of project''' field, this is a number corresponding to the id of the project from which the task will be a child (this field is required),
* '''Task Name''' corresponds with the '''Label''' field (this field is required),
+
*'''Task Name''' corresponds with the '''Label''' field (this field is required),
* '''Description''' corresponds with the '''Description''' field (this field is optional),
+
*'''Description''' corresponds with the '''Description''' field (this field is optional),
* '''Starting Date''' corresponds with the left date in the '''Date''' field (this field is required),
+
*'''Starting Date''' corresponds with the left date in the '''Date''' field (this field is required),
* '''Ending Date''' corresponds with the right date in the '''Date''' field (this field is optional).
+
*'''Ending Date''' corresponds with the right date in the '''Date''' field (this field is optional).
    
<br />
 
<br />
Line 211: Line 213:  
<br />
 
<br />
   −
==== Creating a Task in Dolibarr when a Github issue is received ====
+
====Creating a Task in Dolibarr when a Github issue is received====
 
To produce this use case you will have to connect a '''Github Trigger node''' on the '''Dolibarr node'''.
 
To produce this use case you will have to connect a '''Github Trigger node''' on the '''Dolibarr node'''.
   Line 233: Line 235:  
Here :
 
Here :
   −
* <code>$json.body.repository.name</code> corresponds to the name of the Github repository,
+
*<code>$json.body.repository.name</code> corresponds to the name of the Github repository,
* <code>$json.body.issue.title</code> corresponds to the title of the issue,
+
*<code>$json.body.issue.title</code> corresponds to the title of the issue,
* <code>$json.body.issue.body</code> corresponds to comment leave on the issue,
+
*<code>$json.body.issue.body</code> corresponds to comment leave on the issue,
* <code>$json.body.issue.created_at</code> corresponds to the creation date of the issue.
+
*<code>$json.body.issue.created_at</code> corresponds to the creation date of the issue.
   −
== Conclusion ==
+
==Conclusion==
 
This tutorial helped you understand how to configure a Dolibarr node in n8n and how they work in order to make you build the example use cases or custom use cases using already existing Dolibarr node functionalities.
 
This tutorial helped you understand how to configure a Dolibarr node in n8n and how they work in order to make you build the example use cases or custom use cases using already existing Dolibarr node functionalities.
   −
== Credits ==
+
==Credits==
 
This tutorial was produced by the [AuTEAMation](https://github.com/AuTEAMation) team as part of the design of interfacing prototypes between the Dolibarr ERP/CRM and several automation platforms for [https://www.dolicloud.com/ DoliCloud]. This study was carried out as part of the PFA, a 2nd year group project at [https://enseirb-matmeca.bordeaux-inp.fr ENSEIRB-MATMECA].
 
This tutorial was produced by the [AuTEAMation](https://github.com/AuTEAMation) team as part of the design of interfacing prototypes between the Dolibarr ERP/CRM and several automation platforms for [https://www.dolicloud.com/ DoliCloud]. This study was carried out as part of the PFA, a 2nd year group project at [https://enseirb-matmeca.bordeaux-inp.fr ENSEIRB-MATMECA].
34

edits