The ‘Google Workspace friendly application’ series – table of contents
- What is Google Workspace, and why should we integrate with it.
- Project configuration in Google API Console – use of Google Service Account.
- Configuration of Oracle Database and APEX application – use of Google Service Account.
Many organizations base their functioning on tools from the Google Workspace package, formerly known as Google Suite. The wide range of useful tools encourages utilizing Google Workspace in every area of the company’s operations. So a key question arises – can Oracle APEX be integrated with Google Workspace in my company? Yes, of course! Recently I have faced a challenge of this kind – the project was dedicated to pharmacy and one of functionalities assumed fetching data from Google Sheet and downloading files from Google Drive.
Google Workspace includes office applications and other productivity tools. It is a set of services provided by Google as a cloud solution. It allows the commercial use of Google applications, such as Google Docs, Google Sheets, Google Drive, etc. After purchasing access to Google Workspace, the company receives a personalized space with its domain and access to services included in the selected subscription. Working with Google Workspace tools can be done on a computer, phone, or tablet.
Google Workspace has become an alternative solution to standard office applications, especially in cases where organisations have decided to stop using office suites installed locally on computers. It is really worth integrating with Google Workspace. Otherwise, the organization exposes itself to low application performance and forces end users to switch between the business application and their resources from Google account. For many companies, Google Workspace has become one of the critical elements of the internal system infrastructure.
Google Workspace provides an extensive REST API, thanks to which it is possible to use the API methods from the custom application level. For example, the API allows you to add events to Google Calendar, download files from Google Drive or read data saved in Google Sheet. The application we create may look like a Google Workspace tool due to the high level of integration.
Access to Google API is available on two primary levels. The choice of access method depends on the specific API functionality and is defined in the documentation. Both Google API access methods can be configured in the Google API Console.
- If the API call does not refer to the user’s private data, we will use the API Key. This is a string that does not change over time and does not require a periodic update. The API Key is used for the identification in transactions between our application and Google Auth server.
- Otherwise, when we use the API to perform CRUD operations on user’s data, we will use the OAuth 2.0 protocol.
- In this case we use the Access Token to authorize API access, which is valid for one hour. After this time, your application should obtain a new Access Token to communicate with Google API.
- You have to keep in mind that the OAuth 2.0 protocol implemented on the browser level is designed for applications that access APIs only while the user is present at the application.
- The alternative is to use a Service Account and call Google API without confirmation of its identity. This approach will be described in the coming articles.
What is important, Google API refers to the file’s access rights of the calling user, so if you have access to the file (you are an owner of the file or it is shared with you), then you can access it using Google API. Otherwise, you do not.
This article is an introduction to a series of articles about integrating with Google Workspace. The following topics will be covered:
- Project configuration in Google API Console – use of Google Service Account
- Configuration of Oracle Database and APEX application – use of Google Service Account