TABLE OF CONTENTS
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.
The Google Docs source
The Google Docs source allows Stack Internal to ingest and index selected Google documents, normalize their content, and make it available to users.
With the Google Docs source enabled, Stack Internal can:
- Ingest documents from approved Google Drive folders.
- Read document metadata and content for indexing.
- Keep Google Docs content represented as Stack Internal knowledge objects, so it can be retrieved alongside other connected sources.
- Preserve stable references to source documents so answers can be traced back to the original Google Doc where available.
What the source ingests
By default, 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 an allowlist of specific Google Drive folder IDs or URLs. Stack Internal will only ingest files within these designated directories.
The Google Docs source will ingest content if:
- a site admin has enabled the Google Docs source
- a site admin has specified Google Drive folders for ingestion
- documents in a specified folder are shared with the organization (general access is not restricted)
Stack Internal will only ingest Google documents shared with your entire organization. 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 will ultimately depend 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:
- A Google Workspace super administrator
- The Stack Internal service-account client ID:
[SERVICE ACCOUNT CLIENT ID] - A dedicated Google Workspace user for the integration
- The IDs of the shared drives or folders you want to connect
The dedicated user must have access to every shared drive or folder you want Stack Internal to ingest. Stack Internal can only access content that this user can access.
Optional: create a delegated user. We recommend creating a dedicated Google Workspace user for the integration instead of using an employee's account. Add this user to each shared drive or folder that Stack Internal should access. Confirm that the user can open the intended Google Docs. Using a dedicated user makes the connection easier to manage and prevents it from being interrupted when an employee changes roles, loses access, or leaves your organization.
Setup instructions
Create or choose a Google Cloud project
- Open Google Cloud Console.
- Create a new project, or select an existing project you want to use for this integration.
- Give it a clear name, such as "Stack Internal Google Connector".
Permissions and roles check (if needed)
Ensure you have the required access to configure OAuth and IAM settings. If you don't have access, ask your IT administrator to assign you these roles:
roles/oauthconfig.editorroles/serviceusage.serviceUsageViewerroles/iam.serviceAccountViewer
Required services check (if needed)
Verify that you have access to manage the required services in this project. If restricted, ask your IT admin to grant access or enable these services for you:
docs.googleapis.comdrive.googleapis.com
After creating a project or updating IAM permissions, Google systems 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
- Open APIs & Services, then Library.
- Search for Google Drive API, then click Enable.
- Search for Google Docs API, then click Enable.
Configure the OAuth consent screen
- In Google Cloud Console, open Google Auth Platform, then Branding.
- If prompted, click Get started.
- Enter:
- App name Something clear, such as "Stack Internal Google Connector"
- User support email An admin-owned mailbox
- Contact email An admin-owned mailbox
- Choose the audience:
- Internal If the app will only be used inside your Google Workspace organization and that option is available
- External If Internal is not available
- Review and create the consent configuration.
If you choose external audience
Add the account that will complete the Stack Internal connection as a test user until the app is ready for broader use.
Add data access scopes
In "Google Auth Platform" -> "Data Access" add the scopes Stack Internal needs:
https://www.googleapis.com/auth/documents.readonlyhttps://www.googleapis.com/auth/drive.readonly
For data access, documents.readonly is a sensitive scope and drive.readonly is a restricted scope. If your project is external, Google may require additional verification and policy review before broad rollout.
Create an OAuth 2.0 client ID
- From the "Overview" page, click Create OAuth Client.
- Under "Application type", select Web application.
- Give the client a clear name, such as "Stack Internal Web Client".
- Under "Authorized redirect URIs", add the exact URI provided by Stack Internal: https://callbacks.stackinternal.com/v1/google/oauth/connector-callback
- If Stack Internal provides more than one redirect URI, add all of them.
- Make sure the URI value matches exactly (including "https//:", the full path, and trailing slashes if present).
- Click Create.
Copy the Client ID and Client secret
- After the client is created, copy the OAuth credentials.
- Use whichever Google view is available in your console:
- Copy the values directly from the client details page, or
- Download the OAuth client JSON file and copy:
client_idclient_secret
- Keep the client secret secure.
- Enter the credentials in Stack Internal, then click Connect.
Once configured, Stack Internal will ingest content from the approved folders and make it available through Stack Internal's knowledge experiences.
Finding Google Drive folder IDs
You can provide either a Google Drive folder URL or the folder ID itself, depending on your Stack Internal setup experience.
A folder URL typically looks like this:
https://drive.google.com/drive/folders/1XkavvlQkGYbPa6URTxDqaYdRhgC97UNL
In this example, the folder ID is:
1XkavvlQkGYbPa6URTxDqaYdRhgC97UNL
You can copy and paste the full URL directly from Google Drive.
Troubleshooting
Unauthorized client
Confirm that the service-account client ID was entered correctly in Google Admin and that domain-wide delegation has been authorized.
Missing scope
Open the client in Manage Domain Wide Delegation and confirm that both required scopes are listed exactly as shown above.
Invalid delegated user
Confirm that the email address belongs to an active user in your Google Workspace organization.
Drive or folder access denied
Confirm that the delegated user has access to the configured shared drive or folder and that the supplied ID is correct.
The connection was authorized recently
Wait a few minutes, then test again. Google advises that domain-wide delegation changes can occasionally take up to 24 hours.
What users can expect
After the source is configured and synced, users can ask questions in Stack Internal and receive answers informed by content from connected Google Docs, where relevant. Google Docs content can be retrieved alongside other knowledge sources connected to Stack Internal. Longer documents may take more processing and may be broken into smaller knowledge units for retrieval.
Ongoing administration
Administrators should periodically review:
- The list of connected Google Drive folders.
- Whether folder sharing settings still match the organization's expectations.
- The last successful sync time.
- Any folders or documents that fail ingestion.
- Whether new knowledge areas should be added to the allowlist.
If a folder should no longer be ingested, remove it from the source configuration. If the source is disabled, Stack Internal will stop future ingestion from Google Docs.
Revoke access
To disconnect Stack Internal at any time:
- In the Google Admin console, go to Security, then Access and data control, then API controls, then Manage Domain Wide Delegation.
- Find the Stack Internal service-account client.
- Select Delete.
Deleting the authorization immediately prevents the Google Docs source from accessing your Workspace data. You can also remove the dedicated user from the applicable drives or folders to revoke access to specific content.
When the source is disabled:
- Stack Internal stops future Google Docs ingestion.
- New content from the selected folders is no longer synced.
- Previously ingested content may remain available in Stack Internal.
If your organization needs previously ingested content removed, reach out to support.
Get help
If you have questions or issues, reach out to our support team for help.