Integrate Google Calendar 编辑

Deploy the Google Calendar integration to schedule calendar events and list events and office hours of a user from any device or intranet. This integration delivers these four use cases:

Note:

We provide two Google Calendar integration templates for your use. The java-based template provides more use-cases, including notifications. This is under the Integrations category in the catalog. The set-up instructions follow immediately below. We also have a new HTTP-based template under the Citrix Labs category in the catalog. This integration is more flexible and provides more power to configure the cached data structure. For more information, see Citrix Labs Google Calendar integration.

For comprehensive details of out-of-the-box microapps for Google Calendar, see Use Google Calendar microapps.

Note:

We want your feedback! Please provide feedback for this preview integration template as you use it. For any issues, our team will also monitor our dedicated forum on a daily basis.

Review prerequisites

These prerequisites assume you administer the Google Calendar instance of your organization to set up the integration.

  • This integration requires a dedicated Google account which is used to synchronize calendar data with Workspace. This account must have Admin API privilege Users/Read or a standard Admin role which includes this privilege.
  • If your internal server hosting Workspace is behind a firewall, you must allow access to host name www.google.com with port 443, so Workspace can connect.
  • Obtain a new oauth2 client_id and client_secret and define the scope of client’s application.
  • Configure Citrix Gateway to support single sign-on for Google Calendar so that once users log in they are automatically logged in again without having to enter their credentials a second time. Follow the instructions in Google CalendarSingle Sign-on Configuration. For more information about configuring SSO, see Citrix Gateway Service.

You must have these details to add the Google Calendar integration in Citrix Workspace Microapps:

  • OAUTH Private Key JSON
  • Impersonated Admin User account

For User Consent (3LO) Authentication for Google Calendar:

  • Client ID
  • Client Secret

Note:

We recommend that you always use OAuth 2.0 as your service authentication method where available. OAuth 2.0 ensures that your integration meets the maximum-security compliance with your configured microapp.

Configure Citrix Gateway to support single sign-on for Google Meet so that once users log in they are automatically logged in again without having to enter their credentials a second time. For more information about configuring SSO, see Citrix Gateway Service /wiki/citrix/wiki/citrix/en-us/citrix-gateway-service/.

The integration requires regular access to your Google Calendar instance, so we recommend creating a dedicated user account. This account must have the following permissions:

  • Permissions required for Service Account: Full administrator privileges

  • Scopes required for Service Account:

    https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.events https://www.googleapis.com/auth/admin.directory.user

The number of API requests that can be made to specific resources is limited, we therefore recommend the following:

Create a new service account

Sign in here: https://workspace.google.com/intl/en/pricing.html

How to enable APIs

Google Calendar APIs are enabled for access via web services for paid accounts by default.

Configure OAuth

  1. Log in with service account to: https://console.cloud.google.com
  2. Select APIs and Services on left-hand menu.
  3. Select the appropriate project from the project list on the navigation menu.
  4. Select ENABLE APIS AND SERVICES, and enable all the required APIs from Google Workspace . Recommended APIs: Google Calendar API and Admin SDK.
  5. Go back to the APIs and Services page, and select OAuth consent screen on the left screen.
  6. Select the User Type according to your requirement (we recommend: Internal), and then select Create.
  7. Complete the required fields including Scopes required for Service Account, and save the details. These are the required scopes:

Configure callback URL server

Configure the OAuth server to read data through the Google Calendar integration.

  1. Log in with service account to: https://console.cloud.google.com
  2. Select APIs and Services on left-hand menu.
  3. Select the appropriate project from the project list on the navigation menu.
  4. Select Credentials on the left screen.
  5. Select CREATE CREDENTIALS, and select OAuth client ID from the list.
  6. Select Web Application from the Application type list, and enter a Name.
  7. Select ADD URI under Authorized redirect URIs.
  8. Enter the following authorized redirect URLs for this integration in the URIs field:

    • https://{yourmicroappserverurl}/admin/api/gwsc/auth/serverContext
  9. Select Create.
  10. Copy and save the ClientId and Secret shown on the screen. You use these details for Service Authentication while configuring the integration.

Configure callback URL client

