# Gmail AI agent for Slack & Microsoft Teams

Viktor is an AI employee that connects to Gmail in one click via OAuth and helps you stay on top of your inbox and get replies out, running 21 Gmail actions for you like Send Email, Get Thread, and List Labels. Ask in plain English in Slack or Microsoft Teams; Viktor does the work in Gmail and reports back. Setup takes about two minutes.

- Tool: Gmail
- Category: Communication
- Connection: One-click OAuth
- Actions available: 21
- Works from: Slack and Microsoft Teams
- Page: https://viktor.com/integrations/gmail

## What can you ask Viktor to do in Gmail?

- "Summarize everything new in Gmail from the last 24 hours and flag what needs a reply."
- "Draft a reply to the latest Gmail thread about the renewal and send it after I approve."
- "Search Gmail for the conversation about the Q3 launch and pull out the action items."
- "Watch Gmail for anything mentioning invoices and log it in a sheet every Friday."

## What can Viktor do in Gmail? (21 actions)

- **Update Signature for Primary Email Address** - Update the signature for the primary email address.
- **Update Signature for Email in Organization** - Update the signature for a specific email address in an organization.
- **Send Email** - Send a new email OR reply to an existing thread from the authenticated Gmail account. For a fresh message, set to/subject/body; leave inReplyToMessageId blank. To reply to a thread, pass the id of any message in that thread as inReplyToMessageId — the tool preserves threading (References, In-Reply-To, threadId) and auto-prefixes Re: on the subject. Use Find Emails or Get Thread to locate the message ID. Set replyAll: true to fan-out to the original From/To/Cc (minus the user's own address); otherwise only the original sender is addressed. bodyType controls whether body is treated as plain text (default) or HTML. To send to yourself, pass "me" in to — the action resolves it to the authenticated user's email address. No pre-call to Get Current User required. Attachments: for small inline content (the common case in MCP / cloud runs), set attachmentContent to the file's text contents and attachmentFilename to its name. For files already on disk (Pipedream workflows, File Stash), use attachments[] + attachmentFilenames[] instead.
- **Modify Labels** - Add and/or remove labels on one or more Gmail messages in a single call. In Gmail, most inbox-state operations are label mutations under the hood, so this one tool covers archive / trash / untrash / star / unstar / mark-read / mark-unread / apply-label / remove-label.
- **Get Thread** - Fetch an entire Gmail thread (conversation) by thread ID — returns every message in order with headers, decoded body text, and attachment metadata. Use this after Find Emails when the user wants the full conversation rather than a single message. Each result from Find Emails includes a threadId you can pass here. With format: full (default) each message includes decoded text/html bodies and attachment metadata. Use format: metadata to skip bodies and get only headers + labelIds — useful for large threads. Responses are capped — oversized threads fall back to metadata-level detail (or are further truncated from the tail) with a [truncated] marker so the caller knows to narrow the request.
- **List Signature Options** - Retrieves available options for the Signature field.
- **List Send As Aliases** - List all send as aliases for the authenticated user.
- **List Labels** - List every label in the authenticated user's mailbox (system labels like INBOX, SENT, TRASH, STARRED, UNREAD and user-created labels). Call this before Modify Labels or Find Emails when you need to target a label that the user named rather than an obvious system label — it resolves a name like Clients/Acme to its opaque label ID. User labels are returned first, then system labels.
- **List Send as a Delegate Options** - Retrieves available options for the Send as a Delegate field.
- **Get Send As Alias** - Get a send as alias for the authenticated user.
- **Get Current User** - Returns the authenticated Gmail user's name, email address, and mailbox stats (total messages and threads). Call this first when the user says 'my emails', 'my inbox', or needs identity context. Use the returned emailAddress to identify the user's own messages in Find Emails results.
- **Find Emails** - Search the user's Gmail mailbox with Gmail's native query syntax and return matching messages (headers + snippet by default; full bodies when requested). Use this tool for every "find", "search", "list my", or "show me" email intent. The q parameter accepts the full Gmail search operator set — combine operators freely: from:alan@ingen.com is:unread newerthan:7d has:attachment subject:"DNA sequences". Common operators: from:, to:, subject:, has:attachment, filename:pdf, is:unread, is:starred, label:INBOX, newerthan:7d, olderthan:1m, after:2025/01/01, before:2025/12/31, category:primary. labelIds accepts either raw label IDs (INBOX, STARRED) or user-visible names (Clients/Acme) — names are resolved server-side via List Labels. Each returned message carries id, threadId, labelIds, the decoded subject/sender/recipient/date, and a snippet. With format: "full" the decoded body text and payload.parts[].body.attachmentId + filename + mimeType are also included — feed those into Download Attachment, or feed threadId into Get Thread for the whole conversation. Set fields on every call to name just what you need — message records are large, and a wide search returns tens of thousands of characters that crowd out the rest of the task. id and threadId are always returned. To BROWSE or COUNT, use ["subject", "sender", "date"]. To READ or SUMMARISE — "catch me up", "what did X say about Y", "is there anything I need to reply to" — use ["subject", "sender", "date", "bodyText"]. bodyText is the decoded plain-text body (HTML converted, MIME scaffolding and attachments stripped), about half the size of the raw payload, and requesting it fetches full messages for you. Never answer a question about what an email SAYS from snippet — it is a fixed ~200-character prefix, so the sentence you need is usually past its end, and nothing in a snippet indicates that it was cut. Where the snippet is all you asked for and content was likely cut, the message carries snippetTruncated: true. format stays metadata unless you need the raw MIME tree for Download Attachment, in which case pass format: "full" and request payload. Responses are capped. Over the cap: if you named fields, whole messages are dropped rather than your chosen fields being removed, and the note says how many of how many are shown — narrow q and retry. If you named none, messages are compacted instead so counts stay accurate. bodyText shrinks toward a floor before anything is dropped, flagging each cut message with bodyTruncated: true. and Gmail search operators.
- **Download Attachment** - Download a Gmail message attachment to /tmp and return its path + metadata. File Stash syncs the file and exposes a presigned download URL so the caller can retrieve it. Call Find Emails (with format: "full") or Get Thread first — attachment IDs only appear in full-format message reads; each returned message's payload.parts[] enumerates attachments as { body.attachmentId, filename, mimeType }. Pass the enclosing message's id as messageId and the part's body.attachmentId as attachmentId. If filename is omitted, the action looks up the attachment's filename from the message payload. Set convertToPdf: true to convert image / HTML / plain-text / DOCX attachments to PDF during download; other MIME types are rejected.
- **Delete Label** - Immediately and permanently delete a user-created label from the authenticated Gmail mailbox, removing it from every message and thread it was applied to. Only user-created labels can be deleted — Gmail's built-in system labels (INBOX, SENT, SPAM, TRASH, etc.) cannot. This deletes the label definition itself; to merely detach a label from specific messages without removing it, use Modify Labels with removeLabels instead.
- **Create Label** - Create a new user label in the authenticated Gmail mailbox and return its ID. Call this before Modify Labels whenever the label the user wants to apply doesn't yet exist — List Labels will tell you what's already there. Idempotent: if a label with the same name already exists, the action swallows the 409, looks it up by name, and returns the existing label with alreadyExisted: true so the caller can proceed. Nested labels are expressed with / — e.g. Clients/Acme creates or targets a sub-label under Clients. color is optional; when provided, both textColor and backgroundColor must be supplied together and must come from Gmail's fixed palette.
- **Create Draft** - Create an unsent draft in the authenticated Gmail account. Same parameter shape as Send Email — the difference is the message is saved to Drafts instead of being sent. For a reply-draft, pass inReplyToMessageId (from Find Emails / Get Thread); the subject, References, In-Reply-To, and threadId are derived from the referenced message. bodyType controls whether body is treated as plain text (default) or HTML. To draft to yourself, pass "me" in to — the action resolves it to the authenticated user's email address. No pre-call to Get Current User required. Attachments use file-ref inputs and require matching attachmentFilenames[] entries.
- **Bulk Archive Emails** - Archive multiple emails at once.
- **Remove Label from Email** - Remove label(s) from an email message.
- **Delete Email** - Moves the specified message to the trash.
- **Archive Email** - Archive an email message.
- **Add Label to Email** - Add label(s) to an email message.

## How does Viktor work with Gmail?

1. Add Viktor to Slack or Microsoft Teams.
2. Connect Gmail with one-click OAuth - Viktor handles authentication.
3. Ask in plain English. Viktor runs the Gmail actions, chains them with your other tools when needed, and reports back. Sensitive actions wait for your approval.

## What is a Gmail AI agent?

A Gmail AI agent is an AI that connects to your Gmail account and completes work in it - it doesn't just answer questions about Gmail, it takes the actions. Viktor is that agent: an AI employee that works in Gmail on your behalf and delivers the finished result in Slack or Microsoft Teams.

Unlike workflow builders such as Zapier or Make, there is nothing to configure - no triggers to map, no workflows to maintain. You describe the outcome in plain English, and Viktor picks the right Gmail actions, chains them with the other 3,200+ tools it connects to, and asks for approval before anything sensitive runs.

### About Gmail

Gmail offers private and secure email by Google at no cost, for business and consumer accounts.

## Security and permissions

- One-click OAuth - Viktor never sees your password, and you can revoke access at any time.
- Review-first approvals: sensitive Gmail actions wait for your sign-off before they run.
- Isolated compute per team, encrypted in transit and at rest - and your data is never used to train models.
- SOC 2 Type 1 compliant, with Type 2 and ISO 27001 in progress.

## FAQ

### Does Viktor integrate with Gmail?

Yes. Gmail is one of the 3,200+ tools Viktor connects to, via a managed connector. Once connected, anyone on your team can put Viktor to work in Gmail from Slack or Microsoft Teams - no workflow builder, no code.

### How do I connect Gmail to Viktor?

Ask Viktor in Slack or Microsoft Teams to connect Gmail, then approve the one-click OAuth prompt. Viktor never sees your password, handles authentication itself, and starts working right away. Setup takes about two minutes, and you can revoke access at any time.

### What can Viktor do in Gmail?

Viktor can run 21 Gmail actions, including Send Email, Get Thread, and List Labels - and chain them with other tools in a single request. In practice that means Viktor helps you stay on top of your inbox and get replies out. If a task spans several actions, Viktor plans the sequence itself and reports back when the work is done.

### Do I need to build workflows to automate Gmail?

No. Viktor isn't a workflow builder - there are no triggers to map and no workflows to maintain. You ask for the outcome in plain English in Slack or Microsoft Teams, and Viktor decides which Gmail actions to take, runs them, and reports back.

### Is my Gmail data secure with Viktor?

Yes. Viktor connects to Gmail in one click via OAuth, runs in an isolated environment per team, and never trains models on your data. Sensitive actions wait for your approval, and you can revoke access at any time. Viktor is SOC 2 Type 1 compliant, with Type 2 and ISO 27001 in progress.

### How much does the Gmail integration cost?

Nothing extra - every integration, including Gmail, is available on every plan. You can start free with up to $100 in credits, no credit card required; paid plans start at $50/month.

### Can Viktor use Gmail together with my other tools?

Yes - that's the point. Viktor connects to 3,200+ tools and works across them in a single run: it can pull data from Gmail, cross-reference it with another tool - for example Google Sheets or HubSpot, and deliver the finished result in Slack or Microsoft Teams.

## Viktor uses Gmail together with

- [Google Sheets](https://viktor.com/integrations/google-sheets)
- [HubSpot](https://viktor.com/integrations/hubspot)
- [Notion](https://viktor.com/integrations/notion)
- [Salesforce](https://viktor.com/integrations/salesforce)
- [Stripe](https://viktor.com/integrations/stripe)
- [GitHub](https://viktor.com/integrations/github)

## More Communication integrations

- [Slack](https://viktor.com/integrations/slack)
- [Slackbot](https://viktor.com/integrations/slackbot)
- [Telegram](https://viktor.com/integrations/telegram)
- [Zoom Admin](https://viktor.com/integrations/zoom-admin)
- [Microsoft Outlook Email](https://viktor.com/integrations/microsoft-outlook-email)
- [Outlook](https://viktor.com/integrations/outlook)
- [Bot for Slack](https://viktor.com/integrations/bot-for-slack)
- [Twilio](https://viktor.com/integrations/twilio)

## Get started

Viktor is free to start - up to $100 in credits, no credit card required. All 3,200+ integrations are included on every plan. Sign up at https://viktor.com or browse all integrations at https://viktor.com/integrations.
