Google Sheets Connection Guide¶
Overview¶
This guide describes the system requirements and instructions for connecting Vinyl to a Google Sheets database server.
This connection type supports bidirectional access to data, including Vinyl CRUD business rules.
To connect your servers, you must have Vinyl 3.3+ installed.
System Requirements¶
Database Server¶
Google Sheets Database Server
Client Web Browser¶
-
Chrome: 84+
-
Firefox: 73+
-
Safari: 13.0.1+
-
Edge: 84+
Connection Instructions¶
Configure Google Sheets from Google Console¶
-
Navigate to Google Console: https://console.cloud.google.com/apis/dashboard
-
Enable Google Sheets API by clicking on "Enable APIs and Services" and searching Google Sheets
-
From the dashboard, setup OAuth under "Credentials"
-
Click "Create Credentials" at the top of the screen and choose "OAuth client ID"
-
Choose Application type "Web Application" and give your application a name
-
Add an Authorized redirect URI back to the security provider created next
-
Click "Create" and make note of the Client ID and Client Secret
Note
The redirect URI in this example uses the Security Provider named GoogleOAuth.
Configure Google Sheets in Vinyl¶
-
Setup Security Provider in Vinyl by navigating to the IDE > Security Providers
-
Add a "Data Source Authentication" Security Provider
-
Provide the following details:
-
Name: Matching string after "signin-" for redirect URI
-
Type: OAuth
-
Authentication Type: OAuth
-
OAuth Client Authentication: Basic
-
OAuth Resource Authentication: Bearer
-
Token Owner: Client
-
Redirect on Challenge: True
-
Endpoints:
-
Authorization Endpoint:
https://accounts.google.com/o/oauth2/auth
-
Token Endpoint:
https://oauth2.googleapis.com/token
-
-
Credentials:
-
Type: Client
-
User Name: Client ID from Google Console
-
Password: Client Secret from Google Console
-
-
Properties:
-
Scopes: https://www.googleapis.com/auth/spreadsheets
- Visit Google's documentation for further guidance on Scopes. Multiple scopes can be added, separate by a space.
-
-
Create Google Sheets Data Server from IDE > Data Servers > + Server
-
Server Name: Provide a name
-
Type: Google Sheets
-
Filename: UUID from Google Sheet URL
- Example:
https://docs.google.com/spreadsheets/d/Spreadsheet_UUID_Here
- Example:
-
Security Provider: Choose Security Provider created in previous step
-
-
Click Save
Test the Connection¶
Click the Test Connection button from Testing.