This article will cover the process of preparing Google Workspace for HCP integration and during the process you will configure the following:
- Create New Project
- Configure Project Authorization
- Global Calendar Sharing
- Create & Configure Resource Calendars
Create New Project
- The first step in the process is to create a new project for the integration between HCP and Google Workspace. To do so navigate to Google Cloud Platform and log in using your Google Domain Admin
- Click Create Project
- Enter a name for your project and click Create
- A notification should appear in the notification area when the project is created
- Click on the notification to reach the API Manager or go to Menu Icon > API & Services > Dashboard
- Click on Enable APIs and Services
- The API Library will appear, search for “Google Calendar API”, Select Google Calendar API and click Enable
- Repeat the previous step adding and enabling “Gmail API”
- Enable the last needed API “Admin SDK API” for the project
- Now you need to create a service account. Click on the Menu Icon, select IAM & Admin, then select Service Accounts
- Click Create Service Account. Fill in the Name, ID and the Description and click Create And Continue
- Assign the service account the Role “Service Account Token Creator” from the drop-down menu and click Continue
- Click on Done. The Service account should be ready in the list of service accounts. Press “Manage Details” to collect the needed info and to create a P12 key
Create a P12 key by clicking on keys, then add key och choose P12. Save this key as it will be used for later.
- Take a note of the “Client ID” and the service account email address as they will be needed in later steps.
- Now you need to Grant the service account API Access permissions, to do so, navigate to https://admin.google.com and click on Security, select Access and data control and then select API controls
- Select Manage Domain Wide Delegation
- Under the API Clients ID, Add a new client and use your service account Client ID. Copy and paste the following strings to OAuth scopes then press Authorize
https://www.googleapis.com/auth/admin.directory.user.readonly, https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/gmail.send
Create & Configure Resource Calendars
- To configure the global resource sharing and create a new resource, navigate to https://admin.google.com . Select Apps and then Calendar
- Select External Sharing option, then set external sharing options for primary calendars to "only free/busy information (hide events details)"
- The next step is to Create one or more calendar resource.To do so, navigate to “Directory > Buildings and resources > Manage resources”
- Click “Create a new resource” create building then create rooms
- Add the details for your resource and then "Add Resource"
- Go to https://www.google.com/calendar and in the calendar side menu next to "Other calendars" press the + icon and browse for your newly created Resource and click the check box icon
- Select the newly created resource calendar from "My Calendar list" and select the menu icon, then “Settings and Sharing”
- Make sure to add the service account which will has settings of show free/busy.
- Note: If you require PIN or RFID authentication to book you will need to add the users that can book with the permission "Make Changes to Events"
- Repeat the previous step for all resources in the project.
Grant user API permissions
To connect Humly Control Panel to your Google tenant in our steps further down the road you will need a so called "Admin email". This user will be authenticated from Humly Control Panel to Google during our inital HCP wizard and will act as Global admin in Humly Control Panel. API permissions is only needed for the user that acts as "Admin email".
- Go to Directory > Users and click on the user you want to edit.
- Scroll down and press "Admin roles and privileges".
- Apply the necessary API permission by selecting any of the default Google Roles: Super admin, Groups Admin, User Management Admin and Help Desk Admin. If you want the user to be more restricted you are able to create a custom role which we will quide you through in the next step.
- Creating a custom admin roles is done by going into: Account > Admin roles and pressing "Create new role"
- Give the new role a name of your liking and click next. Selecting privileges is done by scrolling down to "Admin API privileges" and select "Read" which you will find under "Users". That is the only permission needed so go ahead and click continue.
- Apply the newly created admin role to your user that will act as "admin email" in Humly Control Panel.