Changes

Jump to navigation Jump to search
m
Line 71: Line 71:     
Then, you must setup and enter the API keys provided by Google. This is done in several step.
 
Then, you must setup and enter the API keys provided by Google. This is done in several step.
 +
    
1) You must also enable the API for your Google account. For this go on page {{ModuleGoogleUrlToCreateApiAccount}}, menu "API & Authentication" -> "Enable API". Click to enable API for "Calendar API".
 
1) You must also enable the API for your Google account. For this go on page {{ModuleGoogleUrlToCreateApiAccount}}, menu "API & Authentication" -> "Enable API". Click to enable API for "Calendar API".
 +
    
2) Find the Google Agenda ID or your calendar.
 
2) Find the Google Agenda ID or your calendar.
Line 86: Line 88:     
Note: you can keep this field empty and fill instead the "ID Agenda" at the user card level (into tab "Google" on '''each user card'''). Each user can have its own calendar. In such a case, it is the owner of the event (visible on Dolibarr event card) that will be used by Dolibarr to know which Agenda ID to target for synchronization. It means each event into Dolibarr can be pushed only toward one and only one agenda (if there is several users assigned to event, it is the owner of event that will be targeted). Note also that in such a case, step 5 must also be done for each Google account.
 
Note: you can keep this field empty and fill instead the "ID Agenda" at the user card level (into tab "Google" on '''each user card'''). Each user can have its own calendar. In such a case, it is the owner of the event (visible on Dolibarr event card) that will be used by Dolibarr to know which Agenda ID to target for synchronization. It means each event into Dolibarr can be pushed only toward one and only one agenda (if there is several users assigned to event, it is the owner of event that will be targeted). Note also that in such a case, step 5 must also be done for each Google account.
 +
    
3) You must create a service account user/email from page {{ModuleGoogleUrlToCreateApiAccount}}, menu "Credentials" . Click on "Create a client ID" and choose "Service Account" then choose "type of file P12" then "Create". You will get:
 
3) You must create a service account user/email from page {{ModuleGoogleUrlToCreateApiAccount}}, menu "Credentials" . Click on "Create a client ID" and choose "Service Account" then choose "type of file P12" then "Create". You will get:
 
* A new service account with a Service account client ID and a Service account EMail. You need here to enter the Service account EMail.
 
* A new service account with a Service account client ID and a Service account EMail. You need here to enter the Service account EMail.
 
* A .p12 file was also downloaded.
 
* A .p12 file was also downloaded.
 +
 +
If you choose to synchronize to only 1 unique Google agenda target or to one different agenda for each user, you have only to create 1 service account. However, you may need to give permissions to all google account if you set 1 different agenda for each user (see step 5).
    
4) Submit the information received and the downloaded file on the Dolibarr setup page, tab "Sync to Google Agenda".
 
4) Submit the information received and the downloaded file on the Dolibarr setup page, tab "Sync to Google Agenda".
 +
    
5) You must also share the agenda (all permissions) with the service account user/email (created at step 2): For this, go into Google calendar, choose "Parameters" then tab "Agendas" (direct access with this link https://www.google.com/calendar/render?tab=mc#i). Click on link "Share parameters" at end of line of the Agenda to synchronize (It must be same Agenda than the one chosen on parameter "ID Agenda" at step 1). Then add the service account user into the email field, choose permission "Edit events" and validate by clicking "Add user".  
 
5) You must also share the agenda (all permissions) with the service account user/email (created at step 2): For this, go into Google calendar, choose "Parameters" then tab "Agendas" (direct access with this link https://www.google.com/calendar/render?tab=mc#i). Click on link "Share parameters" at end of line of the Agenda to synchronize (It must be same Agenda than the one chosen on parameter "ID Agenda" at step 1). Then add the service account user into the email field, choose permission "Edit events" and validate by clicking "Add user".  

Navigation menu