Gmail Setup Guide
Connect your Gmail account to FormBlade via SMTP (App Password) or OAuth for one-click authorization.
This guide covers two ways to connect Gmail:
- Gmail SMTP — uses an App Password. Simpler setup, works immediately.
- Gmail OAuth — one-click authorization through Google. More secure (no stored passwords), but requires a Google Cloud project.
Gmail SMTP Setup
SMTP settings
| Setting | Value |
|---|---|
| SMTP Host | smtp.gmail.com |
| Port | 587 |
| Encryption | STARTTLS |
| Username | Your full Gmail address (e.g., you@gmail.com) |
| Password | 16-character App Password (see below) |
Step 1: Enable 2-Step Verification
App Passwords require 2-Step Verification (2FA) to be enabled on your Google account. If you already have 2FA on, skip to Step 2.
- Go to myaccount.google.com/security
- Under "How you sign in to Google", click 2-Step Verification
- Follow the prompts to set up 2FA using your phone, authenticator app, or security key
- Complete the verification process
Step 2: Generate an App Password
- Go to myaccount.google.com/apppasswords
- If you do not see this page, 2-Step Verification is not enabled — go back to Step 1
- In the "App name" field, type FormBlade
- Click Create
- Google will display a 16-character password (formatted as
xxxx xxxx xxxx xxxx) - Copy this password. You can paste it with or without spaces — both formats work
Step 3: Configure FormBlade
- Log in to your FormBlade dashboard
- Open your form and go to the Settings tab
- Under Email Provider, select Gmail (SMTP will be pre-selected)
- The host (
smtp.gmail.com), port (587), and encryption (STARTTLS) are pre-filled - Enter your Gmail address as the Username
- Paste the 16-character App Password as the Password
- Set your From Email to your Gmail address
- Click Save
Step 4: Send a test email
- Click Send Test Email
- Check your inbox for the test notification
- The email should come from your Gmail address
Gmail SMTP limits
| Limit | Value |
|---|---|
| Emails per day (SMTP) | Varies (unpublished) |
| Recipients per message | 100 |
| Message size | 25 MB (including attachments) |
Gmail OAuth Setup
OAuth lets you connect your Gmail account with a single click, without storing any passwords. However, the initial setup requires creating a project in Google Cloud Console.
Overview
The OAuth flow works like this:
- You create a Google Cloud project and enable the Gmail API
- You configure an OAuth consent screen and create credentials
- In FormBlade, you click "Connect Gmail" and authorize access through Google's login screen
- FormBlade stores a refresh token and uses it to send emails on your behalf
Step 1: Create a Google Cloud project
- Go to console.cloud.google.com/projectcreate
- Enter a project name (e.g., "FormBlade Email")
- Click Create
- Wait for the project to be created, then make sure it is selected in the project dropdown at the top
Step 2: Enable the Gmail API
- Go to APIs & Services → Library
- Search for Gmail API
- Click on it and click Enable
Step 3: Configure the OAuth consent screen
- Go to APIs & Services → OAuth consent screen
- Select External as the user type (unless you have a Google Workspace organization and only want internal users)
- Click Create
- Fill in the required fields:
- App name: FormBlade (or any name)
- User support email: your email address
- Developer contact email: your email address
- Click Save and Continue
- On the Scopes page, click Add or Remove Scopes
- Search for
gmail.sendand check the box next tohttps://www.googleapis.com/auth/gmail.send - Click Update, then Save and Continue
- On the Test Users page, add your Gmail address as a test user
- Click Save and Continue
Step 4: Create OAuth credentials
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Select Web application as the application type
- Name it "FormBlade"
- Under Authorized redirect URIs, add the callback URL shown in your FormBlade dashboard's Email Provider settings (typically
https://formblade.com/api/auth/gmail/callback) - Click Create
- Copy the Client ID and Client Secret
Step 5: Connect in FormBlade
- In your form's Settings tab, select Gmail (OAuth) as the email provider
- Enter the Client ID and Client Secret from Step 4
- Click Connect Gmail
- A Google login window will open — sign in with the Gmail account you want to send from
- Grant FormBlade permission to send emails on your behalf
- You will be redirected back to FormBlade with the connection confirmed
Publishing for production use
If you want to remove the 7-day token expiration and the 100-user limit, you need to publish your OAuth app and get it verified by Google.
gmail.send is classified as a "sensitive" scope, Google requires:
- A detailed description of how you use the Gmail API
- A video demo showing the OAuth flow and email functionality
- A privacy policy URL
- Review by Google's trust and safety team (typically 2–6 weeks)
For personal use, testing mode is often sufficient — just re-authorize every 7 days. For a production application serving multiple users, the SMTP App Password method is simpler and does not require Google verification.
Troubleshooting
SMTP: "Username and Password not accepted" error
- You must use an App Password, not your regular Gmail password
- Make sure 2-Step Verification is enabled on your Google account
- If you recently changed your Google account password, all existing App Passwords were invalidated — generate a new one
- Check that the username is your full Gmail address (including
@gmail.com)
SMTP: "Too many login attempts" error
- Google temporarily blocks SMTP access after multiple failed login attempts
- Wait 15–30 minutes, then try again with the correct App Password
- Go to myaccount.google.com/notifications and approve any "Suspicious login" alerts
OAuth: "Access blocked: app not verified"
- Your OAuth app is in testing mode and the user trying to authorize is not listed as a test user
- Add the user's email to the test users list in Google Cloud Console → OAuth consent screen → Test users
- Alternatively, when the warning screen appears, click Advanced → Go to [app name] (unsafe) to proceed
OAuth: Token expired after 7 days
- In testing mode, Google expires refresh tokens after 7 days
- Go to your form's Settings in FormBlade and click Reconnect Gmail to re-authorize
- To fix this permanently, publish your OAuth app and go through Google verification
"App Passwords" page not showing up
- App Passwords are only available when 2-Step Verification is enabled
- Google Workspace accounts: your organization administrator may have disabled App Passwords. Contact your IT admin
- Try navigating directly to myaccount.google.com/apppasswords
Gmail sending limits summary
- Daily sending limit via SMTP is unpublished — Google may temporarily block sending if limits are exceeded (rolling 24-hour window)
- Limits are per Gmail account — using the same Gmail for multiple forms shares the same quota
- Google Workspace accounts may have higher limits (up to 2,000/day) but this depends on your admin settings
- Exceeding the limit causes a temporary block (usually 1–24 hours). FormBlade will fall back to the default mail server during this period
Common gotchas
- "Less Secure Apps" is gone — Google permanently removed this option in September 2024. You cannot use your regular Gmail password for SMTP. You must use an App Password (which requires 2FA) or OAuth.
- App Passwords require 2FA first — The App Passwords page will not appear at all unless 2-Step Verification is enabled on your Google account. Enable it at myaccount.google.com/security first.
- Password changes invalidate App Passwords — If you change your Google account password, all existing App Passwords stop working immediately. You will need to generate a new one.
- Gmail Workspace vs. personal accounts — Google Workspace (paid) accounts may have higher sending limits (up to 2,000/day) but your administrator may have disabled App Passwords or SMTP access entirely. Check with your IT admin.
- OAuth testing mode: 7-day token expiry — While your Google Cloud OAuth app is in "Testing" (not published), refresh tokens expire after 7 days. You will need to re-authorize weekly. Publishing and verifying the app removes this limitation but requires a multi-week Google review.
- Sender address must be your Gmail — Gmail SMTP requires the "From" address to match the authenticated Gmail account. You cannot send from a different email address via Gmail SMTP.
Quick reference: where to find things
| What you need | Where to find it |
|---|---|
| 2-Step Verification | myaccount.google.com/security → "How you sign in to Google" |
| App Passwords | myaccount.google.com/apppasswords (requires 2FA to be enabled) |
| Google Cloud Console | console.cloud.google.com |
| Gmail API | Google Cloud Console → APIs & Services → Library → search "Gmail API" |
| OAuth consent screen | Google Cloud Console → APIs & Services → OAuth consent screen |
| OAuth credentials | Google Cloud Console → APIs & Services → Credentials |
| Security alerts | myaccount.google.com/notifications |