34
edits
Lpierson002 (talk | contribs) (Creating Using Dolibarr nodenin n8n page) Tag: 2017 source edit |
Lpierson002 (talk | contribs) (Page layout modification and content completion) |
||
| Line 1: | Line 1: | ||
== 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 : | As explained in previous parts, once you have created your n8n self-hosted instance on your computer and started it with the command : | ||
```bash | ```bash | ||
| Line 32: | Line 14: | ||
 |  | ||
== 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 41: | Line 22: | ||
 |  | ||
== Explanation of the different functionnalities == | |||
 |  | ||
Here are the different Dolibarr functionnalities we have implemented in n8n. | Here are the different Dolibarr functionnalities we have implemented in n8n. | ||
=== General informations === | |||
==== Credentials ==== | |||
For every Dolibarr node you will have to setup up your credentials in order to connect your Dolibarr instance to n8n. | For every Dolibarr node you will have to setup up your credentials in order to connect your Dolibarr instance to n8n. | ||
| Line 61: | Line 40: | ||
And your API key that you can find in your account parameters when connecting in Dolibarr. | And your API key that you can find in your account parameters when connecting in Dolibarr. | ||
==== Fields in every node ==== | |||
 |  | ||
| Line 70: | Line 48: | ||
- `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 just which module of Dolibarr it will affect, 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 just which module of Dolibarr it will affect, 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 this kind of operation you want to do on this specific resource, for now it only support creation operation | - `Operation` : this is in this field where you select this kind of operation you want to do on this specific resource, for now it only support creation operation | ||
=== 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. | ||
| Line 90: | Line 67: | ||
 |  | ||
<br /> | |||
==== 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`. | |||
The `Google Calendar Trigger node` documentation can be found here https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.googlecalendartrigger/. | |||
Once you have set up the `Google Calendar Trigger node` you can connect it to the `Dolibarr Create an event node`. | |||
 | |||
One possible configuration to have the wanted informations is to enter to same informations as the screenshot. | |||
Be sure to select `Expression` mode on fields that use the previous node informations. | |||
You can either type or drag and drop from the left window which field you want to have from the Google Calendar Event. | |||
Here : | |||
- `{{$json.summary }}` correspond to the Google Caldendar Name, | |||
- `{{$json.htmlLink }}` correspond to the Google Caldendar URL (doing this is optional, description can be empty as explained before, entering the URL only facilitate the Google Calendar event access from Dolibarr), | |||
- `{{$json.start.dateTime }}` correspond to the starting time of the Google Calendar event, | |||
- `{{$json.start.dateTime }}` correspond to the ending time of the Google Calendar event. | |||
==== 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`. | |||
The `Email Trigger (IMAP) node` documentation can be found here https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.emailimap/ and the `Gmail Trigger node` one here https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger/. | |||
As before when have set up the trigger node you can connect it to the `Dolibarr Create an event node`.  | |||
For the example of configuration the `Email Trigger node` case will be presented since it is the more general case. One possible configuration to have the wanted informations is to enter to same informations as the screenshot. | |||
Be sure to select `Expression` mode on fields that use the previous node informations. | |||
You can either type or drag and drop from the INPUT window on the left which field you want to have from the received mail. | |||
Here : | |||
- `{{$json.subject }}` correspond to the subject of the mail, | |||
- `{{$json.from }}` correspond to the email sender, | |||
- `{{$json.date }}` correspond to the date when the email was send, | |||
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 second screenshot correspond to a possible configuration of the `Dolibarr Create an event Node` with the `Email Trigger (IMAP) node` when the `Email From` and `Email Subject` fields will be implemented in the Dolibarr interface in future updates. | |||
=== Creating a document === | |||
The second node is used to create create a document on a specific Dolibarr module.  | |||
If you have selected the `Create a document` and have alreary set your credentials the first two fields will be already completed. | |||
For the next fields : | |||
- `File Name` correspond 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` correspond to the Dolibarr module where the file will be created (this field is required), | |||
- `Reference` correspond to the `Ref.` of the object to which the file with will linked (this field is required), | |||
- `File content` correspond 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), | |||
- `Overwrite File if It Already Exists ?` is an additionnal field than when activated will allowed 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). | |||
==== 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 og the workflow. | |||
The `Zoom node` documentation can be found here https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.zoom/. | |||
As before when have set up the node you can connect it to the `Dolibarr Create an event node`.  | |||
One possible configuration to have a Zoom meeting informations is to enter to same informations as the screenshot. | |||
Be sure to select `Expression` mode on fields that use the previous node informations. | |||
You can either type or drag and drop from the INPUT window on the left which field you want to have from the received mail. | |||
Here : | |||
- `{{$json.topic }}` correspond to the topic of the Zoom meeting, | |||
- `{{$json.host_email }}` correspond to the email of the person who host the Zoom meeting, | |||
- `{{$json.duration }}` correspond to the duration of the Zoom metting, | |||
- `{{$json.timezone }}` correspond to the time zone where was done the Zoom metting. | |||
Besides, some a .docx file extension is added to generate a file compatible with LibreOffice Write, this format does not need File Encodind. | |||
This file will be addded to the Agenda Evend associated with the Zoom meeting, in the example this is the event with eht reference n°33. | |||
Finally, the additional Field `Overwrite File If Already Exists` is activated to be able ot overwrite the file with more or different informations from the Zoom meeting if wanted. | |||
=== Creating a Project Task === | |||
 | |||
The third node is used to create a task in the project module of Dolibarr. | |||
If you have selected the `Create a Task` and have alreary set your credentials the first three fields will be already completed. | |||
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), | |||
- `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), | |||
- `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), | |||
- `Ending Date` corresponds with the right date in the `Date` field (this field is optional),  | |||
A possible configuration for creating a document having zoom meeting inf | |||
==== 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`. | |||
It is important here if you are using a self-hosted instance of n8n to start it in tunnel mode. To do so, just run the following command : | |||
```bash | |||
n8n start --tunnel | |||
``` | |||
To trigger on receiving issues select the type `Issues` in the `Events` field. | |||
The `Github Trigger node` documentation can be found here https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.githubtrigger/. | |||
Once you have set up the `Github Trigger node` you can connect it to the `Dolibarr Create a task node`.  | |||
One possible configuration to have the wanted informations is to enter to same informations as the screenshot. | |||
Be sure to select `Expression` mode on fields that use the previous node informations. | |||
You can either type or drag and drop from the left window which field you want to have from the Github Issue. | |||
Here : | |||
- `{{$json.body.repository.name }}` correspond to the name of the Github reposity, | |||
- `{{$json.body.issue.title }}` correspond to the title of the issue, | |||
- `{{$json.body.issue.body }}` correspond to comment leave on the issue, | |||
- `{{$json.body.issue.created_at }}` correspond to creation date of the issue. | |||
=== 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 functionnalities. | |||
edits