Configure the OAuth client for writing back data through the Google Calendar integration.

  1. Log in with service account to: https://console.cloud.google.com
  2. Select APIs and Services on left-hand menu.
  3. Select the appropriate project from the project list on the navigation menu.
  4. Select Credentials on the left screen.
  5. Select CREATE CREDENTIALS, and select OAuth client ID from the list.
  6. Select Web Application from the Application type list, and enter a Name.
  7. Select ADD URI under Authorized redirect URIs.
  8. Enter the following authorized redirect URLs for this integration in the URIs field:

    • https://{yourmicroappserverurl}/app/api/auth/serviceAction/callback
  9. Select Create.
  10. Copy and save the ClientId and Secret shown on the screen. You use these details for Service Action Authentication while configuring the integration.

Add the Google Calendar integration

Follow these steps to set up the Google Calendar integration:

  1. From the overview page, select Get Started.

    The Manage Integrations page opens.

  2. Select Add New Integration, and Add a new integration from Citrix-provided templates.
  3. Choose the Google Calendar tile from the Integrations category of the catalog.
  4. Enter a name for the integration.

    Google Calendar connector parameters, OAuth Private Key JSON, Impersonated Admin User

  5. Enter the Service Authentication parameters that you collected in the previous procedures.
    • Copy and paste the entire OAUTH Private Key JSON. Copy the whole key, including the {} brackets.
    • Enter the Impersonated Admin User.
  6. Select a User Authentication method.
    • Admin
    • User
    • User Consent (3LO) The resource owner allows access.
  7. For User Consent (3LO), enter the Client ID and Client Secret that you collected in the prerequisites procedure.
  8. Enter Connector Parameters.
    • Number of Days of Upcoming Events to Load - Defines the length of time to cache upcoming calendar events to send notifications.
    • Number of Days of Past Events to Load - Defines the length of time to cache past events.
    • Select the Load User Calendar Events radio button if necessary.
    • Thread Count - Enter a value.
  9. Select Add.

You are now ready to set and run your first data synchronization. As a large quantity of data can be pulled from your integrated application to the Microapps platform, we recommend you use the Table page to filter entities for your first data synchronization to speed up synchronization. For more information, see Verify needed entities. For complete information about synchronization rules, synchronization that does not meet its schedule and veto rules, see Synchronize data.

For more details of API endpoints and table entities, see Google Calendar connector specifications.

Use Google Calendar microapps

Our Google Calendar integration comes with the following preconfigured out-of-the-box microapps.

Calendar Events: Create and preview events.

Notification or PageUse-case workflows
Event Reminder notificationWhen an event is upcoming, all subscribers receive a reminder notification.
All Events pageProvides a personalized list of upcoming events.
Create Event pageProvides a form for adding a new event with details.
Event Detail pageProvides a detailed view of an event including a list of guests.

Citrix Labs Google Calendar integration

Deploy the Google Calendar integration to schedule calendar events and list events and office hours of a user from any device or intranet.

Note:

This integration template is in Preview and marked as Preview in the list of available templates that are shown in the product when adding a new integration. While in Preview, there is no commitment to support, and support is provided by the developer on a best-effort basis. Preview integration templates are shared for the purpose of testing and validation. We do not advise deploying them in production environments. For more information, see Maintenance statement for Microapps integration templates.

This integration delivers these four use cases:

  • With the Create Event microapp, users can host one-time or recurring meetings, add invitees, and select different timezones. The microapp also follows up with an email to all invitees with the corresponding event object for easy calendar integration.
  • With the My Calendar (Current Month) microapp, users can view all upcoming events for the current month.
  • With the My Office Hours microapp, users can set up virtual office hours or list all the current month office hours of the user.

Review prerequisites

These prerequisites assume that administrator is a part of the Google Calendar integration set up of the organization. This Google Calendar admin account must have full read privileges for user information. After you set up this integration with Google Calendar, you will need these artifacts to add the integration in Citrix Workspace Microapps:

  • BASE URL: https://www.googleapis.com/
  • TOKEN URL: https://oauth2.googleapis.com/token
  • AUTHORIZATION URL: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent
  • CLIENT ID: The client ID is the string representing client registration information unique to the authorization server.
  • SECRET: The client secret is a unique string issued when setting up the target application integration.

Note:

We recommend that you always use OAuth 2.0 as your service authentication method where available. OAuth 2.0 ensures that your integration meets the maximum-security compliance with your configured microapp.

Configure Citrix Gateway to support single sign-on for Google Meet so that once users log in they are automatically logged in again without having to enter their credentials a second time. For more information about configuring SSO, see Citrix Gateway Service /wiki/citrix/wiki/citrix/en-us/citrix-gateway-service/.

