Gmail

{/* Generated by scripts/generate-integration-catalog.mjs. Do not edit by hand. */}

At a glance

  • Availability: Enabled by default.
  • Authentication: OAuth 2.0.
  • Connection: A user authorizes the connection in the provider's consent screen.
  • Scopes: https://www.googleapis.com/auth/gmail.modify.

Credentials

Set these per environment. See Connect an integration.

These variables are required only when you supply your own OAuth app. If a managed app is available, you can connect without setting them. Provider permissions and consent still apply.

VariableRequiredDescription
GOOGLE_CLIENT_IDYesGoogle OAuth Client ID Docs.
GOOGLE_CLIENT_SECRETYesGoogle OAuth Client Secret Docs.

Setup

  1. Choose who owns the Google OAuth app: On hosted Veryfront, Gmail uses the Veryfront-managed Google OAuth app: connect Gmail from the project's integrations and approve the Google consent screen, no environment variables needed. Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET only to use your own Google OAuth app, which is required for local and self-hosted runs.
  2. Enable the Gmail API: In the Google Cloud project that owns your OAuth app, enable the Gmail API.
  3. Configure the OAuth consent screen: Configure the consent screen and add the scopes this connector requests. While the app's publishing status is Testing, only the test users you list can authorize it, and Google expires their refresh tokens after 7 days, so they must reconnect weekly. Publishing an app that requests Gmail's restricted scopes to external users requires Google's OAuth app verification.
  4. Create an OAuth client: Create an OAuth client ID of type Web application. Add the redirect URI of the environment that completes the flow: https://api.veryfront.com/oauth/callback/gmail for hosted Veryfront, or your app origin followed by /api/auth/gmail/callback for a local or self-hosted app. Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET from the client.
  5. Verify access: Run List Emails (read-only). It returns message summaries for the connected mailbox without changing it.

Provider notes

  • The connection requests gmail.modify for reading, drafts, sending, labels, and reversible Trash. Permanent message and thread deletion is not exposed.
  • Every list, get and search tool is read-only. Tools that send, draft, label, archive, trash or delete mail are marked as writes and need write authority.
  • Each Gmail connection belongs to the Google account that approved consent; the tools act on that mailbox only.

Provider API reference.

Tools

ToolAccessDescription
List Emails<br /><code className="reference-identifier">gmail__list_emails</code>ReadList emails
Send Email<br /><code className="reference-identifier">gmail__send_email</code>WriteSend email
Get Email<br /><code className="reference-identifier">gmail__get_email</code>ReadGet email
Search Emails<br /><code className="reference-identifier">gmail__search_emails</code>ReadSearch emails
Mark Email Read<br /><code className="reference-identifier">gmail__mark_email_read</code>WriteMark email read
Archive Email<br /><code className="reference-identifier">gmail__archive_email</code>WriteArchive email
List Labels<br /><code className="reference-identifier">gmail__list_labels</code>ReadList labels
Get Label<br /><code className="reference-identifier">gmail__get_label</code>ReadGet label
Create Label<br /><code className="reference-identifier">gmail__create_label</code>WriteCreate label
Update Label<br /><code className="reference-identifier">gmail__update_label</code>WriteUpdate label
Delete Label<br /><code className="reference-identifier">gmail__delete_label</code>WriteDelete label
Apply Labels<br /><code className="reference-identifier">gmail__apply_labels</code>WriteApply labels
Modify Email Labels<br /><code className="reference-identifier">gmail__modify_email_labels</code>WriteModify email labels
Trash Email<br /><code className="reference-identifier">gmail__trash_email</code>WriteTrash email
Untrash Email<br /><code className="reference-identifier">gmail__untrash_email</code>WriteUntrash email
Batch Modify Emails<br /><code className="reference-identifier">gmail__batch_modify_emails</code>WriteBatch modify emails
List Threads<br /><code className="reference-identifier">gmail__list_threads</code>ReadList threads
Get Thread<br /><code className="reference-identifier">gmail__get_thread</code>ReadGet thread
Modify Thread Labels<br /><code className="reference-identifier">gmail__modify_thread_labels</code>WriteModify thread labels
Trash Thread<br /><code className="reference-identifier">gmail__trash_thread</code>WriteTrash thread
Untrash Thread<br /><code className="reference-identifier">gmail__untrash_thread</code>WriteUntrash thread
Create Draft<br /><code className="reference-identifier">gmail__create_draft</code>WriteCreate draft
List Drafts<br /><code className="reference-identifier">gmail__list_drafts</code>ReadList drafts
Get Draft<br /><code className="reference-identifier">gmail__get_draft</code>ReadGet draft
Update Draft<br /><code className="reference-identifier">gmail__update_draft</code>WriteReplace draft
Send Draft<br /><code className="reference-identifier">gmail__send_draft</code>WriteSend draft
Delete Draft<br /><code className="reference-identifier">gmail__delete_draft</code>WritePermanently delete draft
Get Attachment<br /><code className="reference-identifier">gmail__get_attachment</code>ReadGet attachment
Get Profile<br /><code className="reference-identifier">gmail__get_profile</code>ReadGet profile
List History<br /><code className="reference-identifier">gmail__list_history</code>ReadList history

Verify the connection

Call a read tool such as gmail__list_emails with arguments for your account. Confirm that the result comes from the intended account or workspace before enabling write tools.