- Export assistant responses to Google Docs with formatting preserved.
- Export tables to Google Sheets with headings preserved.
- Export responses to Gmail as draft emails with formatting preserved.
Prerequisites
Before enabling Google actions:- The Google Drive datasource must be configured (the instance where docs and sheets will be created).
- You must be able to access the Glean Admin Console.
- For Domain-wide Delegation: Google Workspace admin access to configure domain-wide delegation.
- For custom OAuth: Sufficient permissions in Google Cloud Console to create OAuth credentials.
Setup instructions
Follow these steps to set up the Google action pack:- In Glean, go to Admin → Platform → Actions.
- Click Add.
- From the list in the Add pre-set actions section, select Google Actions under Action templates.
-
In the Configuration tab:
- Add the Instance Name.
- Select the Data Instance you want to link these actions to. This is the instance where docs and sheets will be created.
- Configure authentication. Google actions support two authentication modes, depending on how the actions are configured:
- Domain‑wide Delegation (DWD): supported only when Google actions are configured to use a central service account that can act on behalf of users across the domain.
- OAuth user authentication: used when Google actions run as the signed‑in user or on their behalf. The newer actions like Google Calendar, Google Docs, Google Sheets, and Gmail actions use OAuth user authentication and do not support Domain‑wide Delegation.
Using Domain-wide Delegation (recommended)
Use Domain-wide Delegation only for legacy Google actions that are enabled to run through a central service account.
The new Google Calendar, Docs, Sheets, and Gmail actions are OAuth-only and do not use Domain‑wide Delegation.Use Domain-wide Delegation if you want a central service account to act on behalf of users. A dedicated service account is used for Google actions (separate from the Google Drive connector). Google’s Domain-wide Delegation allows Glean to act on behalf of the logged-in Glean user to create documents, sheets, or emails.Steps:- Select Domain-wide Delegation under Authenticate on the Google Actions setup page in the Glean Admin console.
- Copy the 21-digit Client ID under How to authenticate Drive instructions.
- Go to the Domain-wide Delegation section in Google Admin Console. You must be signed in as an admin.
- Click Add new and paste the 21-digit Client ID into the Client ID field.
- In the OAuth scopes (comma-delimited) field for this Domain‑wide Delegation client, paste the following and click Authorize:
https://www.googleapis.com/auth/drive.file,https://www.googleapis.com/auth/gmail.compose,https://www.googleapis.com/auth/spreadsheets - Navigate to the Google Cloud Console and go to APIs & Services → Library.
- Enable the Google Drive API, Google Sheets API, and Gmail API. For Gmail API, also enable the People API.
To use only Google Docs and Sheets (no Email action) with Domain‑wide Delegation, add only:https://www.googleapis.com/auth/drive.filehttps://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/gmail.compose; the email export option will not appear without the Gmail scope.Using OAuth user authentication
Use OAuth User for the new Google Calendar, Google Docs, Google Sheets, and Gmail actions.
These actions run as the logged‑in user and are not available via Domain‑wide Delegation.With OAuth user authentication, documents, sheets, events, and emails are created on behalf of the user and stored in the user’s Google account (for example, in their Drive or Calendar).Using the central Google app for authentication (recommended)
Use the central option if:- Your organization is Glean‑hosted, and
- Central apps are available for Google in your environment.
- Select Central under Authenticate section on the Google Actions setup page.
- Click Save.
Glean’s OAuth app may show as unverified during Google’s review. Until verified, admins can authorize the unverified app. Otherwise users may see an unverified app message when authenticating.Using a custom Google OAuth app for authentication
Use the custom option if:- You want to use your own Google Cloud project and OAuth client for Google actions, or
- Your security model requires a customer-owned OAuth app in Google Cloud Console.
- Go to the Google Cloud Console.
- In the top bar, click the project selector (it usually shows your current project name).
- Either select an existing project your org uses for Google Workspace integrations, or create a new project dedicated to Glean Google Actions (for example, Glean Google Actions).
- Ensure all three APIs (Drive, Sheets, Gmail) will be enabled in this project. Make sure everyone agrees which project will own the OAuth client.
- In the left navigation, go to APIs & Services → Library.
- Open the details page, search for Google Drive API, click **Enable.
- Repeat for Google Sheets API and Gmail API.
- If you want to want enable the Gmail action pack, add the person API.
- In the left navigation, go to APIs & Services → OAuth consent screen.
- Choose the user type: Internal (recommended for most Workspace domains) or External (only if you must allow accounts outside your domain).
- Fill in the required fields: App name (for example, Glean Google Actions), User support email, and Developer contact information.
- Click Create.
- In the left navigation, go to APIs & Services → Credentials.
- Click Create credentials → OAuth client ID. If Google prompts you to configure the consent screen, complete Step 3 first, then return here.
- For Application type, select Web application.
- Enter a descriptive Name (for example, Glean Google Actions OAuth Client).
- Leave Authorized redirect URIs empty for now; you will add the Callback URL from Glean in Step 6.
- Click Create. Keep this page open or copy the Client ID and Client secret when shown. This information is required in Step 7.
- Go to the Glean Admin Console and navigate to Platform → Actions.
- Open your Google Actions action configuration page.
- Under Authentication, select OAuth User → Custom App.
- Locate the Callback URL on the Google Actions setup page and copy it.
- Return to the Credentials page in Google Cloud Console and open your OAuth client.
- In Authorized redirect URIs, click Add URI and paste the Callback URL you copied from the Glean Google Actions setup page.
- Click Create.
- Go back to the Google Actions setup page in the Glean Admin Console.
- In the Custom App , locate the Client ID and Client Secret fields.
- Paste the Client ID and Client Secret from the Google Cloud Console into the matching fields in Glean.
- Click Save on the Google Actions setup page.
- Click Save.
- Click Edit settings under Enable Actions to control which teammates can use these actions in Glean Chat and Assistant.