Connect Google
Google Calendar, Gmail, Google Tasks, Drive, Sheets and Google’s other services are connected the same way: you tell almyty which service, then sign in with your Google account. Google lets an app sign in to someone’s account only when that app is registered with Google, so before the first sign-in you register your own small “app” in Google Cloud. It takes about 20 minutes, once; every Google service you connect afterwards uses it.
You need a Google account, and for a company account (Google Workspace) usually an admin, or permission to create Google Cloud projects.
1. Connect the Google service in almyty
- Open APIs, click Connect an API and pick OpenAPI / Swagger.
- Under Link to the description, paste Google’s own description of the service:
| Service | Link |
|---|---|
| Google Calendar | https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest |
| Gmail | https://gmail.googleapis.com/$discovery/rest?version=v1 |
| Google Tasks | https://tasks.googleapis.com/$discovery/rest?version=v1 |
| Google Drive | https://www.googleapis.com/discovery/v1/apis/drive/v3/rest |
| Google Sheets | https://sheets.googleapis.com/$discovery/rest?version=v4 |
Any other Google service works the same way: its description is listed at https://www.googleapis.com/discovery/v1/apis.
- Click Connect API. almyty makes a tool for everything the service can do and opens Finish connecting.
- Under Sign-in, click Create one here. Keep this page open: it shows the redirect address you need in step 5, and the permissions it will ask Google for.
2. Create a Google Cloud project
- Open console.cloud.google.com and sign in with the Google account the assistant should work with.
- At the top, open the project list and click New project. Name it, for example “almyty”, and click Create. Make sure the new project is selected at the top.
3. Turn on the service
- Open APIs & Services → Library.
- Search for the service you connected (for example Google Calendar API), open it and click Enable.
- Do the same for every Google service you connect (Gmail API, Google Tasks API, …). A service that is not enabled answers every call with “API has not been used in project … or it is disabled”.
4. Set up the consent screen
This is the screen Google shows when you sign in: your app’s name, and what it asks for.
- Open Google Auth Platform (in older consoles: APIs & Services → OAuth consent screen) and click Get started.
- App name: for example “Lumen assistant”. User support email: yours.
- Audience:
- Internal, with a Google Workspace account: only people in your company can sign in, and Google does not review the app. Choose this when you can.
- External, with a personal Google account (or to let people outside your company sign in).
- Contact information: your email. Agree to Google’s policy and click Create.
External apps start in Testing. While an app is in Testing:
- only the people you list as Test users can sign in. Open Audience, click Add users and add your own address;
- Google ends each sign-in after 7 days. The assistant’s calls then fail until you sign in again (on the API’s page, under Key).
To stop the weekly sign-in, click Publish app under Audience (status In production). Google then asks for a review when the app asks for permissions it treats as sensitive or restricted, which includes reading mail and calendars. An Internal app needs neither the test users, nor the weekly sign-in, nor the review.
5. Create the OAuth client
- Open Clients (in older consoles: APIs & Services → Credentials → Create credentials → OAuth client ID) and click Create client.
- Application type: Web application. Name: for example “almyty”.
- Under Authorized redirect URIs, click Add URI and paste the redirect address from the almyty form in step 1. It ends in
/credentials/oauth2/callback. It has to match exactly, or Google refuses the sign-in with Error 400: redirect_uri_mismatch. - Click Create. Google shows a Client ID and a Client secret. Copy both (you can open the client again later to see them).
6. Sign in
- Back in almyty, paste the Client ID and Client secret into the form from step 1.
- Under What it asks for, the form lists the permissions the service’s description names, all ticked. Untick what the assistant does not need: an assistant that only reads keeps the ones ending in
.readonly. - Click Sign in. Google shows its consent screen with your app’s name and the permissions you left ticked. With an app in Testing, Google first warns that it has not verified the app: click Continue.
- You come back to almyty: Saved. Tools send it with every call. almyty asks Google for a sign-in that renews itself, so it keeps working without signing in again (except for the 7-day limit of an app in Testing).
The sign-in is saved under Credentials. Each Google service needs its own sign-in, made the same way with the same client ID and secret: a Calendar sign-in does not cover Gmail.
If something goes wrong
| What you see | What to do |
|---|---|
| Error 400: redirect_uri_mismatch | The redirect address on your Google client is not exactly the one the almyty form shows. Copy it again (step 5). |
| Access blocked: … has not completed the Google verification process | The app is External and in Testing, and you are not a test user. Add your address under Audience → Test users. |
| API has not been used in project … or it is disabled | Enable the service in APIs & Services → Library (step 3). |
| Request had insufficient authentication scopes (403) | The sign-in does not cover what the tool needs: you unticked that permission, or you picked another service’s sign-in. Sign in again under Key on the API’s page. |
| Everything worked, and a week later every call fails | The app is in Testing. Sign in again, publish the app, or use an Internal app. |