---
sourceDocument: Yokohama ServiceNow AI Platform Administration
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/platform-administration

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Set up the OAuth application on the Google Sheets API

# Set up the OAuth application on the Google Sheets API {#ariaid-title1}

* Release version: Yokohama
* 
* Updated May 5, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

Set up the OAuth application on the Google Sheets API so that you can authenticate requests from your ServiceNow instance to access Google Sheets.

## Before you begin

* Create a business account on <https://console.developers.google.com/>.
* Create a domain and an email address that is associated with the domain. For example, www.mydomain.com and jane-admin@mydomain.com.  
  Note:  
  You can register only one email address per domain in Google Workspace.
* Role required: admin
{#set-up-oauth-app-gsheets-api__ul_aqk_vb5_ffc}

## About this task

Setting up the OAuth application on the Google Sheets API enables you to access and update spreadsheets securely from your instance. For example, if you're exporting incident records from the ServiceNow instance to a Google Sheet, OAuth ensures that the system has permission to create or update the sheet on your behalf, without needing you to log in manually each time.

## Procedure

1. Navigate to Google Workspace and set up a project.  
   The project includes the details of the OAuth application and the API permissions, if applicable.
   1. Log in to <https://console.developers.google.com/> with the same domain email ID and password as mentioned in the prerequisites.
   2. In the Google Cloud Console, select Select a project.  
   3. In the Search projects and folders field, select New project.  
   4. In the Project name\* field, enter a unique name for the project.
   5. In the Location\* field, select Browse and then select an organization.
   6. Select Create.  
      The project is created and appears in the Notifications box.
   {#set-up-oauth-app-gsheets-api__substeps_ebc_4bw_5wb}
2. Enable the Google Sheets API.  
   1. Open the project that you created in step 1.  
      The API and services dashboard page opens for the selected project.
   2. In the search box, enter <kbd class="ph userinput">Google Drive</kbd>.
   3. From the search results list, select Google Drive API.  
   4. Select Enable.  
      The Google Drive APIs are enabled on your project.
   {#set-up-oauth-app-gsheets-api__substeps_of1_zkw_ffc}
3. Create the OAuth app and credentials.
   1. In the Enabled APIs \& services dashboard, select Create credentials.  
      The Create credentials page is displayed.

   2. In the Credential Type section, select User data and then select Next.  
   3. On the form in the OAuth Consent, fill in the fields.  
      {#set-up-oauth-app-gsheets-api__table_bxg_2ds_gfc__entry__2}

      | Field | Description |
      |-|-|
      | App name | Name of the OAuth app. |
      | User support email | Email at which users can send queries to you about their consent. |
      | Logo file to upload | Logo representing the OAuth app. |
      | Developer contact information | Developer to contact for changes to the project. |
      [Table 1. OAuth Consent Screen form]

      {#set-up-oauth-app-gsheets-api__table_bxg_2ds_gfc}
   4. Select Save and continue.
   {#set-up-oauth-app-gsheets-api__substeps_c3m_tyr_gfc}
4. In the Scopes section, define the API scopes.  
   API scopes enable you to select specific APIs. For example, the /auth/spreadsheets scope enables you to create, edit, or remove spreadsheets.
   1. Select Add or remove scopes.  
   2. In the Update selected scopes list, search for Google Drive API, and then select the `.../auth/drive.file` scope.  
   3. Select Update and then select Save and continue.

   {#set-up-oauth-app-gsheets-api__substeps_ggg_vds_gfc}  
   The API scope is selected.
5. In the OAuth Client ID section, create the OAuth client ID.
   1. From the Application type\* list, select Web application.
   2. In the Name\* field, enter a unique name for the OAuth client.
   {#set-up-oauth-app-gsheets-api__substeps_sln_mlw_5wb}
6. On the Authorized redirect URIs heading, select + ADD URI.
7. In the URI field, enter the redirect URI in the following format: <kbd class="ph userinput">https://instance.service-now.com/oauth_redirect.do</kbd>.
8. Select Create.  
   The OAuth details are generated in a JSON file.  
   Tip:  
   Select DOWNLOAD to download the JSON file for later reference.

9. Select Done.  
   The OAuth application on Google Workspace is created.
10. Configure the audience allowed to access Google Sheets API.  
    For example, your audience is the ServiceNow instance.
    1. In the APIs \& Services dashboard menu, select OAuth consent screen and then select Audience.
    2. In the User type section, select External and add the user that you want to give access to the instance.
    {#set-up-oauth-app-gsheets-api__substeps_fcs_yjv_gfc}

## Result

The OAuth application is enabled to authenticate the access of Google Sheets from your instance.

## What to do next

To enable OAuth authorization for exporting table records to Google Sheets, register the Google Drive application in your instance. For more information, see [Create an application registry for Google Sheets on a ServiceNow instance](https://www.servicenow.com/docs/LLhdnyqfxI~6FY3dYhkqVA "Register the Google Drive application in your ServiceNow instance to enable OAuth authorization for exporting table records directly to Google Sheets.").

