In order to set up Google Calendar integration in CultureHQ, you'll need to be an administrator in CultureHQ and have administrator-level access to your company's Google Cloud Apps (https://console.developers.google.com) and Search Console (https://google.com/webmasters/tools). The two steps involved in this process are to:
- Configure Google Calendar to accept updates from CultureHQ.
- Configure CultureHQ to read Google Calendar and post updates.
When you enable a calendar integration, you give CultureHQ permissions to read and write all calendar data in your organization. However, CultureHQ's integration pulls only a minimal subset of required data. Due to the Google's lack of fine-grained scopes for their Calendar API we cannot limit or reduce the permissions allowed by the integration.
Configure Google Calendar
The first step in the configuration process allows CultureHQ to retrieve employees' Google Calendars.
- First, go to https://console.developers.google.com.
- Create a project if you don't already have one, or select an existing one.
Enable API access
1. In the APIs & Services pane, click Library to see the list of available APIs.
2. Search for "Calendar", then click Google Calendar API, then Enable.
Now, you'll need to add create a service account and add credentials.
Create service account
1. On the left side of your screen under APIs & Services, click Credentials.
2. Click Create Credentials.
3. Select Service account key from the list.
4. Choose New service account from the Service Account list.
5. Name the service account CultureHQ Calendar Integration.
6. For Role, select Project, then Owner.
7. Make sure the JSON option is selected for Key Type.
8. Click Create. The key will automatically download a .json file to your default download folder. Hold onto this file. You'll need this file later, and it is the only copy of the key.
Edit service account
1. While still on the Credentials page, click Manage Service Accounts.
2. Open the Actions menu for the account you just created, and click Edit. Note: You may have to scroll horizontally in this table to see the Actions column.
3. Click SHOW DOMAIN-WIDE DELEGATION.
4. Check Enable Google Apps Domain-wide Delegation.
5. If the 'Product name for the consent screen' is not filled in, name this the same as before: CultureHQ Calendar Integration
6. Click Save.
7. After you’ve enabled Domain-wide Delegation, Google will create an OAuth 2.0 Client ID. You’ll need this ID for the next step. To find it go back to Google APIs and click Credentials from the left menu. Find the client you just created by looking for the product name. Copy the Client ID.
Authorize Calendar API
- Go to https://admin.google.com.
- Navigate through Security > Advanced settings > Manage API client access.
- Enter the Client ID into the Client Name field.
- In the One or More API Scopes field, enter https://www.googleapis.com/auth/calendar and click Authorize.
- Click Security to go back to the Security Admin page.
- If it’s not already selected, click API reference > Enable API access.
The second step in the setup process allows Google to recognize changes to an employee's calendar (e.g., when they accept or decline an event) and update CultureHQ.
1. Sign in to CultureHQ, open the Admin drop-down, and click Integrations.
2. On the Integrations page, click the Google tab.
3. Under Credentials File, click Choose file... and upload the .json key file you downloaded earlier.
4. Click Copy to copy the Google Calendar webhook URL for your CultureHQ account. It’ll look similar to: https://api.culturehq.com/webhooks/google/calendars/company-name/
5. Open https://www.google.com/webmasters/tools.
6. Click Add a Property.
7. Paste the Google Calendar webhook URL. Make sure to include the https:// prefix, e.g.: https://api.culturehq.com/webhooks/google/calendars/company-name/
8. Click Add Property.
9. In the Search Console verification page, download the HTML verification file. Keep this page open.
10. Back in CultureHQ, on the integration page, upload the HTML file into the Verification File field. Make sure that the file name is identical to the one that you downloaded.
11. Click Configure.
12. On the Google Search Console page, then complete the CAPTCHA and click Verify.
13. Go to https://console.developers.google.co...inverification. Make sure you’re in the project that contains your Google Calendar service account.
14. Click Add Domain.
15. Paste the Google Calendar webhook URL without the https:// prefix, e.g., api.culturehq.com/webhooks/google/calendars/company-name
16. Click Add Domain.
You've now successfully configured your Google Calendar integration with CultureHQ!
Here is what the integration offers:
- Any new event created will be automatically added to the host's calendar
- When you invite any user or group of users to an event from CultureHQ, that will send each user a Google calendar invitation
- If a user RSVPs to an event from within CultureHQ or through Google calendar, the data will be sync'd in both places.
If you have any questions, please reach out to our team directly either through the chat icon or at email@example.com.