Gmail Integration Setup
Complete guide to connecting Gmail/Google Workspace to your app
Free Tier
Send up to 2,000 emails/day for free
High Deliverability
Gmail's reputation ensures inbox delivery
Easy Setup
Use existing Gmail/Workspace account
- 1
Go to Google Cloud Console
https://console.cloud.google.com - 2
Create a New Project
Click "Select a project" → "New Project"
Name it:
Neuron Healthcare Email - 3
Select Your New Project
Make sure it's active in the top dropdown
- 1
Navigate to APIs & Services
In left sidebar: "APIs & Services" → "Library"
- 2
Search for Gmail API
Type "Gmail API" in search box
- 3
Enable the API
Click "Enable" button
- 1
Go to Credentials
"APIs & Services" → "Credentials"
- 2
Configure OAuth Consent Screen
Click "Configure Consent Screen"
- • Choose "External" (or "Internal" for Workspace)
- • App name:
Neuron Healthcare - • User support email: Your email
- • Developer contact: Your email
- • Click "Save and Continue"
- 3
Add Scopes
Click "Add or Remove Scopes"
https://www.googleapis.com/auth/gmail.send
- 4
Create OAuth Client ID
Click "Create Credentials" → "OAuth client ID"
- • Application type: Web application
- • Name:
Neuron Healthcare Email Client - • Authorized redirect URIs:
https://developers.google.com/oauthplayground
- 5
Save Your Credentials
⚠️ IMPORTANT: Copy these now!
• Client ID
• Client Secret
- 1
Go to OAuth Playground
https://developers.google.com/oauthplayground - 2
Configure OAuth Playground
Click the ⚙️ gear icon (top right)
- • Check "Use your own OAuth credentials"
- • Paste your Client ID
- • Paste your Client Secret
- • Click "Close"
- 3
Select Gmail API Scope
In left panel, find "Gmail API v1"
https://www.googleapis.com/auth/gmail.send
Click the checkbox, then "Authorize APIs"
- 4
Sign In & Authorize
Sign in with the Gmail account you want to send emails from
Grant all requested permissions
- 5
Exchange Authorization Code
Click "Exchange authorization code for tokens"
- 6
Copy Refresh Token
✅ Success!
Copy the Refresh token value
It should start with "1//" or "1/0x..."
- 1
Go to Admin Integrations
Dashboard → Admin Integrations → Email tab
- 2
Enable Email & Select Gmail
Toggle "Enable Email Service" ON
Select "Gmail / Google Workspace" as provider
- 3
Paste Your Credentials
- Gmail Client ID: Your OAuth Client ID
- Gmail Client Secret: Your OAuth Client Secret
- Gmail Refresh Token: The refresh token from OAuth Playground
- From Email: The Gmail address you authorized
- 4
Save & Test
Click "Save Gmail Configuration"
Click "Send Test Email" to verify it works
Error: "Access blocked: Authorization Error"
→ Make sure you completed the OAuth Consent Screen configuration
→ Add your email to "Test users" in OAuth consent screen
Error: "Invalid grant"
→ Your refresh token expired or is invalid
→ Go back to OAuth Playground and generate a new one
Error: "Redirect URI mismatch"
→ Make sure you added the OAuth Playground URL to authorized redirect URIs
Emails not sending
→ Check Gmail's "Sent" folder for the sending account
→ Verify the scope includes gmail.send
→ Check browser console for error messages
Gmail Sending Limits:
- • Regular Gmail: 500 emails/day
- • Google Workspace: 2,000 emails/day
- • For higher volume, consider SendGrid or AWS SES