VM0VM0
Integration

Gmail

Send and manage emails with Gmail API

Gmail is Google's email service. This skill enables your agent to send emails, read messages, and manage your inbox.

Required Secrets

SecretDescription
GMAIL_CLIENT_IDOAuth client ID
GMAIL_CLIENT_SECRETOAuth client secret
GMAIL_REFRESH_TOKENRefresh token

See Google Cloud Console for how to obtain these credentials. Select the minimum scope required for your use case:

ScopeDescription
https://www.googleapis.com/auth/gmail.readonlyRead emails only
https://www.googleapis.com/auth/gmail.sendSend emails only
https://www.googleapis.com/auth/gmail.composeCreate and send drafts
https://www.googleapis.com/auth/gmail.modifyRead, send, and delete emails

Configuration

vm0.yaml
version: "1.0"

agents:
  my-agent:
    provider: claude-code
    skills:
      - https://github.com/vm0-ai/vm0-skills/tree/main/gmail
    environment:
      GMAIL_CLIENT_ID: "${{ secrets.GMAIL_CLIENT_ID }}"
      GMAIL_CLIENT_SECRET: "${{ secrets.GMAIL_CLIENT_SECRET }}"
      GMAIL_REFRESH_TOKEN: "${{ secrets.GMAIL_REFRESH_TOKEN }}"

Run

vm0 run my-agent "check my inbox" \
  --secrets GMAIL_CLIENT_ID=xxx --secrets GMAIL_CLIENT_SECRET=xxx --secrets GMAIL_REFRESH_TOKEN=xxx

Example Instructions

AGENTS.md
# Email Digest Agent

You use Gmail to create daily email digests.

## Workflow

1. Fetch unread emails from the past 24 hours
2. Categorize by sender and topic
3. Create a summary digest
4. Send the digest to the user

## Categories

- Urgent: from VIP senders
- Newsletters: from subscribed lists
- Notifications: automated emails
- Personal: everything else
AGENTS.md
# Customer Response Agent

You use Gmail to draft customer email responses.

## Workflow

1. Read incoming customer emails
2. Analyze the question or issue
3. Draft a professional response
4. Save as draft for review

## Tone

- Professional and friendly
- Clear and concise
- Include next steps when applicable