Gmail

Connect Gmail to send email from your own address and turn your inbox into leads, tickets, summaries, and replies in your BJCRUM app.

The Gmail connector lets applications you build with BJCRUM send email from your own Gmail address and, if you allow it, work with the email you receive.

You can use Gmail for:

Connect Gmail. Choose how much access your app gets. BJCRUM builds the email workflow.

Gmail vs Resend

Gmail and Resend both send email, but they do different jobs.

You want to Use
Send welcome emails, receipts, and password resets from your own domain Resend
Send newsletters or large volumes of email Resend
Send notifications from your own Gmail address Gmail
Read, search, or sort the emails you receive Gmail
Reply to customers in the same email thread Gmail

You can connect both.

When both are connected, your app's own email (welcome emails, receipts, form notifications) goes through Resend. Gmail is used for your inbox and for any email you specifically ask to send from your Gmail address.

Choose how much access your app gets

When you connect Gmail, you choose one of three access levels:

Access What your app can do
Send only Send email from your address. It can't read your inbox.
Read and send Also read and search your mail, download attachments, and reply in the same thread.
Manage inbox Also label, archive, mark as read, move to trash, and create drafts. It never deletes email permanently.

Start with the lowest level your features need.

If you later ask for a feature that needs more access, BJCRUM asks whether to build it anyway. The app then shows you a notice to reconnect with more access instead of failing.

Before You Start

You'll need:

Gmail access goes through your own Google Cloud OAuth client. That keeps the connection between you and Google: your mailbox is connected to your app alone, and there's nothing to wait for while Google reviews an app.

Set Up Your Google Client

Open your BJCRUM project, go to Connectors, and select Gmail. Keep that page open: it shows two values you'll paste into Google Cloud, the Authorized redirect URI and the Authorized domain, each with a Copy button.

Then, in a second tab:

  1. Choose a Google Cloud project

    Open console.cloud.google.com and pick an existing project, or create a new one for this app.

  2. Enable the Gmail API

    Go to APIs & Services, then Library. Search for "Gmail API" and click Enable.

  3. Fill in the branding

    Open Google Auth Platform, then Branding. Enter any app name, use your own email address as the support and developer contact, and add the Authorized domain shown on the Gmail connector page.

  4. Publish the app

    Open Audience, choose External, and click "Publish app" so the status reads "In production". On Google Workspace, where only people in your organization will connect, you can choose Internal instead.

  5. Create a web client

    Open Clients, click "Create client", and choose "Web application". Under Authorized redirect URIs, add the Authorized redirect URI shown on the Gmail connector page, exactly as shown. No JavaScript origin is needed.

  6. Copy the client ID and secret

    Google shows a Client ID and a Client secret. Keep this tab open for the next step.

Connect Gmail to BJCRUM

Back on the Gmail connector page:

  1. Paste the Client ID and Client secret, then click Save client.
  2. Choose an access level: Send only, Read and send, or Manage inbox.
  3. Click Connect with Google and sign in with the account your app should use.
  4. Google says it hasn't verified this app. That's expected, because it's your own app. Click Advanced, then go to your app.
  5. Tick every Gmail box on the permissions screen, then continue.

The Google window closes and the page shows which address is connected and with which access level.

Until you finish signing in with Google, the connector list shows Gmail as Finish connecting.

Once connected, use Re-check to confirm the connection and Send a test email to myself to send a real email from your address to that same address.

Your First Gmail Workflow

Suppose your website has a contact form, and you want each enquiry in your own inbox.

Tell BJCRUM:

Email me from my Gmail when someone submits the contact form. Include their name, email address, and message, and set the reply address to theirs so I can answer directly.

The workflow might look like:

Visitor submits form
        ↓
Save enquiry
        ↓
Send through Gmail
        ↓
Email arrives in your inbox
        ↓
Reply goes to the visitor

This only needs Send only access.

By default, notifications go to the Gmail address you connected. To send them somewhere else, set the Notify address on the Gmail connector page.

Turn Incoming Emails into Records

With Read and send access, your app can look at new email and turn the right messages into records.

For example:

Turn new emails in my inbox that ask for a quote into leads. Save the sender's name, email address, and message.

Conceptually:

New email arrives
        ↓
