Try Kling Image V4 Long for Page Mockups from Kling AI →
Models
Agents
Workflows
Studio
PricingBlogDocs
ExploreDiscover models by categoryDiscoverModels and effects built by WiroBrowse All ModelsBrowse the complete catalogSee FavoritesSign in to view saved models
Generative Media AgentCreate and edit media by chattingWorkflow AgentBuild visual workflows with Agent
OverviewThe platform at a glanceLearnSkills, knowledge, guardrailsAnatomyWhat makes agents reasonBuild Your AgentPick skills, choose a plan, deploy, then connect your tools
Pre-built AgentsBrowse the catalogConnectorsConnect agents to your apps
Agent Usecases
Ad Campaign ManagerApp Event ManagerApp Review RepliesBarber BookingCustomer Win-BackEcommerce ListingsRestaurant Reviews
Sign InStart Building
  1. Home
  2. Connectors
  3. Email
  4. Gmail
Wiro × Gmail

Connect Gmail to your Wiro AI agent

Read, label and answer mail in a Gmail inbox.

Connect to an AgentVisit Gmail All Connectors
Gmail logo
Sign InWith your own Gmail app
15 actions7 read, 8 write
Chat and Scheduled TasksWhere it works
Allow, Ask or BlockYour choice for each action

On this page

  1. Overview
  2. Use cases
  3. How it works
  4. What it can do
  5. How to connect
  6. Troubleshooting
  7. For developers
  8. Questions
  9. Access
  10. Related connectors
OverviewUse casesHow it worksWhat it can doHow to connectTroubleshootingFor developersQuestionsAccessRelated connectors
Example chat
Gmail logoGmail connected Signed in

Anything in my inbox from overnight that needs a reply before my 10:00 call?

List Gmail messages gmail__list_messages
Read a Gmail thread gmail__get_thread

Three of the 14 unread messages need you, and the rest are newsletters and receipts:

  • Brindlewood Printing: the spring catalog proof is ready and they need your OK by noon
  • Marigold Events: asks to move Thursday's tasting to Friday at 2 pm
  • Theo, your accountant: wants to know which card paid the October hosting bill

In the Brindlewood Printing thread, your question about the page 4 prices never got an answer, so check that page before you OK it. Nothing was marked as read.

Type a message...

Overview

What Gmail does for your agent

Signs in to one Gmail mailbox through a Google Cloud app you create yourself, on Google's own consent screen. The agent searches mail with Gmail's search syntax, reads whole threads, marks messages read or unread, labels, stars, archives and trashes them, saves drafts and sends new mail or replies inside a thread. It cannot change settings such as filters, forwarding or vacation replies, and with the Google app still in Testing, you sign in again every 7 days.

Use cases

What your Wiro agent can do with Gmail

  1. 01

    A morning digest of what needs an answer

    Each weekday at 8:00, a Scheduled Task reads your unread inbox mail and posts a short digest in Chat: who wrote, what they want and what looks urgent, with newsletters and notifications left out. Reading a message does not mark it as read, so your inbox stays as it was.

  2. 02

    Draft replies you check before they go

    Ask the agent to answer the open questions in a thread. It reads the whole conversation, writes a reply in your voice and saves it as a Gmail draft in that thread, so you can edit it in Gmail or tell the agent to send it. By default, sending waits for your approval in Chat.

  3. 03

    Label and file mail by topic

    Tell the agent how you sort mail, for example invoices, support and partners. It creates the labels you are missing, applies them to matching messages, archives what no longer needs to sit in the inbox and stars the ones you must answer.

  4. 04

    Find an old message by describing it

    Ask for the contract Ana sent in the spring, or last month's invoices with attachments. The agent turns the request into a Gmail search, reads the matches and gives you the sender, date, subject and attachment names, with the key lines quoted.

  5. 05

    A Friday list of mail still waiting for a reply

    Every Friday, a Scheduled Task looks at the mail you sent this week and the threads it belongs to, and lists in Chat the conversations where nobody has answered yet, with a one-line reminder of what you asked.

  6. 06

    Clear out old promotions

    Ask the agent to go through old promotions or notifications from one sender. It lists what it found and, after you approve, moves those messages to the trash, where Gmail keeps them for 30 days before deleting them for good.

