If required, the CMS can be linked to a Google Drive to allow Google Files to be accessed from the website File Manager. Using the hyperlink option those files can then be linked to within the site content areas. Google Documents can also be embedded into pages using the Google Files Component and shared Google Folders from Drive can be output onto the page using the Google Folders Component.
In order to set this up, the following steps will need to take place:
- Login to your Google Workspace account
- Enable Google Drive API
- Google OAuth Setup
- Google Drive Consent
- Create Shared Google Drive Folders & Set Permissions
- Website Integration
Login to your Google Workspace account
Before beginning, you will need need a Google Workspace for Education account or a Business equivalent.
- Log in to the Google Cloud console for the school's Google account: https://console.cloud.google.com
Enable Google Drive API
If you have not already done so you will need to ensure that the Google Drive API is enabled in your workspace.
- Navigate to APIs and Services
- Click Enabled APIs and services
- Search for Google Drive API using the search bar at the top of the page, and select it
- Click the Enable button
Google OAuth Setup
- Navigate to APIs and Services > Credentials
- Click Create Credentials > oAuth client ID
- Select Web application from the Application type drop-down.
- The name can stay as the default or can be updated to reflect the website e.g. “Website integration”
- Click Add URI under Authorised redirect URIs
- Enter the URI in the following format: <Website address> followed by: /admin/googledrive/oauth/process.asp Example: https://www.juniperwebsites.co.uk/admin/googledrive/oauth/process.asp
- Click Create
- From the oAuth client created pop-up, copy the Client ID and Client secret. You’ll need this information for setting up the integration on the website.
Google Drive Consent
Once you have created the OAuth Client, you will be able to set the required consent.
- Navigate to APIs and Services > oAuth Consent screen.
- Select the User Type Internal App and click Create
- Complete the following fields:
- App name: Enter the school’s name.
- User support email: This should be an admin email account at the school.
- Click Add Domain under Authorised domains and enter the school domain: Example: exampleschool.co.uk
- Developer contact information: This should be an admin email account at the school.
- Click Save and Continue
Create Shared Google Drive Folders & Set Permissions
To allow website users to access the folders in Google Drive through the website integrations, they must be given access to the Shared Drive Folders in your Google Workspace. This article from Google explains how to create a Shared Google Drive and give permissions to your staff:
Now that everything is setup in Google, it's time to link your Google Drive with the Website
- Once logged into the website, navigate to the Website tab > Website Settings > Google Drive
- Enter the Client ID and Client secret, noted in the Google Console oAuth step, then click Save
NB - any changes to the Client ID and Secret must be saved prior to authorising
- Once the Client ID & Secret have been saved, click Authorise access to Google Drive on the pop-up you will need to login with the relevant Google admin account.
- The setup is now complete and you are ready to start linking and embedding Google Files and Folders into your website content. Google Drive files and folders can be added to the website in three ways:
- Create a hyperlink to a file in your Google Shared Drive in a content region on your website
- Use the Google Drive File component to embed the content of a Google Doc file within a content region on the website
- Use the Google Drive Folder component to add a list of files from your Google Shared Drive to a page of the website.
- Remember you will need to ensure the website administrator has permission to the files in Google Drive as well as access to the website.