Google Calendar integration: различия между версиями

Материал из WiKi - UserSide
([IronBot] Sync EN/UK localization from RU)
 
([IronBot] Sync EN localization from RU)
 
Строка 1: Строка 1:
'''en''' | [[Інтеграція_з_Google-календарем|uk]] | [[Интеграция_с_Google-календарём|ru]]
'''en''' | [[Інтеграція_з_Google-календарем|uk]] | [[Интеграция_с_Google-календарём|ru]]


Начиная с версии [[3.21]] есть возможность настроить взаимодействие с Google Календарь: https://calendar.google.com/calendar/u/0/gp
See also: [[Calendar]]
 
Starting from version [[3.21]], ERP can be integrated with Google Calendar: https://calendar.google.com/calendar/u/0/gp


<gallery mode="packed" heights="300px">
<gallery mode="packed" heights="300px">
Строка 8: Строка 10:
</gallery>
</gallery>


Как это работает? Взаимодействия напрямую с личным календарём Google/личной учётной записью Google сотрудника особого смысла не имеет. Т.к. с одной стороны для этого потребуется давать доступ компании к личному календарю, на что часть сотрудников не будет готова, а с другой стороны - нельзя запретить выполнять некоторые действия с событиями в календаре ''(например изменять даты проведения работ)'' - хотя у сотрудников в ERP может и не быть прав для такого. Поэтому подход иной.  
How does it work? Direct integration with an employee's personal Google Calendar or personal Google account does not make much sense. On one hand, it would require granting the company access to a personal calendar, which some employees may not accept. On the other hand, it is impossible to prohibit some actions with calendar events ''(for example, changing work dates)'', even when employees do not have those permissions in ERP. Therefore, the approach is different.


Система автоматически создаёт экземпляры календарей сотрудников - для каждого отдельно. Под собственным аккаунтом. А уже сотрудникам предоставляется общий доступ ''(на чтение)'' к "его календарю". А сотрудник подключает этот календарь как дополнительный себе в Google Календарь. События он редактировать не может - всем управляет диспетчер/ERP.
The system automatically creates employee calendar instances, one for each employee, under its own account. Employees are then granted shared access ''(read-only)'' to "their calendar". The employee connects this calendar as an additional calendar in Google Calendar. Events cannot be edited by the employee; they are managed by the dispatcher/ERP.




'''Порядок интеграции:'''
'''Integration procedure:'''


1) Создать отдельный центральный google-аккаунт для интеграции ''(или использовать свой какой-то существующий)''
1) Create a separate central Google account for the integration ''(or use an existing account)''


2) Подключиться к https://console.cloud.google.com/ и создать проект
2) Open https://console.cloud.google.com/ and create a project


3) Подключить к проекту API - Google Calendar API
3) Enable the Google Calendar API for the project


4) Создать OAuth credentials типа Web application с указанием URL к ERP. Режим External
4) Create OAuth credentials of the Web application type and specify the ERP URL. Use External mode.
Credential изначально создаётся в тестовом статусе на 7 дней. Не забудьте перевести его после настройки и тестирования в Production статус
The credential is initially created in test status for 7 days. Remember to switch it to Production status after setup and testing.
  Authorized redirect URIs:
  Authorized redirect URIs:
  https://erp.your_net.com/api.php?cat=google
  https://erp.your_net.com/api.php?cat=google
  https://erp.your_net.com/settings_task/google_calendar
  https://erp.your_net.com/settings_task/google_calendar
И зайти - авторизоваться с аккаунта интеграции
Then sign in with the integration account.
  Ошибка: Ошибка 400: redirect_uri_mismatch - не вписан корректный URL в "Authorized redirect URIs"
  Error: Error 400: redirect_uri_mismatch - the correct URL is not specified in "Authorized redirect URIs"
  Ошибка: Ошибка 403: access_denied
  Error: Error 403: access_denied
Добавление тестовых аккаунтов ''(в т.ч. аккаунта интеграции)'' в разделе "Audience" - "Test users"
Add test accounts ''(including the integration account)'' in the "Audience" - "Test users" section.


5) В ERP в разделе "Настройка - Задания - Google-календарь" включить работу с календарём и указать все параметры
5) In ERP, open "Settings - Tasks - Google Calendar", enable calendar integration, and specify all parameters


6) В "Карточке сотрудника - Редактирование" - проверить корректность указания email + поставить чекбокс - привязка к Google-календарю - Сохранить. Добавится и будет выведена информация о CalendarID
6) In "Employee card - Edit", check that the email is correct, enable the Google Calendar binding checkbox, and save. CalendarID information will be added and displayed