How it works

How Gmail works with Wiro

  1. 01

    Connect Gmail

    Deploy an agent, open its Connectors tab, choose Gmail and sign in with your Gmail account.

  2. 02

    Choose what each action may do

    Set each Gmail action to Allow, Ask or Block, in Chat and in Scheduled Tasks. By default, read-only actions run, and the rest ask first in Chat.

  3. 03

    Ask in Chat or schedule it

    Ask your agent for Gmail work in Chat, or put it on a Scheduled Task that runs on its own.

  • Where it runsInside your agent. Its requests go straight from the agent to Gmail.
  • Where its data goesgmail.googleapis.com
  • How it signs inSign in to Gmail with your own app.

What it can do

Actions your Wiro agent can take in Gmail

By default, read-only actions run, and the rest ask first in Chat and run in Scheduled Tasks. Each agent can set any action to Allow, Ask or Block.

Read-only (7)Create and send (4)Change and delete (4)

Read-only 7 actions

Looks things up in Gmail and changes nothing.

  • Get the Gmail mailbox

    Returns the connected mailbox: its address and its total numbers of messages and threads.

    Chat AllowScheduled Tasks Allow

  • List Gmail messages

    Lists messages of the mailbox, newest first, with each one's id, thread, sender, recipients, subject, date, snippet, labels and whether it is unread.

    Chat AllowScheduled Tasks Allow

  • Read a Gmail message

    Reads one message: sender, recipients, subject, date, reply headers, labels, the body as text (HTML-only mail is made readable) and, with the first part of the body, up to 20 attachments with their ids.

    Chat AllowScheduled Tasks Allow

  • Read a Gmail thread

    Reads a conversation: every message of the thread, oldest first, with sender, recipients, date, subject, labels, the body as text and the attachment names.

    Chat AllowScheduled Tasks Allow

  • List Gmail labels

    Lists the labels of the mailbox, system ones and your own.

    Chat AllowScheduled Tasks Allow

  • List Gmail drafts

    Lists the drafts of the mailbox, newest first, with each one's draft id, message id, recipients, subject and snippet.

    Chat AllowScheduled Tasks Allow

  • Read other Gmail data

    Reads what the actions above do not cover, straight from the Gmail API.

    Chat AllowScheduled Tasks Allow

Create and send 4 actions

Creates or sends something new in Gmail, such as a post, a message or an email.

  • Create a Gmail label

    Creates a label in the mailbox, shown in the label list and on messages.

    Chat AskScheduled Tasks Allow

  • Save a Gmail draft

    Saves a message as a draft in the mailbox, without sending it: to show a reply or a new mail before it goes out.

    Chat AskScheduled Tasks Allow

  • Send a Gmail draft

    Sends a saved draft as it is, from the mailbox.

    Chat AskScheduled Tasks Allow

  • Send a Gmail message

    Sends a mail from the mailbox right away, as plain text or HTML (with a plain-text copy).

    Chat AskScheduled Tasks Allow

Change and delete 4 actions

Changes or deletes what is already in Gmail.

  • Mark Gmail messages read or unread

    Marks messages as read.

    Chat AskScheduled Tasks Allow

  • Add or remove Gmail labels

    Adds labels to messages and removes others, by label id: archive by removing INBOX, star with STARRED.

    Chat AskScheduled Tasks Allow

  • Move a Gmail message to the trash

    Moves a message to the trash.

    Chat AskScheduled Tasks Allow

  • Make other Gmail changes

    Sends any other change straight to the Gmail API.

    Chat AskScheduled Tasks Allow

How to connect

Connect Gmail to Wiro

Open the agent's Connectors tab, choose Gmail and sign in with your account. The consent screen shows what the agent can reach.

What the Connect dialog asks for

FieldAbout
OAuth Client IDRequired
  1. Go to Google Cloud Console
  2. Enable the Gmail API
  3. Go to APIs & Services → Credentials
  4. Click + Create Credentials → OAuth client ID (Web application)
  5. Add the scope gmail.modify on the OAuth consent screen
  6. Add this Authorized redirect URI:

https://api.wiro.ai/v1/AgentConnector/OAuthCallback

Used only to sign in; the agent never receives it.
OAuth Client SecretRequired

