Gmail
What Is the Gmail API?
Published 2026-09-20 · CSV Sender
The Gmail API is Google’s HTTPS JSON interface for mailbox operations. CSV Sender uses only users.messages.send with OAuth—not SMTP or inbox reads.
Quick answer
The Gmail API is Google’s REST interface to Gmail mailboxes. Apps authenticate with OAuth 2.0, request specific scopes, then call methods like users.messages.send. CSV Sender is a prepared-row queue: each CSV line becomes a MIME message delivered through that single send method—no template merge engine, no inbox polling.
How CSV Sender fits the API model
Traditional mail merge add-ons often combine Gmail API or Apps Script with Docs templates. CSV Sender instead uploads finished email, subject, and body columns (send prepared emails). Scheduling, suppression, and idempotent workers sit above the API (idempotent email sending).
Core concepts
- Users —
userIdis typicallymefor the authorized mailbox. - Messages — Metadata + raw MIME payload (base64url encoded on send).
- Scopes — Permissions such as
gmail.senddocumented in Google’s scope list (frontmatter sources). - Quotas — Per-project and per-user rate limits distinct from Gmail deliverability caps (Gmail API rate limits vs Gmail sending limits for CSV).
What CSV Sender does not use
users.messages.list/get(read inbox)users.labelsmodifications- SMTP
AUTH LOGINwith app passwords (Gmail API vs SMTP)
That scope minimization is central to /security.
End-to-end flow
- Operator connects Gmail (OAuth consent).
- CSV validates and inserts SCHEDULED rows.
- Cron claims due rows (SENDING).
- Worker builds MIME (gmail API send email) and calls API.
- Row becomes SENT with provider id.
Choosing API vs other Gmail tools
| Need | Gmail API via CSV Sender | SMTP relay | Mail merge add-on |
|---|---|---|---|
| Prepared per-row copy | Native | Manual MIME | Templates |
| Multi-day pacing | Yes | DIY | Varies |
| Send-only scope | Yes | Credentials | Varies |
FAQ
Is Gmail API free?
Google documents quota tiers—see official quota docs linked from Gmail API rate limits.
Does API send bypass Gmail limits?
No—mailbox sending limits still apply.
Can I attach files?
CSV Sender v1 focuses on plain prepared bodies—attachments would require product changes.
Where is OAuth covered?
Gmail OAuth scopes hub article.
Does API replace Gmail UI?
Recipients still receive normal Gmail mail; you compose in CSV.
Related reading
Historical context (brief)
Before OAuth-mandatory flows, many integrations used SMTP with stored passwords. Google’s push toward API + OAuth improves revocation and scope granularity. CSV Sender targets greenfield OAuth setups documented in Google Cloud Console.
JSON resources vs MIME payloads
Gmail API responses describe messages as metadata plus optional raw fields. CSV Sender generates raw locally rather than drafting in Gmail UI—keeping source of truth in CSV cells (email body in CSV).
Ecosystem positioning
CRMs, ticketing systems, and mail merge extensions also call Gmail API methods. CSV Sender’s niche is high-volume prepared rows with explicit queue semantics—not conversational inbox automation.
Enablement checklist for new developers
- Enable Gmail API in Google Cloud project.
- Configure OAuth consent screen and scopes matching Gmail OAuth scopes.
- Register redirect URI for
/api/gmail/callback. - Understand quota defaults before load testing (Gmail API rate limits).
When not to choose Gmail API
If IT mandates centralized SMTP relay with DLP scanning, API-direct sends from user mailboxes may be inappropriate—evaluate organizational policy before connecting production lists.
Reading list for engineers
After this hub, continue with Gmail API send email, Gmail OAuth scopes, how MIME email works, Gmail OAuth reauthorization, and Gmail API rate limits before load-testing a production mailbox.
Consider Google’s API discovery documents for schema exploration—useful when debugging optional MIME headers not yet exposed in CSV Sender’s UI.
Production checklist (1)
Before changing live campaigns, re-verify Gmail sender CONNECTED, scan import issues, confirm suppression imports, and align dailyLimit with Gmail sending limits for CSV guidance. Prepared rows in email, subject, and body columns should pass validate CSV before emailing so queue workers spend quota on intentional mail only.
Production checklist (2)
Before changing live campaigns, re-verify Gmail sender CONNECTED, scan import issues, confirm suppression imports, and align dailyLimit with Gmail sending limits for CSV guidance. Prepared rows in email, subject, and body columns should pass validate CSV before emailing so queue workers spend quota on intentional mail only.
Sources
Related articles
Gmail
How Does the Gmail API Send an Email?
Send mail with users.messages.send by building RFC 5322 MIME, base64url-encoding raw, and posting through OAuth—exactly how CSV Sender delivers each CSV row.
Gmail
Gmail OAuth for Sending Email: Scopes, Security, and CSV Workflows
Understand Google OAuth for Gmail send-only access, why CSV Sender requests gmail.send, and how tokens stay encrypted at rest.
Gmail
Gmail API vs SMTP for Sending Email
Compare Gmail API OAuth sending with SMTP relay for CSV-based outreach—credentials, scopes, MIME, and why CSV Sender standardizes on messages.send.
Gmail
Send Emails From CSV in Gmail
Connect Gmail to a prepared three-column CSV and send one message per row with OAuth and paced queues.