7) В Google Календаре основной интеграционной учётной записи будет видно все календари сотрудников ''(список)''. Далее - сотруднику придёт письмо - с предложением присоединиться к расшаренному календарю под него. Нужно принять.
7) In Google Calendar for the main integration account, all employee calendars will be visible ''(as a list)''. Then the employee receives an email invitation to join the shared calendar created for them. The invitation must be accepted.




'''Заметки:'''
'''Notes:'''


1) При изначальном создании календаря - сразу будут влиты все задания куда этот сотрудник назначен начиная с даты - сутки назад.
1) When the calendar is initially created, all tasks assigned to this employee starting from one day ago are imported immediately.


2) При изменении email у сотрудника - календарь будет пересоздан.
2) When an employee's email changes, the calendar is recreated.


3) При удалении e-mail и/или отключении работы с календарём у сотрудника - календарь будет удалён.
3) When the email is removed and/or calendar integration is disabled for an employee, the calendar is deleted.
Этот подход можно использовать и чтобы пересоздать календарь и события в нём, в случае каких-то сбоев синхронизации
This approach can also be used to recreate the calendar and its events if synchronization problems occur.


4) В приложении Google Календарь - возможно нужно будет включить в списке этот календарь ''(он может подключиться но по-умолчанию в выключенном состоянии)''.
4) In the Google Calendar app, this calendar may need to be enabled in the calendar list ''(it can be connected but disabled by default)''.


5) Для Apple IOS - также можете доставить приложение Google Календарь
5) For Apple iOS, you can also install the Google Calendar app.


6) При увольнении сотрудника - календарь отключается и удаляется
6) When an employee is dismissed, the calendar is disabled and deleted.


7) Опционально - выводятся работы по подразделениям этого сотрудника в календаре
7) Optionally, the calendar can display work for this employee's departments.


14) Выводятся только задания с системными ролями "Не выполнено" и "В работе". При изменении статуса у задания - соответственно добавляются/удаляются события если необходимо
14) Only tasks with the system roles "Not completed" and "In progress" are displayed. When the task status changes, events are added or removed as needed.

Текущая версия от 18:28, 23 мая 2026

en | uk | ru

See also: Calendar

Starting from version 3.21, ERP can be integrated with Google Calendar: https://calendar.google.com/calendar/u/0/gp

How does it work? Direct integration with an employee's personal Google Calendar or personal Google account does not make much sense. On one hand, it would require granting the company access to a personal calendar, which some employees may not accept. On the other hand, it is impossible to prohibit some actions with calendar events (for example, changing work dates), even when employees do not have those permissions in ERP. Therefore, the approach is different.

The system automatically creates employee calendar instances, one for each employee, under its own account. Employees are then granted shared access (read-only) to "their calendar". The employee connects this calendar as an additional calendar in Google Calendar. Events cannot be edited by the employee; they are managed by the dispatcher/ERP.


Integration procedure:

1) Create a separate central Google account for the integration (or use an existing account)

2) Open https://console.cloud.google.com/ and create a project

3) Enable the Google Calendar API for the project

4) Create OAuth credentials of the Web application type and specify the ERP URL. Use External mode. The credential is initially created in test status for 7 days. Remember to switch it to Production status after setup and testing.

Authorized redirect URIs:
https://erp.your_net.com/api.php?cat=google
https://erp.your_net.com/settings_task/google_calendar

Then sign in with the integration account.

Error: Error 400: redirect_uri_mismatch - the correct URL is not specified in "Authorized redirect URIs"
Error: Error 403: access_denied

Add test accounts (including the integration account) in the "Audience" - "Test users" section.

5) In ERP, open "Settings - Tasks - Google Calendar", enable calendar integration, and specify all parameters

6) In "Employee card - Edit", check that the email is correct, enable the Google Calendar binding checkbox, and save. CalendarID information will be added and displayed

7) In Google Calendar for the main integration account, all employee calendars will be visible (as a list). Then the employee receives an email invitation to join the shared calendar created for them. The invitation must be accepted.


Notes:

1) When the calendar is initially created, all tasks assigned to this employee starting from one day ago are imported immediately.

2) When an employee's email changes, the calendar is recreated.

3) When the email is removed and/or calendar integration is disabled for an employee, the calendar is deleted. This approach can also be used to recreate the calendar and its events if synchronization problems occur.

4) In the Google Calendar app, this calendar may need to be enabled in the calendar list (it can be connected but disabled by default).

5) For Apple iOS, you can also install the Google Calendar app.

6) When an employee is dismissed, the calendar is disabled and deleted.

7) Optionally, the calendar can display work for this employee's departments.

14) Only tasks with the system roles "Not completed" and "In progress" are displayed. When the task status changes, events are added or removed as needed.