The integration requires regular access to your Google Calendar instance, so we recommend creating a dedicated user account. This account must have the following permissions:

  • Permissions required for Service Account: Full administrator privileges

  • Scopes required for Service Account:

    https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.events https://www.googleapis.com/auth/admin.directory.user

The number of API requests that can be made to specific resources is limited, we therefore recommend the following:

Create a new service account

Sign in here: https://workspace.google.com/intl/en/pricing.html

Enable APIs

Google Calendar APIs are enabled for access via web services for paid account by default.

Configure OAuth

  1. Log in with service account to: https://console.cloud.google.com
  2. Select APIs and Services on left-hand menu.
  3. Select the appropriate project from the project list on the navigation menu.
  4. Select ENABLE APIS AND SERVICES, and enable all the required APIs from Google Workspace . Recommended APIs: Google Calendar API and Admin SDK.
  5. Go back to the APIs and Services page, and select OAuth consent screen on the left screen.
  6. Select the User Type according to your requirement (we recommend: Internal), and then select Create.
  7. Complete the required fields including Scopes required for Service Account, and save the details. These are the required scopes:

Configure callback URL server

Configure the OAuth server to read data through the Google Calendar integration.

  1. Log in with service account to: https://console.cloud.google.com
  2. Select APIs and Services on left-hand menu.
  3. Select the appropriate project from the project list on the navigation menu.
  4. Select Credentials on the left screen.
  5. Select CREATE CREDENTIALS, and select OAuth client ID from the list.
  6. Select Web Application from the Application type list, and enter a Name.
  7. Select ADD URI under Authorized redirect URIs.
  8. Enter the following authorized redirect URLs for this integration in the URIs field:

    • https://{yourmicroappserverurl}/admin/api/gwsc/auth/serverContext
  9. Select Create.
  10. Copy and save the ClientId and Secret shown on the screen. You use these details for Service Authentication while configuring the integration.

Configure callback URL client

Configure the OAuth client for writing back data through the Google Calendar integration.

  1. Log in with service account to: https://console.cloud.google.com
  2. Select APIs and Services on left-hand menu.
  3. Select the appropriate project from the project list on the navigation menu.
  4. Select Credentials on the left screen.
  5. Select CREATE CREDENTIALS, and select OAuth client ID from the list.
  6. Select Web Application from the Application type list, and enter a Name.
  7. Select ADD URI under Authorized redirect URIs.
  8. Enter the following authorized redirect URLs for this integration in the URIs field:

    • https://{yourmicroappserverurl}/app/api/auth/serviceAction/callback
  9. Select Create.
  10. Copy and save the ClientId and Secret shown on the screen. You use these details for Service Action Authentication while configuring the integration.

Add the Citrix Labs integration to Citrix Workspace Microapps

Add the Preview Google Calendar integration to Citrix Workspace Microapps to connect to your application. This delivers out-of-the-box microapps with pre-configured notifications and actions which are ready to use within your Workspace.

Follow these steps:

  1. From the Microapp Integrations page, select Add New Integration, and Add a new integration from Citrix-provided templates.
  2. Choose the Google Calendar tile from the Preview category of the catalog.
  3. Enter a name for the Integration.
    • Enter the instance Base URL: https://www.googleapis.com/.
    • Select an Icon for the integration from the Icon Library, or leave this as the default icon.
  4. Under Service authentication, select OAuth 2.0 from the Authentication method menu and complete the authentication details. The authentication options are preselected. Ensure that these options are selected as you complete the process. Use the OAuth 2.0 security protocol to generate request/authorization tokens for delegated access. It is recommended that you always use OAuth 2.0 as your service authentication method where available. OAuth 2.0 ensures that your integration meets the maximum security compliance with your configured microapp.

    1. Select Authorization code from the Grant type menu. This grants a temporary code that the client exchanges for an access token. The code is obtained from the authorization server where you can see the information the client is requesting. Only this grant type enables secure user impersonation. This displays the Callback URL, which you use when registering your application.
    2. Select Request body from the Token authorization menu.
    3. The Authorization URL is prefilled: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent
    4. The Token URL is prefilled: https://oauth2.googleapis.com/token
    5. Ensure the following is entered for Scope: https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.events https://www.googleapis.com/auth/admin.directory.user
    6. Enter your Client ID. The client ID is the string representing client registration information unique to the authorization server. You collect this and the secret when you configured the OAuth server. You need to add the Callback URL you see on the integration configuration page.
    7. Enter your Client secret. The client secret is a unique string issued when setting up the target application integration.

    Service authentication

  5. Under Service Action Authentication, enable the Use Separate User Authentication in Actions toggle. Service action authentication authenticates at the service action level. The authentication options are preselected. Ensure that these options are selected as you complete the process.

    1. Select OAuth 2.0 from the Authentication method menu and complete the authentication details.
    2. Select Authorization code from the Grant type menu. This grants a temporary code that the client exchanges for an access token. The code is obtained from the authorization server where you can see the information the client is requesting. Only this grant type enables secure user impersonation. This will display the Callback URL, which you use when registering your application.
    3. Select Request body from the Token authorization menu.
    4. The Authorization URL is prefilled: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent
    5. The Token URL is prefilled: https://oauth2.googleapis.com/token
    6. Ensure the following is entered for Scope: https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.events
    7. Enter your Client ID. The client ID is the string representing client registration information unique to the authorization server. You collect this and the secret when you configured the OAuth client. You need to add the Callback URL you see on the integration configuration page.
    8. Enter your Client secret. The client secret is a unique string issued when setting up the target application integration.

    Service action authentication

  6. Enable the Enable request rate limiting toggle. Enter 100 for Number of requests and 1 minute for Time interval.
  7. (Optional) Enable Logging toggle to keep 24 hours of logging for support purposes.

    Rate limiting and logging toggles

  8. Select Save to proceed.
  9. Under OAuth Authorization, select Authorize to log in with your service account. A pop-up appears with a Google login screen.
    1. Enter your Service Account user name and password and select Log in.
    2. Select Accept.

    Authorize

