Connect Gmail
Step-by-step guide to connecting your Gmail account to Leanbox.
Step 1: Create a Google Cloud Platform project (1 minute)
- Log in to the Google Cloud Platform Console using your Google credentials.
- On the welcome page, click Create or select a project > New project. If you already have a project you'd like to reuse, skip to step 5.
- Enter a project name (e.g.
Leanbox Integration) and select a location. - Click Create and wait for the project to be created.
- In the top menu, open the Select a project dropdown and confirm your new project is selected.
Step 2: Enable the Gmail API (30 seconds)
- Open the left navigation menu and go to APIs & Services > Library.
- Search for
Gmail API. - Click Gmail API, then click Enable.
Already enabled?
If you see a Manage button instead of Enable, the API is already enabled — you can move on.
Step 3: Configure your OAuth consent screen (3 minutes)
-
In the search bar at the top of the page, type
Google Auth Platformand select it from the results. -
Click Get Started.
-
Under App information, enter
Leanboxas the app name and provide your Gmail address. Click Next. -
Under Audience, select External and click Next.
-
Under Contact information, enter your Gmail address and click Next.
-
Under Finish, agree to the Google User Data Policy, then click Continue > Create.
-
After the app is created, click Audience in the left menu.
-
Scroll to Test users and click Add users (or + Add users).
-
Enter the Gmail address of the Google account you'll connect in Leanbox — the same inbox you want to triage — then confirm so that account is listed under test users. While the app stays in Testing status, only addresses you add here can complete the OAuth flow.
-
Click Branding in the left menu, then scroll to the Authorized domains section and click + Add domain.
-
Enter
leanbox.appas the authorized domain and click Save. -
Click Data access in the left menu, then click Add or remove scopes and add the following scopes:
https://www.googleapis.com/auth/gmail.readonly— read your messages so Leanbox can triage your inbox.https://www.googleapis.com/auth/gmail.compose— create drafts on your behalf.https://www.googleapis.com/auth/gmail.modify— apply labels and archive messages during triage.
-
Click Update, then Save.
Step 4: Create your OAuth client credentials (1 minute)
-
Now click Clients in the left menu
-
Click + Create client.
-
In the Application type dropdown, select Web application.
-
Update the name of your OAuth client (e.g.
Leanbox Web) so you can identify it later. -
In the Authorized redirect URIs section, click + Add URI and enter:
https://www.leanbox.app/api/google/callback -
Click Create.
-
Click the OAuth 2.0 client you just created, then copy the Client ID and Client secret values and store them somewhere safe — you'll paste them into Leanbox in the next step.
Step 5: Connect Gmail in Leanbox (30 seconds)
- Open Leanbox and go to Settings.
- On the Gmail integration card, click Connect Gmail.
- Paste your Client ID and Client secret from the previous step into the dialog.
- Click Save & Connect — you'll be redirected to Google.
- Sign in with the Gmail account you want to triage, then approve all requested permissions.
- You'll land back in Leanbox with the Gmail card showing a Connected status.
Heads up
You must approve all requested scopes — denying any will leave the connection in a broken state and Leanbox won't be able to read your inbox.