Google shows the Client secret only once, in the dialog that opens when you create the client: copy it there, or click Download JSON to keep it in a file. After you close that dialog, Google never shows it again.

If you no longer have it, open your client in Google Auth Platform → Clients, click Add secret and copy the new secret the same way. When nothing uses the old secret any more, Disable it and delete it.

Used only to sign in; the agent never receives it.

Troubleshooting

Troubleshooting Gmail

What to check when Gmail stops working for your agent.

  • Your own app's sign-in fails Check your app's settings in Gmail: the redirect URL shown in the Connect dialog must be added there, and the client secret you pasted must be the app's current one. Then sign in again.
  • Access revoked in Gmail If the access is removed in Gmail, or the sign-in can no longer renew, the connection reads Reconnect needed. Open the agent's Connectors tab, choose Gmail and Reconnect.
  • Limits set by Gmail Gmail limits how much an account can do, such as how many requests it takes in a minute. An action over a limit fails until the limit resets: wait and ask again, or check your Gmail plan.

For developers

Connect Gmail from your own product

Every call is a POST to the Wiro API with your project's API key. On a sign-in, your customers see your own app's name.

  1. 01

    Read the connector

    Detail answers without a session: what the connector needs and the tools it gives an agent.

    POST /AgentConnector/Detail
    {
      "slug": "gmail"
    }
    Response
    {
      "result": true,
      "errors": [],
      "agentconnectors": [
        {
          "slug": "gmail",
          "title": "Gmail",
          "category": "email",
          "authtype": "provider-oauth",
          "credentialfields": [
            {
              "name": "clientid",
              "label": "OAuth Client ID",
              "required": true,
              "secret": false,
              "format": "text"
            },
            {
              "name": "clientsecret",
              "label": "OAuth Client Secret",
              "required": true,
              "secret": true,
              "format": "password"
            }
          ],
          "tools": [
            {
              "name": "get_profile",
              "readonly": true
            },
            {
              "name": "list_messages",
              "readonly": true
            }
          ]
        }
      ]
    }
  2. 02

    Start the sign-in

    Connect answers with the vendor's sign-in page. Open it in the browser of the person who owns the account.

    POST /UserAgent/ConnectorConnect
    {
      "useragentguid": "YOUR_AGENT_GUID",
      "slug": "gmail",
      "mode": "oauth",
      "values": {
        "clientid": "YOUR_CLIENTID",
        "clientsecret": "YOUR_SECRET"
      },
      "redirecturl": "https://your-app.example.com/connectors/return"
    }
    Response
    {
      "result": true,
      "errors": [],
      "status": "pending",
      "authorizeUrl": "https://vendor.example.com/oauth/authorize?client_id=...&state=..."
    }
  3. 03

    Come back to your page

    After the consent screen the browser returns to your redirect URL with the outcome in its query. Read the status next; the query is only a reason to look.

    Your redirect URL
    https://your-app.example.com/connectors/return?connector_connected=true
    https://your-app.example.com/connectors/return?connector_error=authorization_denied
  4. 04

    Read the status

    connected, pending (a sign-in not finished), reauth (sign in again) or error. Values and tokens never come back.

    POST /UserAgent/ConnectorList
    {
      "useragentguid": "YOUR_AGENT_GUID"
    }
    Response
    {
      "result": true,
      "errors": [],
      "useragentconnectors": [
        {
          "slug": "gmail",
          "title": "Gmail",
          "authtype": "provider-oauth",
          "status": "connected",
          "accounts": {},
          "savedvariables": [
            "clientid",
            "clientsecret"
          ],
          "lasterror": null
        }
      ]
    }
  5. 05

    Disconnect

    Revokes a sign-in where the vendor allows it, deletes what the connection holds and removes the connector from the running agent.

    POST /UserAgent/ConnectorDisconnect
    {
      "useragentguid": "YOUR_AGENT_GUID",
      "slug": "gmail"
    }
    Response
    {
      "result": true,
      "errors": [],
      "removed": true,
      "revoked": true,
      "restart": "scheduled"
    }
API Reference

Questions

Gmail and Wiro FAQ

What can a Gmail AI agent do with this connector?