App checks for new mail
        ↓
Matches your rule
        ↓
Lead saved
        ↓
Shown in your CRM

Each email is handled once, even if the app checks again.

In the preview, your app gives you a Sync now button. Once published, it checks for new mail every couple of minutes on its own.

Save Attachments

Invoices, receipts, and documents often arrive as attachments.

For example:

Save PDF invoice attachments from emails in my inbox, and list them on an Invoices page with the sender and the date.

Attachments are only available to you, the mailbox owner, after you sign in to the app. They download as files rather than opening in the browser.

AI Summaries, Labels, and Draft Replies

Gmail works well with an AI connector such as OpenAI, Anthropic, Google Gemini, or xAI.

For example:

Summarize and label my unread emails every morning, and send me a short digest.

Or:

Draft replies to support emails for me to review. I'll edit and send each one myself.

BJCRUM builds these features with firm limits:

Alerts by Text Message

Some emails can't wait.

With Twilio also connected, you could ask:

When an email from one of our customers arrives with "urgent" in the subject, send me a text message with the sender and subject.

The alert carries the sender and subject only, never the body of the email.

A Private Inbox Page

You can also give yourself an inbox inside your app.

For example:

Add an Inbox page that only I can see. Show my latest emails with search, and let me reply in the same thread.

Mailbox content is only ever shown to you. Your app checks that you're signed in as the mailbox owner before showing any email. An app without sign-in never shows email at all; it only processes it on the server.

Emails are shown with remote images blocked, so opening a message doesn't tell the sender you've read it.

Outreach and Follow-Ups

Gmail can send small, personal outreach from your own address, with strict limits:

Detecting replies needs Read and send access.

You review and start every campaign yourself. Nothing written by AI is sent without that review.

Privacy and Security

The Gmail connector is designed so that your mailbox stays yours:

You can also review and remove access at any time from the third-party connections page in your Google Account.

Change Access, Reconnect, or Disconnect

On the Gmail connector page:

To lower the access level, Disconnect first, then connect again with the lower level. Google keeps every permission you granted until the connection is removed.

Common Problems

Google shows "redirect_uri_mismatch"

The redirect URI in your Google client doesn't match. Copy the Authorized redirect URI from the Gmail connector page again and paste it under Authorized redirect URIs in your client, exactly as shown. Make sure the client type is Web application.

Google says the OAuth client was not found

The Client ID is wrong or belongs to a deleted client. Copy it again from Google Cloud, then use Update client.

Google shows "Access blocked"

Your app's Audience isn't set up for your account. Publish the app so it reads "In production", or add your account as a test user under Audience.

Gmail disconnects after a few days

The app is most likely still in Testing, where Google ends connections after 7 days. Publish it, then connect again.

A connection also ends when you change your Google password, when you remove the app's access in your Google Account, or after six months without use.

The app asks you to reconnect with more access

The feature needs a higher access level than the one you chose, or a box was left unticked on Google's permissions screen. Use Change access, choose the level the feature needs, and tick every Gmail box.

New emails aren't picked up

Check that the access level is Read and send or Manage inbox. In the preview, click Sync now. The automatic check for new mail only runs in the published app.

Emails stopped sending for the day

Your app may have reached its daily sending limit. It resumes the next day. For larger volumes, use Resend.

Debugging Gmail

A good Debug Mode request might look like:

Expected: When someone submits the contact form, I should receive an email from my Gmail.

Actual: The enquiry is saved in the app, but no email arrives.

Gmail shows as connected with Send only access.

Error: [PASTE ERROR IF AVAILABLE]

Debug the Gmail part of the workflow without changing how enquiries are saved.

Never paste your Client secret into a prompt.

Test Your Gmail Workflow

Before publishing, test:

A Good Gmail Prompt

A strong request defines:

For example:

Turn new emails in my inbox that ask for a quote into leads. Save the sender's name, email address, company, and message. Show the leads on a page only I can see, and let me reply to each one from my Gmail in the same thread. Draft a reply for me with AI, but never send it until I've edited it and clicked Send.

That's significantly stronger than:

Add Gmail.

Next: Twilio

Email isn't always the best way to reach people.

Next, we'll look at Twilio, which lets applications you build with BJCRUM send SMS messages.