HaloCRM Guides
Google Calendar Integration
The new method (API Method dropdown) for the Google Calendar integration does not require NHServer. This is an updated method that uses the read and write capabilities of a service account in order to pull in appointments/ recurring appointments from Agent's calendars. This can be set on a recurring schedule via the Halo Integrator.
Service accounts: If you are building an application that needs to access Google Calendar data on behalf of your own application rather than individual users, you can use service accounts. With service accounts, you can authenticate your application using a private key file instead of user credentials. This service account setup is required for the Halo Intergrator connection type.
Project Setup
- Navigate to google cloud console https://console.cloud.google.com/
- Create New Project
- Select the new Project
- Enable the Google Calendar API.
- Create Credentials for Service account. First click on "Create Credentials" in the Google Calendar API area:
Then choose the Application Data option (This will prompt you to create a service account):
Add in the role "Service Account Token Creator" - Select the “Service Accounts” menu from IAM & Admin > Service Accounts
- Share the calendar with service account. As service account doesn’t have calendar, we must share the actual user calendar with service account to send an event. Navigate to actual user account email calendar. Go to Calendar setting > Share with specific people or groups > Add people and groups. Provide email ID of service account. It will be available under the specific service account.
- Add in the service account email address:
IMPORTANT: The Agent's calendar that you are connecting to, must correspond to the email address of the agent in Halo, without this the calendar will not connect. - Enable Domain-wide delegation. It requires google workspace admin credentials to enable it. It is required for the Google Calendar API because it allows a service account, which is an account representing an application rather than an individual user, to access the resources of a user within a G Suite domain. By using domain-wide delegation, the service account can act on behalf of users within the domain and access their calendars. This is crucial in scenarios where an application needs to manage and interact with calendars of multiple users within an organization. Navigate to https://admin.google.com/ and login with admin credentials. Go to Security > Access and Data Control > API Controls > Domain-wide Delegation > MANAGE DOMAIN WIDE DELEGATION
- Add a new Client by clicking "Add new". Get client ID from service account. Unique ID available under the service account
Add all the below scopes by copying and pasting and then authorize:- https://www.googleapis.com/auth/calendar
- https://www.googleapis.com/auth/calendar.events
- https://www.googleapis.com/auth/admin.directory.resource.calendar
- Add Key in the Service Account. IAM & Admin > Service Accounts > *your service account* > KEYS
It will download the JSON file with the Service Account Private Key and other details. Downloaded JSON represents below format. - Grab the JSON from the file which will be downloaded (this may be easier to view in a code editor such as vs code) e.g.
{
"type": "service_account",
"project_id": "xxx-1231",
"private_key_id": "xxx",
"private_key": "xxx",
"client_email": "test.iam.gserviceaccount.com",
"client_id": "xxx",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}
and paste it into halo: - Now you will have the connection to Google and all connected calendars will pull through to Halo. You can connect the Halo Integrator to the calendar so that appointments are pulled through on a recurring schedule.
- Alternatively import the appointments and recurring appointments:
- If appointments are outwith the agents working hours, you will be given a popup not during the import: "Done - Please note that part or all of this Appointment falls outside the Agents working hours."
- You will then see the imported appointments on the agents calendar:
Deprecated Method
General Configuration
To enable the Google Calendar integration in Halo, go to Configuration > Integrations > Communications, and enable the module. Once the module has been enabled, click the menu icon for the module to begin configuring it.
Setting up a Google Calendar App
Login to https://console.cloud.google.com
- Select New Project from the Select a Project menu or Create Project from the Dashboard
- Give the project a name and create it.
- Search for and select API and Services
- Select Enable APIS and Services
- Search for Google Calendar API and enable the API for use
- Go to OAuth consent screen
Workspace user client setup
- Select internal
- Add email information.
- Click save and continue
- Click add scope.
- Add Google calendar API scope.
Non - workspace user client setup
- Select external.
- Add email information.
- Click save and continue
- Click add scope.
- Add Google calendar API scope.
- Because this is an external app you will now need to add all mailboxes which you want to be accessed into the Test Users section
Create Credentials
- Go to credentials.
- Click Create Credentials
- Select OAuth client ID.
- Select Web Application for the application type and enter "https://auth.haloservicedesk.com/externalauth" (change this depending on the version of Halo you are using, i.e. if using HaloITSM rather than HaloServiceDesk, use link "https://auth.haloitsm.com/externalauth") as the authorised redirect URI.
- Once created copy the Client ID and Client secret. These will be needed when setting up the Web App connection.
Setting up in Halo
Connect to Google:
Go to Config > Integrations > Google Calendars
- Add the client id copied from the previous step
- Add the client secret copied from the previous step.
- Click Sign In With Google to authorise access to the app.
- Once completed you should be redirected back to the Google calendar integration setup screen. If the authorisation was successful the Sign In button will have changed to a disconnect button.
Agent calendars
- Use the check calendars option to confirm which of your technicians calendars are accessible via your connected account.
- When clicked, a list of all technicians calendars that are accessible will be displayed. If you cannot access any technician calendars, you will be notified of this.*
Advanced
- Appointment updates are synced via the NHServer application. If you are a cloud customer, this will have already been configured for you automatically. If you have your own on premise version of Halo, please contact the Halo support team for assistance enabling the appointment sync in NHServer. You must be using NHServer version 13.18.01 or above for this feature to work.
*Note: For the authorizing account, ensure that the account has shared access such that it can read and create calendar entries in the individual agents accounts from within Google. This can be configured from within Google Calendars itself, where you define shared calendar access between agent accounts. The authorizing account will also need to 'subscribe' to each of the agent's calendars, so they they appear in the list of selectable calendars on the left, when the authorizing account views their calendar. Case will also need to be matched between the Gmail email address and the Halo agent email address (usually all lowercase).
Popular Guides
- Asset Import - CSV/XLS/Spreadsheet Method
- Call Management in Halo
- Creating a New Application for API Connections
- Creating Agents and Editing Agent Details
- Departments, Teams and Roles
- Halo Integrator
- Importing Data
- Multiple New Portals with different branding for one customer [Hosted]
- NHServer Deprecation User Guide
- Organisation Basics
- Organising Teams of Agents
- Step-by-Step Configuration Walk Through
- Suppliers