Google Spreadsheet as Data Source
Depending on the Google service you want to use, there is a dedicated API endpoint for each of them. Ensure that the API you intend to use is activated and enabled in your Google Developer Console.
For more information on what you need to set up in the Google Developer Console, visit this link.
Google Cloud Setup:
Configure OAuth Consent Screen
Navigate to APIs & Services > OAuth consent screen.
Include scopes such as
https://www.googleapis.com/auth/spreadsheets.readonly
at this stage.
Activate and Enable API You Want to Use
Go to APIs & Services > Dashboard, and then enable the required APIs and services.
Create Credentials → OAuth Client ID
Access Apis & Services > Credentials and proceed to Create Credentials.
Choose Application Type: Web application.
Enter Authorized redirect URIs: https://external-data-for-jira.codefortynine.com/signin-dynamic-oauth. (ensure this URL aligns with the one visible in the data source setup later)
Securely store the Client ID and Client Secret.
External Data - Data Source Setup
To set up a new data source, go back to the External Data for Jira Fields app.
URL
Define the API Endpoint from which you want to retrieve data. For instance, if you wish to extract data from a Google spreadsheet, use the following link:
https://sheets.googleapis.com/v4/spreadsheets/{sheetId}/values/{range}
Authentication
Select Authentication: OAuth2
Grant Type
Select Grant Type: Authorization Code
Client ID & Secrets
Use the client ID and secret you have created with the credentials
Endpoints
Endpoints are service specific URLs for receiving an access token. Auth & Token URLs are required for all services. Only some services have a dedicated revoke endpoint.
Auth Url: https://accounts.google.com/o/oauth2/auth
Token Url: https://oauth2.googleapis.com/token
Revoke Url: https://accounts.google.com/o/oauth2/revoke
The Callback URL
is a readonly field. You need to add this url to your list of Authorized redirect URLs
at your remote service configuration.
Scopes
Scopes define the permission to specific parts of data. In our example we want to read from a spreadsheet. If you need multiple scopes append them with a whitespace between.
Find a complete list of available google scopes here
https://www.googleapis.com/auth/spreadsheets.readonly
Authenticate Now
To initiate the process, click on Authenticate
. This action will open a new window prompting you to log in to the service. Once logged in, you will be required to provide consent for the scopes you previously defined. The window should then close automatically, and a green badge labeled Authenticated
should appear directly below the button. Finally, save and test the data source to confirm that everything is functioning as intended.