melso
AutomationUse casesChangelog
Start your business
Email

Connect your AI agent to Gmail

Gmail is Google’s email service, featuring spam protection, search functions, and seamless integration with other G Suite apps for productivity

Set it up in Melso

  1. 1In Melso, open Settings → Agent Apps and hit Connect on Gmail.
  2. 2Finish the OAUTH2 sign-in in the window that opens. Melso stores the connection, not your credentials.
  3. 3Open your agent, go to its Agent Apps tab, and allow Gmail.
  4. 4Give the agent a task. It calls Gmail itself when the work needs it.
Get Melso
Gmail
gmail
61
tools
2
triggers
OAUTH2
auth
#1
rank
Email
What you get

What Gmail gives your agent

The tools, permissions, and events Gmail exposes — the same ones your agent can use once the app is authorized.

What you sign in with

Gmail connects with OAUTH2.

  • Client id
  • Client secret

Permissions

https://www.googleapis.com/auth/userinfo.profilehttps://www.googleapis.com/auth/userinfo.emailhttps://www.googleapis.com/auth/contacts.readonlyhttps://www.googleapis.com/auth/contacts.other.readonlyhttps://www.googleapis.com/auth/profile.language.readhttps://www.googleapis.com/auth/user.addresses.readhttps://www.googleapis.com/auth/user.birthday.readhttps://www.googleapis.com/auth/user.emails.readhttps://www.googleapis.com/auth/user.phonenumbers.readhttps://www.googleapis.com/auth/profile.emails.read

Tools Gmail exposes

GMAIL_ADD_LABEL_TO_EMAIL

Modify email labels

Adds and/or removes specified Gmail labels for a message; ensure `message_id` and all `label_ids` are valid (use 'listLabels' for custom label IDs).

GMAIL_BATCH_DELETE_MESSAGES

Batch delete Gmail messages

Tool to permanently delete multiple Gmail messages in bulk, bypassing Trash with no recovery possible. Use when you need to efficiently remove large numbers of emails (e.g., retention enforcement, mailbox hygiene). Use GMAIL_MOVE_TO_TRASH instead when reversibility may be needed. Always obtain explicit user confirmation and verify a sample of message IDs before executing. High-volume calls may trigger 429 rateLimitExceeded or 403 userRateLimitExceeded errors; apply exponential backoff.

GMAIL_BATCH_MODIFY_MESSAGES

Batch modify Gmail messages

Modify labels on multiple Gmail messages in one efficient API call. Supports up to 1,000 messages per request for bulk operations like archiving, marking as read/unread, or applying custom labels. High-volume calls may return 429 rateLimitExceeded or 403 userRateLimitExceeded; apply exponential backoff.

GMAIL_CREATE_EMAIL_DRAFT

Create email draft

Creates a Gmail email draft. While all fields are optional per the Gmail API, practical validation requires at least one of recipient_email, cc, or bcc and at least one of subject or body. Supports To/Cc/Bcc recipients, subject, plain/HTML body (ensure `is_html=True` for HTML), attachments, and threading. Returns a draft_id that must be used as-is with GMAIL_SEND_DRAFT — synthetic or stale IDs will fail. When creating a draft reply to an existing thread (thread_id provided), leave subject empty to stay in the same thread; setting a subject will create a NEW thread instead. HTTP 429 may occur on rapid creation/send sequences; apply exponential backoff.

GMAIL_CREATE_FILTER

Create Gmail filter

Tool to create a new Gmail filter with specified criteria and actions. Use when the user wants to automatically organize incoming messages based on sender, subject, size, or other criteria. Note: you can only create a maximum of 1,000 filters per account.

GMAIL_CREATE_LABEL

Create label

Creates a new label with a unique name in the specified user's Gmail account. Returns a labelId (e.g., 'Label_123') required for downstream tools like GMAIL_ADD_LABEL_TO_EMAIL, GMAIL_BATCH_MODIFY_MESSAGES, and GMAIL_MODIFY_THREAD_LABELS — those tools do not accept display names.

GMAIL_CREATE_PROMPT_POST

Create Prompt Post

Send a one-shot prompt to the Sanity Content Agent. Stateless one-shot prompt endpoint. No thread management or message persistence. Ideal for simple, single-turn interactions. Use when you need to send a single prompt and receive a response without maintaining conversation context.

GMAIL_DELETE_DRAFT

Delete Draft

Permanently deletes a specific Gmail draft using its ID with no recovery possible; verify the correct `draft_id` and obtain explicit user confirmation before calling. Ensure the draft exists and the user has necessary permissions for the given `user_id`.

Events your agent can react to

GMAIL_EMAIL_SENT_TRIGGER

Email Sent

Triggers when a Gmail message is sent by the authenticated user. It polls the 'SENT' label and emits metadata including sender, recipients, subject, timestamp, and thread ID.

GMAIL_NEW_GMAIL_MESSAGE

New Gmail Message Received Trigger

Triggers when a new message is received in Gmail.

Example prompts

  • Use Gmail to check recent changes and summarize them in the issue.
  • When a customer writes in, pull their data from Gmail before replying.
  • Audit our open items in Gmail and notify the channel of anything stale.

Useful links

  • Gmail website
  • Melso Agent Apps docs

More in Email

  • Gmail
  • Outlook
  • Yandex
  • Zoho Mail
  • Agent Mail
Agent clients

Use Gmail from the agent you already run

Melso runs the agent. You decide which of your authorized apps it may reach.

Codex

Run Codex as a Melso agent and let it use the apps you have authorized.

Use Gmail from Codex

Hermes

Run Hermes as a Melso agent and let it use the apps you have authorized.

Use Gmail from Hermes
Related apps

Compare nearby apps

Other Email connections your agents can use.

Outlook

Connect to Outlook

Outlook is Microsoft's email and calendaring platform integrating contacts and scheduling, enabling users to manage communications and events in a unified workspace

286 toolsOAUTH2 / S2S_OAUTH2
Yandex

Connect to Yandex

Yandex is a Russian internet services provider offering search, email, navigation, and other web-based solutions, often referred to as “Russia’s Google”

21 toolsOAUTH2
Zoho Mail

Connect to Zoho Mail

Zoho Mail is a secure and ad-free email hosting platform with collaboration tools, calendar integration, and extensive administrative controls

15 toolsOAUTH2
Agent Mail

Connect to Agent Mail

AgentMail provides AI agents with their own email inboxes, enabling them to send, receive, and act upon emails for communication with services, people, and other agents.

5 toolsAPI_KEY
BlueFox Email

Connect to BlueFox Email

BlueFox Email provides APIs for managing contacts and subscriber lists and sending transactional and triggered emails.

11 toolsAPI_KEY
Bouncer

Connect to Bouncer

Bouncer is an email verification and validation service that helps ensure email deliverability by verifying email addresses through real-time and batch processing APIs.

10 toolsAPI_KEY
melso

Run your company with AI agents.

Start your business

Product

  • Home
  • Automation
  • Melso vs Polsia
  • Use cases
  • Changelog
  • Download

Resources

    Company

    • About
    • Contact Sales

    © 2026 Melso. All rights reserved.