It searches and reads your mail and whole threads, marks messages read or unread, adds and removes labels, archives and stars messages, moves them to the trash and creates labels. It saves drafts, sends drafts and sends new mail or replies inside a thread. Gmail settings such as filters, forwarding and vacation replies stay with you: the agent does not change them.

How do I connect Gmail to an AI agent?

Gmail connects through your own Google Cloud app. In Google Cloud Console, enable the Gmail API, create an OAuth client ID of type Web application, add the gmail.modify scope on the consent screen and add the redirect URI that the Connect dialog gives you. Enter its Client ID and Client Secret in the Gmail card on your agent's Connectors tab, or start the setup by asking the agent for Gmail in Chat, then sign in with the account whose inbox the agent should use.

Why does Gmail ask me to sign in again after a week?

Google ends a sign-in after 7 days when the app's consent screen uses the External user type and is still in Testing. To keep the agent signed in, publish the app to In production, or in Google Workspace use the Internal user type. When a sign-in ends, the connection shows that you need to sign in again.

Can the agent send email from my Gmail without asking?

Not from Chat unless you allow it: sending, saving drafts, labelling and trashing wait for your approval there by default, while searching and reading need none. A Scheduled Task goes ahead with them unless they are set to Ask or Block. You can, for example, let a Scheduled Task save drafts while sending stays on Ask, so you approve every message before it leaves your account.

Does the agent see my Google password or tokens?

No. You sign in on Google's own page, so the agent never sees your password. The access and refresh tokens Google returns are kept encrypted and are never shown to the AI model. Your Client ID and Client Secret serve the sign-in alone and stay out of the agent. To revoke access, remove the app in your Google Account's connected apps settings, then disconnect Gmail on the Connectors tab.

What does it cost, and which Gmail limits apply?

Your agent plan covers the connector with nothing added, and Gmail API calls are free on the standard tier that Google enables for every Cloud project. Gmail's own sending limits still apply: a personal Gmail account can send about 500 emails a day, and Google Workspace accounts follow their own limits. Google also caps how many API requests each user makes per minute.

Do I need a Gmail MCP server for this?

No. Your agent already has the Gmail actions built in and calls the Gmail API on its own, so there is no Gmail MCP server for you to run. To automate Gmail triage, set up a Scheduled Task from Chat, for example a morning digest or a Friday list of sent mail still waiting for a reply.

Access

Revoke Gmail access

Remove the app's access in your Gmail account's connected apps settings, then disconnect it here.

Related connectors

More email connectors for your Wiro agent

  • Mailchimp logoMailchimpAudiences, campaigns and reports in Mailchimp.
  • SendGrid logoSendGridSend email and manage contacts and lists in SendGrid.
  • Brevo logoBrevoEmail campaigns, transactional email and contact lists in Brevo.

Put Gmail to work with Wiro

Deploy an agent and connect Gmail from its Connectors tab. Every agent plan includes it: Starter $5, Pro $30 and Max $100 a month.

Build an AgentAll Connectors

Discover, test, and run AI models, build workflows and agents with one unified API.

All systems operational
WiroModelsAgentsMCP ServerLLM GatewayBrowser ExtensionIntegrationsConnectorsPricingAboutBlogCareersContactPartnerChangelogStatusFAQ
CategoriesText to ImageImage to ImageImage EditingImage to TextText to VideoImage to VideoVideo to VideoText to SpeechSpeech to TextSpeech to SpeechVoice CloneRealtime ConversationMusic GenerationLLMUtilities
ModelsNano Banana 2GPT Image 2.5Seedream V5 ProSeedance 2.5Veo 3.1Kling V3FLUX 3FLUX.2 ProWan 3.0 PrimeGrok Imagine 1.5
PartnersGoogleOpenAIByteDanceBlack Forest LabsKling AIQwenAlibabaxAIMiniMaxElevenLabs
Getting StartedWiro ModelsWiro EffectsIntroductionAuthenticationProjectsCode ExamplesWiro MCP ServerSelf-Hosted MCPn8n IntegrationLLMs.txt
API ReferenceModelsRun a ModelModel ParametersTasksLLM & Chat StreamingWebSocketRealtime VoiceFiles
© 2026 Wiro AI. All rights reserved.
PrivacyTermsData Deletion