Google Calendar Integration with ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 01:42 AM
Hello Developers & Architects,
As a part of knowledge sharing below is the procedure to integrate Google Calendar with ServiceNow with the error scenarios that I had come across during integration.
Google Calendar Configuration Steps :
1. Navigate to https://developers.google.com/calendar and click 'Sign in'
2. Login with your Gmail credentials (Generic Account for API Enabling)
3. Navigate to the section 'Reference' and select 'insert' under 'Events' menu options
4. In new tab, visit https://console.developers.google.com/, Select your country, accept the terms and click 'AGREE AND CONTINUE
5. Click 'Create Project'
6. Give it a unique name and click 'Create'
7. Click 'Enable APIs and Services'.
8. Search for calendar and select 'Google Calendar API' and click on “Enable”
9. Select 'Credentials' from menu options
10. Click 'Create Credentials' and select OAuth client ID
11. Configure the consent screen.
12. Select the appropriate “User Type” and click on CREATE.
Note: For testing purpose, “External” user type was selected.
13. Give an App name and User Support email and save it.
14. Summary of the OAuth consent screen looks as below,
15. Navigate back to Credentials and select 'OAuth client ID' under 'CREATE CREDENTIALS' and select the application type “Web Application” and give it a unique name.
16. Note down the OAuth 'Client ID' & 'Client Secret' and download the JSON file.
ServiceNow Configuration Steps :
17. Login to ServiceNow instance, create an application registry using the generated Client ID and Secret from Google Workspace Project.
18. Add the necessary OAuth Entity Profile and Scopes.
19. Create the REST Message and tag the OAuth profile in “Authentication” tab and necessary headers in HTTP Request.
Note: Before the connection is established, it displays the information message at the top as “OAuth or Refresh Tokens are not available. Verify the OAuth configuration and click the “Get OAuth Token” link below to request a new token.
20. On click of the “Get OAuth Token” link, it prompts for the login credentials used/mentioned during the creation of the project.
Note: Accept/Allow access for all the pop-ups prompted from the Google Project.
21. On successful connection with the Google Workspace, an access token is generated automatically which is generally valid for an hour.
22. To generate the refresh token, clone the “OAuthUtil” script include and modify the below phrases.
23. Refresh the page or re-login with the same credentials to generate the “Refresh Token”.
-----------------------------------------------------------------------------------------------------------------------------------------
ERROR SCENARIOS
GOOGLE WORKSPACE/CALENDAR
# If Google Service Account is used, it requires access to Google Calendar.
Solution: Access the Google Workspace Admin Portal and make sure that the Google Service Account is in the organizational unit (OU) that has access to the calendar.
# If Google Service Account is used, it requires owner permission to the cloud project.
Solution: Access the Google project, go to IAM and give the service account “Owner” permission.
# Validate if the Google Service Account can login to Google Workspace and opted as “Internal” type.
SERVICENOW
# Non-admin users cannot retrieve OAuth token from OAuth Credentials table to make outbound REST call
Reference: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0783632
Solution: Create ACLs as per the support document.
# HTTP Error: 401 - Unauthorized
When the user tries to click on the “Get OAuth Link” and it throws the below error.
Reference: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1430702
Solution: Client secret needs to be entered to obtain the access.
# HTTP Error: 403 - Forbidden Username/Password
Reference: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0720934
Solution: User - Agent header updated as “ServiceNow” instead of “servicenow”
#integration #googlecalendar #servicenowintegration #googleworkspace #happylearning
Sujatha V.M.
- Labels:
-
Architect
- 4,072 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 09:24 AM
Good one, please list out the limitations if any, can we get all features as what we will get in outlook integration?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 01:24 AM
Thanks @kamal_gm
With regards to Outlook, I'm not aware of the limitations but in Google Calendar. If the Calendar is created for specific set of people to be viewed then Calendar ID and Calendar Permission is must from Google Workspace.
Sujatha V.M.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 07:23 PM
@Sujatha V M Thanks for sharing and the solutions will be very handy while integrations setup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 01:22 AM
Thanks @Prabu Velayutha 👍
Sujatha V.M.