Skip to main content
The setup CLI walks you through all of this interactively. These guides are for manual configuration or reference.

Google OAuth Setup

Quick Setup with CLI: If you have the gcloud CLI installed, run inbox-zero setup-google to automate API enabling and Pub/Sub setup. It will guide you through the OAuth steps that require manual console access.
Go to Google Cloud Console and create a new project if necessary.
  1. Configure consent screen:
    1. Go to Credentials. If the banner shows up, click it and then click Get Started.
    2. Choose a name for your app and enter your email.
    3. In Audience, choose External.
    4. Enter your contact information.
    5. Agree to the User Data policy and click Create.
  2. Create OAuth credentials:
    1. Click +Create Credentials > OAuth Client ID.
    2. Application Type: Web application.
    3. Authorized JavaScript origins: http://localhost:3000 (replace with your domain in production)
    4. Authorized redirect URIs (replace localhost:3000 with your domain in production):
      • http://localhost:3000/api/auth/callback/google
      • http://localhost:3000/api/google/linking/callback
      • http://localhost:3000/api/google/calendar/callback (optional, for calendar)
      • http://localhost:3000/api/google/drive/callback (optional, for Drive)
    5. Click Create and copy the Client ID and secret.
  3. Update .env file:
    • Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET.
  4. Update scopes:
    1. Go to Data Access in the sidebar.
    2. Click Add or remove scopes.
    3. Manually add these scopes:
      https://www.googleapis.com/auth/userinfo.profile
      https://www.googleapis.com/auth/userinfo.email
      https://www.googleapis.com/auth/gmail.modify
      https://www.googleapis.com/auth/gmail.settings.basic
      https://www.googleapis.com/auth/contacts
      https://www.googleapis.com/auth/calendar
      https://www.googleapis.com/auth/drive.file
      
    4. Click Update, then Save.
  5. Add yourself as a test user:
    1. Go to Audience.
    2. In Test users, click +Add users and enter your email.
  6. Enable required APIs:

Google PubSub Setup

Automated Setup: If you ran inbox-zero setup-google, the Pub/Sub topic and subscription were created automatically. Skip to the “For local development” section below.
PubSub enables real-time email notifications. Follow the official guide:
  1. Create a topic
  2. Create a subscription
  3. Grant publish rights on your topic
Set GOOGLE_PUBSUB_TOPIC_NAME in your .env file. When creating the subscription, select Push and set the URL to: https://yourdomain.com/api/google/webhook?token=TOKEN Set GOOGLE_PUBSUB_VERIFICATION_TOKEN in your .env file to the value of TOKEN. For local development, use ngrok to expose your local server:
ngrok http 3000
Then update the webhook endpoint in the Google PubSub subscriptions dashboard.

Microsoft OAuth Setup

Go to Microsoft Azure Portal and create a new app registration:
  1. Navigate to Azure Active Directory > “App registrations” > “New registration”.
  2. Choose a name and select a supported account type:
    • Multitenant (default): allows any Microsoft account
    • Single tenant: restricts to your organization
  3. Set the Redirect URI:
    • Platform: Web
    • URL: http://localhost:3000/api/auth/callback/microsoft (replace with your domain in production)
  4. Click “Register”.
  5. In “Authentication”, add additional redirect URIs (replace localhost:3000 with your domain in production):
    • http://localhost:3000/api/outlook/linking/callback
    • http://localhost:3000/api/outlook/calendar/callback (optional)
    • http://localhost:3000/api/outlook/drive/callback (optional)
  6. Get credentials from the Overview tab:
    • Copy “Application (client) ID” → MICROSOFT_CLIENT_ID
    • For single tenant, copy “Directory (tenant) ID” → MICROSOFT_TENANT_ID
    • Go to “Certificates & secrets” > “New client secret” > copy the ValueMICROSOFT_CLIENT_SECRET
  7. Configure API permissions:
    • Go to “API permissions” > “Add a permission” > “Microsoft Graph” > “Delegated permissions”
    • Add: openid, profile, email, User.Read, offline_access, Mail.ReadWrite, Mail.Send, MailboxSettings.ReadWrite, Calendars.Read, Calendars.ReadWrite, Files.ReadWrite
    • Click “Grant admin consent” if you’re an admin.

LLM Setup

In your .env file, uncomment one of the LLM provider blocks and add your API key: Users can also change the model in the app on the Settings page.
API keys require billing credits on the provider’s platform. A ChatGPT Plus or Claude Pro subscription does not include API access.