Leanbox

Connect Gmail

Step-by-step guide to connecting your Gmail account to Leanbox.

Step 1: Create a Google Cloud Platform project (1 minute)

  1. Log in to the Google Cloud Platform Console using your Google credentials.
  2. 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.
  3. Enter a project name (e.g. Leanbox Integration) and select a location.
  4. Click Create and wait for the project to be created.
  5. 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)

  1. Open the left navigation menu and go to APIs & Services > Library.
  2. Search for Gmail API.
  3. 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.

  1. In the search bar at the top of the page, type Google Auth Platform and select it from the results.

  2. Click Get Started.

  3. Under App information, enter Leanbox as the app name and provide your Gmail address. Click Next.

  4. Under Audience, select External and click Next.

  5. Under Contact information, enter your Gmail address and click Next.

  6. Under Finish, agree to the Google User Data Policy, then click Continue > Create.

  7. After the app is created, click Audience in the left menu.

  8. Scroll to Test users and click Add users (or + Add users).

  9. 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.

  10. Click Branding in the left menu, then scroll to the Authorized domains section and click + Add domain.

  11. Enter leanbox.app as the authorized domain and click Save.

  12. 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.
  13. Click Update, then Save.

Step 4: Create your OAuth client credentials (1 minute)

  1. Now click Clients in the left menu

  2. Click + Create client.

  3. In the Application type dropdown, select Web application.

  4. Update the name of your OAuth client (e.g. Leanbox Web) so you can identify it later.

  5. In the Authorized redirect URIs section, click + Add URI and enter:

    https://www.leanbox.app/api/google/callback
  6. Click Create.

  7. 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)

  1. Open Leanbox and go to Settings.
  2. On the Gmail integration card, click Connect Gmail.
  3. Paste your Client ID and Client secret from the previous step into the dialog.
  4. Click Save & Connect — you'll be redirected to Google.
  5. Sign in with the Gmail account you want to triage, then approve all requested permissions.
  6. 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.

On this page