Claude
Skills
Sign in
Back

agentio-gmail

Included with Lifetime
$97 forever

Use when interacting with Gmail via the agentio CLI - list, read, search, send, draft, reply, archive, mark, attachments, export.

Productivity

What this skill does


# Gmail via agentio

Auto-generated from `agentio skill gmail`. Do not edit by hand.

## agentio gmail list

List messages

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)
- `--limit <n>`: Number of messages (default: 10)
- `--query <query>`: Gmail search query (see "gmail search --help" for syntax)
- `--label <label>`: Filter by label (repeatable) (default: )

```
Examples:

  # 10 most recent messages
  agentio gmail list

  # 25 most recent in the inbox
  agentio gmail list --limit 25 --label INBOX

  # unread messages from the last week
  agentio gmail list --query "is:unread newer_than:7d"

  # use a specific profile
  agentio gmail list --profile [email protected]
```

## agentio gmail get <message-id>

Get a message

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)
- `--format <format>`: Body format: text, html, or raw (default: text)
- `--body-only`: Output only the message body

```
Examples:

  # full message with headers
  agentio gmail get 18c4f1a2b3d

  # plain-text body only (good for piping to a file)
  agentio gmail get 18c4f1a2b3d --body-only > message.txt

  # raw HTML body
  agentio gmail get 18c4f1a2b3d --format html --body-only
```

## agentio gmail search

Search messages using Gmail query syntax

Options:

- `--query <query>`: Search query
- `--profile <name>`: Profile name (optional if only one profile exists)
- `--limit <n>`: Max results (capped at 10000; >100 returns IDs only without per-message metadata) (default: 10)
- `--ids-only`: Print one message ID per line (pipe-friendly into archive/label)

```
Examples:

  # unread mail from a specific sender in the last week
  agentio gmail search --query "from:[email protected] is:unread newer_than:7d"

  # messages with attachments after a date
  agentio gmail search --query "has:attachment after:2024/01/01" --limit 25

  # subject keyword in inbox, excluding spam
  agentio gmail search --query "subject:invoice label:inbox -label:spam"

  # exact phrase across all mail
  agentio gmail search --query '"quarterly report"'

  # bulk pipe: archive everything matching a query
  agentio gmail search --query "from:[email protected] older_than:6m" --limit 5000 --ids-only \
    | agentio gmail archive

Query syntax: from:, to:, cc:, subject:, label:, is:unread|starred|important,
has:attachment, after:YYYY/MM/DD, before:YYYY/MM/DD, newer_than:7d, older_than:1m.
Combine with spaces (AND), OR, or - to negate.
```

## agentio gmail send

Send an email

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)
- `--to <email>`: Recipient (repeatable, required unless --reply-to) (default: )
- `--cc <email>`: CC recipient (repeatable) (default: )
- `--bcc <email>`: BCC recipient (repeatable) (default: )
- `--subject <subject>`: Email subject (required unless --reply-to)
- `--body <body>`: Email body (or pipe via stdin)
- `--html`: Treat body as HTML
- `--reply-to <thread-id>`: Thread ID to reply to (derives to/subject from thread)
- `--attachment <path>`: File to attach (repeatable) (default: )
- `--inline <cid:path>`: Inline image (repeatable, format: contentId:filepath). Supports PNG, JPG, GIF only (not SVG) (default: )

```
Examples:

  # plain-text email
  agentio gmail send --to [email protected] --subject "Hello" --body "Hi Alice!"

  # body from stdin (great for piping)
  echo "Sent via pipe" | agentio gmail send --to [email protected] --subject "Note"

  # reply within an existing thread (to/subject derived from thread)
  agentio gmail send --reply-to 18c4f1a2b3d --body "Thanks!"

  # HTML body with an attachment and an inline image
  agentio gmail send --to [email protected] --cc [email protected] \
    --subject "Report" --html \
    --body '<p>See chart:</p><img src="cid:chart1">' \
    --attachment ./report.pdf --inline chart1:./chart.png
```

