generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 2
Add OAuth client configuration details to Google Sheets integration docs #275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mintlify
wants to merge
2
commits into
main
Choose a base branch
from
mintlify/docs-google-sheets-oauth-scopes-61516
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
59 changes: 36 additions & 23 deletions
59
self-host/customize-deployment/google-sheets-integration.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,36 @@ | ||
| --- | ||
| title: Configure a Google Sheets integration for self-hosted Lightdash | ||
| description: "In this guide we will show you how you can [upload to Google Sheets in scheduled deliveries](/references/google-sheets) and upload results from Google Sheets on `charts` on your on self-hosted Lightdash server." | ||
| sidebarTitle: Google sheets | ||
| --- | ||
|
|
||
| ### Enable Google SSO | ||
|
|
||
| To authenticate Google users, first you need to enable [Google SSO](https://docs.lightdash.com/self-host/customize-deployment/use-sso-login-for-self-hosted-lightdash#google) on your server. | ||
|
|
||
| If you still want to keep users to login via email/password or another SSO provider, you can set this `AUTH_GOOGLE_ENABLED` variable to `false` | ||
|
|
||
| ### Create an API key for Google file picker | ||
|
|
||
| We use Google Drive picker API to allow you to select your spreadsheet files on `Syncs` | ||
|
|
||
| To create a Google Drive picker API you need to add a new API key in [APIs and services in Google Cloud](https://console.cloud.google.com/apis/credentials). Your Google project must have the following API's enabled: | ||
|
|
||
| * Google Drive API | ||
| * Google Picker API | ||
| * Google Sheets API | ||
|
|
||
| Save the API key in a new environment variable `GOOGLE_DRIVE_API_KEY` | ||
| --- | ||
| title: Configure a Google Sheets integration for self-hosted Lightdash | ||
| description: "In this guide we will show you how you can [upload to Google Sheets in scheduled deliveries](/references/google-sheets) and upload results from Google Sheets on `charts` on your on self-hosted Lightdash server." | ||
| sidebarTitle: Google sheets | ||
| --- | ||
|
|
||
| ### Configure Google OAuth client | ||
|
|
||
| To use Google Sheets sync, you need to set up a Google OAuth client, even if you don't want to enable Google login. | ||
|
|
||
| 1. Go to [APIs and services credentials in Google Cloud](https://console.cloud.google.com/apis/credentials) | ||
| 2. Create a new OAuth 2.0 Client ID (Web application type) | ||
| 3. Configure the following: | ||
| - **Authorised JavaScript origins**: `https://<your_lightdash_domain>` | ||
| - **Authorised redirect URI**: `https://<your_lightdash_domain>/api/v1/oauth/redirect/google` | ||
| 4. Save the client ID and secret as environment variables: | ||
| - `AUTH_GOOGLE_OAUTH2_CLIENT_ID` | ||
| - `AUTH_GOOGLE_OAUTH2_CLIENT_SECRET` | ||
|
|
||
| <Note> | ||
| Lightdash automatically requests the necessary OAuth scopes (`drive.file` and `spreadsheets`) when users connect to Google Sheets. You don't need to configure scopes on the OAuth client itself. | ||
| </Note> | ||
|
|
||
| If you already use another SSO provider (like Okta) for login and only want Google Sheets functionality, set `AUTH_GOOGLE_ENABLED=false`. This hides Google as a login option while still allowing the Google Sheets integration to work. | ||
|
|
||
| ### Create an API key for Google file picker | ||
|
|
||
| We use Google Drive picker API to allow you to select your spreadsheet files on `Syncs` | ||
|
|
||
| To create a Google Drive picker API you need to add a new API key in [APIs and services in Google Cloud](https://console.cloud.google.com/apis/credentials). Your Google project must have the following API's enabled: | ||
|
|
||
| * Google Drive API | ||
| * Google Picker API | ||
| * Google Sheets API | ||
|
|
||
| Save the API key in a new environment variable `GOOGLE_DRIVE_API_KEY` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we only use Google Picker API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this PR with only the necessary changes, can you check https://lightdash-mintlify-docs-google-sheets-oauth-scopes-61516.mintlify.app/ to confirm this is correct?