Connect Gmail to SkyTwin

Five minutes, one time. This is how every SkyTwin user wires up Gmail today — inbox triage, draft replies, approved sends, and content-aware classification all flow through credentials you create here.

Why you're seeing this page. The body of every email is the most sensitive thing Google gates behind their restricted OAuth tier — a public app like SkyTwin can't request gmail.readonly without passing an annual third-party security assessment ($15k–$50k). Rather than wait for that, SkyTwin lets you bring your own Google Cloud OAuth client. Your client is private to you, so Google's restricted-scope rules don't apply — you can use Gmail through it immediately. The walkthrough below is the actual five-minute setup. Most of it is clicking through Google Cloud Console screens. The SkyTwin desktop app has the same wizard at #/connect-gmail if you prefer driving it from inside the dashboard.

1. Create a Google Cloud project

  1. Open console.cloud.google.com/projectcreate.
  2. Project name: anything you'll recognise — my-skytwin works.
  3. Leave organisation as "No organisation." Click Create.

2. Enable the Gmail API

  1. Open console.cloud.google.com/apis/library/gmail.googleapis.com.
  2. Make sure your new project is selected at the top.
  3. Click Enable. (Repeat for Calendar if you want everything in one client: Calendar API.)

3. Configure the OAuth consent screen

  1. Open console.cloud.google.com/auth/branding.
  2. Choose External user type, click Create.
  3. App name: my-skytwin (or anything). Support email: your Gmail. Developer email: your Gmail. Click Save and Continue through the rest of the wizard. Skip the optional scope list and the logo — you don't need them for personal use.
  4. On the Test users step, add your own Gmail address. Click Save and Continue.

The project stays in "Testing" mode forever — that's fine. Testing-mode OAuth clients work indefinitely for users on the test-user list (up to 100). Since you're the only user, you'll never hit the cap.

4. Create the OAuth client

  1. Open console.cloud.google.com/apis/credentials.
  2. Click Create Credentials → OAuth client ID.
  3. Application type: Web application. (Yes, Web — even though SkyTwin is a desktop app. The OAuth flow lands on http://127.0.0.1, which Google's "Web application" type permits and which gives us a client_secret we need for the Gmail token-exchange. Don't pick "Desktop app" here — that type wires up an out-of-band redirect SkyTwin doesn't speak.)
  4. Name: SkyTwin client.
  5. Authorized redirect URIs: add http://localhost:3100/api/oauth/google/callback and http://127.0.0.1:3100/api/oauth/google/callback. (Two entries because some browsers normalise differently.)
  6. Click Create. Copy the Client ID and Client secret from the dialog.

5. Paste into SkyTwin

  1. Open the SkyTwin desktop app.
  2. Go to Setup → Google account credentials.
  3. Paste the Client ID and Client secret. Click Save.
  4. Click Connect Gmail. The OAuth consent screen will open — choose your account, click "Continue" through the warning (because the app is "Testing" mode, Google shows a "Google hasn't verified this app" warning for your own client → click Advanced → Go to my-skytwin → Continue).
  5. Done. SkyTwin can now read and label your inbox, and send approved replies or messages through Gmail. SkyTwin-sent emails include a small repo footer by default; you can turn it off in Settings.
What can go wrong:

What about Calendar?

Calendar works without this setup using the SkyTwin-bundled OAuth client. If you also want Calendar to flow through your own OAuth client (so all Google access uses one set of credentials you control), enable the Calendar API in step 2 and SkyTwin will pick that up automatically — the same Setup page covers both.

When does this stop being necessary?

When SkyTwin's bundled OAuth client passes Google's restricted-scope security assessment. That's an annual ~$15k–$50k third-party audit; we'll fund it once SkyTwin's usage justifies the cost. Tracking issue: github.com/jayzalowitz/skytwin/issues (search for "restricted-scope verification").