Skip to content

Connecting Google services

Google services (Gmail, Drive, Sheets, Calendar, Chat, Meet…) are connected by signing in with your Google account from the credential, with the Sign in with Google button. When you create the credential you choose which Google Cloud project the connection goes through, in the Select Project field:

  • NappAI, the default: you use NappAI’s Google Cloud project, which is already set up. You don’t have to configure anything in Google.
  • Custom: you use your company’s Google Cloud project. You prepare it once, as this page explains, and paste its Client Id and Client Secret into the credential.

To connect and manage credentials in general, see Credentials.

Which option to choose

NappAI projectCustom project (yours)
Setup in GoogleNoneOnce per project: APIs, consent screen and OAuth client
Name shown to whoever signs inNappAIYour app’s name
”Google hasn’t verified this app” warningMay appearDoesn’t appear if your app is internal to your organisation or verified
Your Google Workspace policiesThe administrator can block or allow NappAI’s appThe app is yours: the administrator manages it like any internal app
When it fitsTo get started and for most usesWhen company policy requires your own apps, or to remove the unverified-app warning

YouTube API only supports the Custom project.

With NappAI’s project

  1. Create the service’s credential and leave Select Project on NappAI.
  2. Choose the access, for example read and write or read only.
  3. Click Sign in with Google and sign in with the account you want to connect.
  4. If Google shows “Google hasn’t verified this app”, click Advanced and then Go to nappai.es.
  5. Tick the permissions it asks for and click Continue. You’re back in NappAI with the credential created.

If a Google Workspace organisation blocks third-party apps, its administrator has to allow NappAI’s app in the Google Admin console (Security → Access and data control → API controls), or you use a Custom project.

With your own Google Cloud project

You do this once in the Google Cloud console and it serves every Google credential you create with that project.

1. Choose or create the project

At the top, in the project selector, choose your company’s project or create a new one, for example NappAI integrations.

2. Enable the APIs of the services you’ll use

Go to APIs & Services → Library, search for each API and click Enable. Enable only those of the services you use; the table in What each service needs says which.

It’s what the person sees when clicking Sign in with Google. Go to APIs & Services → OAuth consent screen (in some accounts it’s called Google Auth Platform) and fill in:

  • App name, support email and, if you like, the logo.
  • User type or Audience:
    • Internal: only accounts of your Google Workspace organisation can connect. Google doesn’t need to verify the app. It’s the recommended option if everyone connecting accounts belongs to your company.
    • External: any Google account can connect. While the app is in testing, only the test users you add can connect, and access expires after 7 days, so it would have to be reconnected every week. To really use it, set it to In production. Until Google verifies it, whoever connects sees the unverified-app warning and there’s a limit of 100 users.
  • Scopes (under Data access): add the permissions in the table for each service you’ll use.

4. Create the OAuth client

  1. Go to APIs & Services → Credentials → Create credentials → OAuth client ID.
  2. In Application type choose Web application.
  3. In Authorized redirect URIs add the Callback URL NappAI shows in the credential form. Copy it with its button; it looks like https://<your NappAI domain>/external-oauth-callback.
  4. Click Create and copy the Client ID and the Client secret.

5. Create the credential in NappAI

  1. Create the service’s credential and in Select Project choose Custom.
  2. Paste the client ID into Client Id and the secret into Client Secret.
  3. Choose the access and click Sign in with Google.

The same client ID and secret work for every Google credential you connect with that project: you only need its APIs enabled and its permissions added.

What each service needs

Credential in NappAIAPIs to enable (Custom project)Permissions for the access you chooseKeep in mind
Google GmailGmail APIFull: gmail.modify, mail.google.com. Read only: gmail.readonlyThese are Google restricted permissions: with an External app in production, Google also requires a security assessment. With an Internal app it doesn’t.
Google DriveGoogle Drive APIFull: drive. Read only: drive.readonlyRestricted permissions, like Gmail.
Google SheetsGoogle Sheets API, Google Drive APIFull: spreadsheets, drive.file, drive.readonly. Read only: spreadsheets.readonly, drive.readonlyDrive is used to list and pick the spreadsheets.
Google SlidesGoogle Slides API, Google Drive APIFull: presentations, drive.file, drive.readonly. Read only: presentations.readonly, drive.readonly
Google FormsGoogle Forms API, Google Drive APIFull: forms.body, forms.responses.readonly, drive. Read only: forms.responses.readonlyThe responses trigger needs access to the form’s responses.
Google CalendarGoogle Calendar APIFull: calendar. Read only: calendar.readonlyThe calendar trigger works with either.
Google ChatGoogle Chat API, and configure the Chat app (see below)Full: chat.spaces, chat.messages, chat.memberships, chat.spaces.create, chat.delete, openid, email. Read only: chat.spaces.readonly, chat.messages.readonly, chat.memberships.readonly, openid, emailOnly works with Google Workspace accounts, not personal Gmail accounts. openid and email let the trigger recognise your own account’s messages.
Google MeetGoogle Meet REST API, Google Calendar API, Google Drive APIcalendar, meetings.space.readonly, driveDrive is used for recordings and transcripts.
Google AnalyticsGoogle Analytics Data API, Google Analytics Admin APIanalytics.readonly
Youtube APIYouTube Data API v3youtube, youtube.force-sslCustom project only.

In the Google console the permissions appear in full, with the https://www.googleapis.com/auth/ prefix; for example https://www.googleapis.com/auth/calendar. There are three exceptions: openid and email are written as they are, and mail.google.com is https://mail.google.com/.

Google Chat: configure the Chat app

Google Chat needs one more step, also in your Custom project: although NappAI acts on behalf of the person who signs in, Google requires the project to have a Chat app configured. Without it, reading works but writing fails with “Google Chat app not found”.

  1. In the Google Cloud console go to APIs & Services → Enabled APIs & services → Google Chat API → Configuration.
  2. Fill in App name (for example, your company’s) and Description (40 characters at most). The Avatar URL is optional.
  3. Turn off Enable interactive features. No bot or connection address is needed: NappAI writes as the credential’s person.
  4. Click Save.

With the NappAI project this step is already done.

Other Google services

Not every Google service uses Sign in with Google. These connect with a key:

  • Google Gemini: an API key from Google AI Studio.
  • Google Translate: an API key from a Google Cloud project with the Cloud Translation API enabled.
  • Vertex AI API: the JSON key of a service account from a project with Vertex AI enabled.

Common problems

What you seeWhy it happensWhat to do
”Google refused the sign-in saved in credential… expired or been revoked” (invalid_grant)Access expired or was withdrawn: a password change, permission removed in the Google account, or an External app in testing, which expires after 7 daysEdit the credential and click Revalidar. If you use a Custom project in testing, set it to In production.
”Error 400: redirect_uri_mismatch” when signing inNappAI’s Callback URL is not in the OAuth clientAdd the exact Callback URL to the client’s Authorized redirect URIs.
”Request had insufficient authentication scopes”The credential was connected with fewer permissions than the operation needsEdit the credential, choose full access and click Revalidar. With a Custom project, add the permission to the consent screen first.
”… API has not been used in project … or it is disabled”The service’s API is not enabled in your projectEnable it in APIs & Services → Library and wait a couple of minutes.
”Google Chat app not found”The project has no Chat app configuredFollow Google Chat: configure the Chat app.
”Access blocked” or “This app is blocked”The Google Workspace organisation doesn’t allow that appThe Workspace administrator has to allow it in API controls, or use an Internal app of your organisation.

When NappAI adds permissions to a service, the credentials you already had get them when you Revalidate them: edit the credential, choose the access and sign in again.