## agentio gmail draft

Create an email draft

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)
- `--to <email>`: Recipient (repeatable, required unless --reply-to) (default: )
- `--cc <email>`: CC recipient (repeatable) (default: )
- `--bcc <email>`: BCC recipient (repeatable) (default: )
- `--subject <subject>`: Email subject (required unless --reply-to)
- `--body <body>`: Email body (or pipe via stdin)
- `--html`: Treat body as HTML
- `--reply-to <thread-id>`: Thread ID to reply to (derives to/subject from thread)
- `--attachment <path>`: File to attach (repeatable) (default: )
- `--inline <cid:path>`: Inline image (repeatable, format: contentId:filepath). Supports PNG, JPG, GIF only (not SVG) (default: )

```
Examples:

  # save a draft for later editing in Gmail
  agentio gmail draft --to [email protected] --subject "Hello" --body "Draft body"

  # draft a reply within an existing thread
  agentio gmail draft --reply-to 18c4f1a2b3d --body "Draft reply"

  # draft with attachment, body from stdin
  cat message.txt | agentio gmail draft --to [email protected] \
    --subject "Notes" --attachment ./notes.pdf
```

## agentio gmail archive [message-id...]

Archive one or more messages (bulk-safe via batchModify)

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)
- `--chunk-size <n>`: IDs per batchModify call (max 1000) (default: 1000)
- `--max-retries <n>`: Retries per chunk on 429/5xx (default: 5)
- `--dry-run`: Print chunk plan without calling the API

```
Examples:

  # archive one message
  agentio gmail archive 18c4f1a2b3d

  # archive several at once
  agentio gmail archive 18c4f1a2b3d 18c4f1a2b3e 18c4f1a2b3f

  # archive thousands by piping IDs from search (uses messages.batchModify, 1000/call)
  agentio gmail search --query "from:[email protected] older_than:1y" --limit 5000 --ids-only \
    | agentio gmail archive

  # preview the chunk plan without calling the API
  echo "id1 id2 id3" | agentio gmail archive --dry-run
```

## agentio gmail mark <message-id...>

Mark one or more messages as read or unread

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)
- `--read`: Mark as read
- `--unread`: Mark as unread

```
Examples:

  # mark one message as read
  agentio gmail mark 18c4f1a2b3d --read

  # mark several back to unread
  agentio gmail mark 18c4f1a2b3d 18c4f1a2b3e --unread
```

## agentio gmail labels list

List all labels

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)

```
Examples:

  # list every label (system + user)
  agentio gmail labels list

  # list labels for a specific profile
  agentio gmail labels list --profile [email protected]
```

## agentio gmail labels create <name>

Create a new label

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)

```
Examples:

  # create a top-level label
  agentio gmail labels create receipts

  # create a nested label (use "/" for hierarchy)
  agentio gmail labels create auto/receipts

  # nested two levels deep
  agentio gmail labels create work/clients/acme
```

## agentio gmail labels delete <name-or-id>

Delete a user label

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)

```
Examples:

  # delete a user label by name
  agentio gmail labels delete receipts

  # delete a nested label
  agentio gmail labels delete auto/receipts

  # delete by label ID
  agentio gmail labels delete Label_1234567890
```

## agentio gmail labels rename <old> <new>

Rename a user label

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)

```
Examples:

  # rename a label
  agentio gmail labels rename receipts invoices

  # move a label into a nested hierarchy
  agentio gmail labels rename receipts auto/receipts
```

## agentio gmail filters list

List all filters

Options:

- `--profile <name>`: Profile name (optional if only one profile exists)

```
Examples:

  # list every filter
  agentio gmail filters list

  # list filters for a specific profile
  agentio gmail filter
Files: 1
Size: 12.5 KB
Complexity: 15/100
Category: Productivity

Related in Productivity