ModulesEmail

GmailConnect Gmail and Google Workspace with an app password

How to connect a Gmail or Google Workspace mailbox to OpenSequence: turn on 2-Step Verification, create an app password, then save smtp.gmail.com and imap.gmail.com.

Edit on GitHub

This page connects a Google mailbox as a sender's email channel. It takes about two minutes per rep.

What it gives you

The rep's emails leave from their own Gmail or Workspace address, and replies come back over IMAP. See Email for limits and send windows.

What you need

  • 2-Step Verification on the Google account.
  • An app password: a 16-character password Google generates for one app.
  • An OpenSequence admin key and the sender id.

Steps

Turn on 2-Step Verification

Open myaccount.google.com/security and turn on 2-Step Verification. App passwords need it.

Create an app password

Open myaccount.google.com/apppasswords, name it "OpenSequence" and copy the 16 characters. Use it as both the SMTP and the IMAP password.

Save the mailbox

HostPortsecure
SMTPsmtp.gmail.com465true
IMAPimap.gmail.com993true

The user is the full address in both.

curl
curl -X PUT $SEQ/v1/senders/u_42/channels/email -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" -d '{
  "provider": "smtp",
  "smtp": { "host": "smtp.gmail.com", "port": 465, "secure": true, "user": "max@acme.com", "password": "abcdefghijklmnop" },
  "imap": { "host": "imap.gmail.com", "port": 993, "secure": true, "user": "max@acme.com", "password": "abcdefghijklmnop" }
}'

Check it works

GET /v1/senders/u_42/readiness returns "email": { "ok": true }. Send yourself a test sequence and reply: the enrollment exits with replied within about a minute.

Daily caps

Google limits one mailbox to about 2,000 emails a day on Google Workspace and about 500 on a free Gmail account. Keep daily_limit far below that. The default is 30.

Common errors

ErrorFix
The app passwords page says the setting is not available2-Step Verification is off, or a Workspace admin blocked app passwords. Ask the admin to allow them for this user.
422 SMTP_AUTH_FAILED or IMAP_AUTH_FAILEDYou used the normal Google password, or the app password was revoked. Create a new app password.
422 IMAP_AUTH_FAILED onlyIMAP is turned off for the Workspace domain. An admin can turn it on in the Google Admin console.
Steps skip with sender_channel_credentials_neededThe rep changed their Google password, which revokes app passwords. Create a new one and save the mailbox again.

On this page