The Microapp Integrations page opens with your added integration and its microapps. From here you can add another integration, continue setting up your out-of-the-box microapps, or create a new microapp for this integration.

You are now ready to set and run your first data synchronization. As a large quantity of data can be pulled from your integrated application to the Microapps platform, we recommend you use the Table page to filter entities for your first data synchronization to speed up synchronization. For more information, see Verify needed entities. For complete information about synchronization rules, synchronization that does not meet its schedule and veto rules, see Synchronize data.

Note:

It is recommended to set the “Full Synchronization” interval as Weekly to remove the canceled or deleted events from Microapps platform and subsequently from the user’s calendar.

For more details of API endpoints and table entities, see Preview Google Calendar connector specifications.

Use Labs Google Calendar microapps

Existing application integrations come with out-of-the-box microapps. Start with these microapps and customize them for your needs.

Note:

Since the currently available time zones are hardcoded in the Create Event, My Office Hours and My Calendar (Current Month) microapp, the addition of any other time zone would require the admin to add them manually.

Create Event: Schedule an event according to user preferences.

Notification or PageUse-case workflows
Create Event pageProvides a form to schedule an event with these details: Event Title, Google Meet Video link, Start and End Time, Time Zone, Recurrence (One Time, Daily, Weekly, Monthly), Description, Location, and Event Attendees.

My Calendar (Current Month): View list of the upcoming current month’s one-time and recurring calendar events and the ability to edit the events.

Notification or PageUse-case workflows
Event Notification Details pageDetail page which shows all appropriate details of an event and Join now button to start the meeting. User can also redirect to Google Calendar by selecting Open My Calendar.
Load Events pageProvides a list of one-time and recurring calendar events available for the user with Refresh List button to refresh the list. Users can view event details by clicking on the events available in the list.
List Events pageProvides up to date list of one-time and recurring calendar events available for the user. Users can view event details by clicking on the events available in the list.
Event Details pageDetail page which shows all the appropriate details of the event. User can start/join the meeting by selecting Join Event and users can redirect to Google Calendar by selecting Open My Calendar.
All Day Event Details pageDetail page which shows all the appropriate details of all day events. User can start (join) the meeting by selecting Join Event and users can redirect to Google Calendar by selecting Open My Calendar.
Edit OneTime Event pageForm page to edit the one-time event.
Edit Recurring Event pageForm page to edit the existing recurring event.

My Office Hours: Create, edit, and view office hours.

Note:

The refresh button is used to sync the cache with the most recent data, in lieu of full or incremental synchronization.

Notification or PageUse-case workflows
Create Office Hours pageProvides a form to create office hours with these details: Start and End Time, Time Zone, Recurrence (One Time, Daily, Weekly, Monthly).
My Office Hours List pageProvides a list of user office hours available with a Refresh List/Load My Hours button to update/refresh the list. User can add office hours by selecting Add Office Hours.
Edit My Office Hours pageForm page to edit user office hours.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:44 次

字数:36446

最后编辑:6年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文