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 project | Custom project (yours) | |
|---|---|---|
| Setup in Google | None | Once per project: APIs, consent screen and OAuth client |
| Name shown to whoever signs in | NappAI | Your app’s name |
| ”Google hasn’t verified this app” warning | May appear | Doesn’t appear if your app is internal to your organisation or verified |
| Your Google Workspace policies | The administrator can block or allow NappAI’s app | The app is yours: the administrator manages it like any internal app |
| When it fits | To get started and for most uses | When company policy requires your own apps, or to remove the unverified-app warning |
YouTube API only supports the Custom project.
With NappAI’s project
- Create the service’s credential and leave Select Project on NappAI.
- Choose the access, for example read and write or read only.
- Click Sign in with Google and sign in with the account you want to connect.
- If Google shows “Google hasn’t verified this app”, click Advanced and then Go to nappai.es.
- 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.
3. Set up the consent screen
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
- Go to APIs & Services → Credentials → Create credentials → OAuth client ID.
- In Application type choose Web application.
- 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. - Click Create and copy the Client ID and the Client secret.
5. Create the credential in NappAI
- Create the service’s credential and in Select Project choose Custom.
- Paste the client ID into Client Id and the secret into Client Secret.
- 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 NappAI | APIs to enable (Custom project) | Permissions for the access you choose | Keep in mind |
|---|---|---|---|
| Google Gmail | Gmail API | Full: gmail.modify, mail.google.com. Read only: gmail.readonly | These are Google restricted permissions: with an External app in production, Google also requires a security assessment. With an Internal app it doesn’t. |
| Google Drive | Google Drive API | Full: drive. Read only: drive.readonly | Restricted permissions, like Gmail. |
| Google Sheets | Google Sheets API, Google Drive API | Full: spreadsheets, drive.file, drive.readonly. Read only: spreadsheets.readonly, drive.readonly | Drive is used to list and pick the spreadsheets. |
| Google Slides | Google Slides API, Google Drive API | Full: presentations, drive.file, drive.readonly. Read only: presentations.readonly, drive.readonly | |
| Google Forms | Google Forms API, Google Drive API | Full: forms.body, forms.responses.readonly, drive. Read only: forms.responses.readonly | The responses trigger needs access to the form’s responses. |
| Google Calendar | Google Calendar API | Full: calendar. Read only: calendar.readonly | The calendar trigger works with either. |
| Google Chat | Google 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, email | Only works with Google Workspace accounts, not personal Gmail accounts. openid and email let the trigger recognise your own account’s messages. |
| Google Meet | Google Meet REST API, Google Calendar API, Google Drive API | calendar, meetings.space.readonly, drive | Drive is used for recordings and transcripts. |
| Google Analytics | Google Analytics Data API, Google Analytics Admin API | analytics.readonly | |
| Youtube API | YouTube Data API v3 | youtube, youtube.force-ssl | Custom 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”.
- In the Google Cloud console go to APIs & Services → Enabled APIs & services → Google Chat API → Configuration.
- Fill in App name (for example, your company’s) and Description (40 characters at most). The Avatar URL is optional.
- Turn off Enable interactive features. No bot or connection address is needed: NappAI writes as the credential’s person.
- 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 see | Why it happens | What 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 days | Edit 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 in | NappAI’s Callback URL is not in the OAuth client | Add 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 needs | Edit 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 project | Enable it in APIs & Services → Library and wait a couple of minutes. |
| ”Google Chat app not found” | The project has no Chat app configured | Follow Google Chat: configure the Chat app. |
| ”Access blocked” or “This app is blocked” | The Google Workspace organisation doesn’t allow that app | The 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.