Stack Internal Support

Configure the Google Docs Source

How to connect to your Google workspace.

ADMIN PRIVILEGES REQUIRED

Overview

Stack Internal helps your organization find trusted knowledge across the tools your teams already use. The Google Docs source ingests selected Google documents, then Stack Internal combines their content with other sources to provide users relevant, trusted answers.

What the source ingests

The Google Docs source operates on an opt-in basis, meaning Stack Internal will not ingest any content until an administrator actively enables and configures the source. A Stack Internal site admin then controls the scope of ingestion by supplying a list of specific Google Drive folder IDs. Stack Internal will only ingest files within these designated folders.

The Google Docs source will ingest content only if:

  • a site admin has enabled the Google Docs source
  • a site admin has specified Google Drive folders for ingestion
  • documents are not in the Restricted sharing state (they're instead shared with the organization)

Stack Internal will only ingest Google documents shared with your entire organization as viewer (minimum). It will not ingest documents restricted to specific people or groups. Verify this in the document's sharing settings under "General access". Make sure general access is set to your organization, not Restricted.

We strongly recommend you audit the sharing settings of your intended folders and documents before you enable the Google Docs source. The exact content exposed to Stack Internal users depends on folders in the allowlist and the specific access model utilized by your deployment.

If you allow ingestion of sensitive or private Google content by mistake, you can't simply remove it from Stack Internal's knowledge layer. If you need to remove content from Stack Internal, reach out to support.

Before you begin

You'll need elevated access and privileges in the Google Cloud Workspace to set up the Google source connector. You may need to reach out to your IT team to ensure you have the following:

  • Admin access to Google Workspace.
  • The following OAuth and IAM permissions:
    • roles/oauthconfig.editor
    • roles/serviceusage.serviceUsageViewer
    • roles/iam.serviceAccountViewer
  • Access to manage the following Google services:
    • docs.googleapis.com
    • drive.googleapis.com

Configure the Google connector

Create a dedicated user

Using a regular employee account means the Google source will fail if that employee changes roles, loses access, or leaves your organization. Instead, have your IT department create a dedicated Google user for the Stack Internal Google source. Make sure that the user has access to each shared drive or folder that Stack Internal should access.

Create or choose a Google Cloud project

  1. Log into the Google Cloud Console (https://console.cloud.google.com) as the dedicated user created for the Stack Internal Google source.

  2. Click your organization name at the top of the screen to open the project picker.

  3. Select an existing project you want to use for this integration, or

  4. Create a new project with a descriptive name, such as "Stack Internal Google Connector".

After creating a project or updating IAM permissions, Google can take anywhere from 5-15 minutes (and up to 24 hours in rare cases) to propagate settings. If you see a "Not allowed to enable" error or missing permissions message when proceeding to the next steps, wait a short while for Google's backend to sync and try again.

Enable the required APIs

  1. Click the three lines button in the upper-left corner to open the Google Cloud navigation menu.

  2. Under "APIs & Services", click Library.

  3. Search for "Google Drive API", then click the Google Drive API tile.

  4. Click Enable.

  5. Repeat the process to search for and enable Google Docs API.

Configure OAuth

  1. In the search bar at the top of the screen, enter "auth".
  2. Select Google Auth Platform from the search results.
  3. Click Branding in the left-hand menu.
  4. If prompted, click Get started.
  5. Enter the following, clicking Next as needed to advance through the process:
    • App name Enter a descriptive name, such as "Stack Internal Google Connector".
    • User support email Enter your site admin email.
    • Audience Select Internal.
    • Contact Information Enter your site admin email.
    • Finish Review and agree to the user data policy, then click Continue.
  6. Click Create.

Create an OAuth 2.0 client ID

  1. Click Clients in the left-hand menu.
  2. Click + Create client at the top of the page.
  3. For Application type select Web application.
  4. Give the client a descriptive name, such as "Stack Internal Web Client".
  5. Click + Add URI under "Authorized redirect URIs".
  6. Enter https://callbacks.stackinternal.com/v1/google/oauth/connector-callback.
  7. Click Create.

Copy the Client ID and Client secret

The "OAuth client created" screen will appear.

  1. Click the copy (two pages) buttons to copy and paste the Client ID and Client secret to the bottom of the Stack Internal Google source page. You can also click Download JSON to download the credentials in a JSON file, then extract the client_id and client_secret values.

  2. Click Connect.

Save the client secret to a safe, secure place as you'll only be able to download it for a short time after creation. If you lose the client secret, you'll need to create a new one and update the Stack Internal source credentials.

Specify Google Drive folder IDs

Once connected to your Google docs, Stack Internal will ingest the folders you specify along with their sub-folders. On the page that appears, enter into the "Drive IDs" box those folder IDs you want Stack Internal to ingest.

To find a Google folder's drive ID, open the folder in your browser. The URL in your browser will include the ID at the end, after the last forward slash.

For example: in the URL https://drive.google.com/drive/u/0/folders/4rV1DVU-J1FHmTutY, the folder drive ID is 4rV1DVU-J1FHmTutY. Copy this section of the URL, and paste it on its own line in the "Drive IDs" box. When you've added all the folders you want ingested, click Save.

Content sync

After you configure the Google source, Stack Internal keeps the designated Google folders (and their sub-folders) synchronized and up to date. This means the source connector watches for, and ingests, new content regularly.

To check the status of the Google source (and others) in Stack Internal, click Control Center then Sources. There you can see each source's connection status and last sync (when Stack Internal last checked for new content).

Stop ingestion of Google content

Disconnect the Google drive source

To end ingestion of all new Google drive content, click Disconnect in Stack Internal. This completely disconnects the Google source.

Disable a Google folder

To remove a Google folder and its sub-folders from ingestion, delete its ID from the Stack Internal "Drive IDs" list and click Save.

Disconnecting the Google source or removing specific Google folders will not remove previously ingested Google content. If you need previously ingested content removed, contact support.

Get help

If you have questions or issues, reach out to our support team for help.

https://doc-automation.netlify.app/pdfs/docs/internal/for_admins/sources/configure_google_source.pdf

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article