Gmail Integration
First time? If setup_complete: false above, run ./SETUP.md first, then set setup_complete: true.
Full Gmail automation via Google Apps Script API: send, read inbox, create drafts, mark as read.
Workflow
- Read inbox - Get unread emails with optional filters
- Send email - Send with HTML support, CC/BCC
- Create drafts - Save for review before sending
- Mark as read - Update email status
API Actions
| Action |
Description |
Required Params |
Optional |
send |
Send email |
to, subject, body |
html, cc, bcc, name |
inbox |
Read inbox |
- |
maxResults, query, hours |
draft |
Create draft |
to, subject, body |
html, replyTo |
markRead |
Mark as read |
messageId |
- |
Examples
# Send email
curl -sL "$URL?token=$TOKEN&action=send&to=user@example.com&subject=Hello&body=Message"
# Get last 10 unread emails from last 6 hours
curl -sL "$URL?token=$TOKEN&action=inbox&maxResults=10&hours=6"
# Search for specific emails
curl -sL "$URL?token=$TOKEN&action=inbox&query=from:important@client.com"
# Create draft
curl -sL "$URL?token=$TOKEN&action=draft&to=user@example.com&subject=Follow%20Up&body=Draft"
# Mark email as read
curl -sL "$URL?token=$TOKEN&action=markRead&messageId=MESSAGE_ID"
Response Format
Send:
{
"success": true,
"email": { "to": "user@example.com", "subject": "Hello", "cc": null, "bcc": null }
}
Inbox:
{
"success": true,
"count": 5,
"emails": [
{
"id": "message_id",
"threadId": "thread_id",
"from": "sender@example.com",
"subject": "Email Subject",
"date": "2026-01-14T08:30:00Z",
"snippet": "First 200 chars...",
"body": "Full email body",
"isUnread": true,
"labels": ["INBOX", "UNREAD"]
}
]
}
Important Notes
- No emojis in subject/body - URL encoding breaks them
- Default inbox query:
is:unread with time filter
hours param defaults to 24
Integration
Works with other skills:
- whatsapp - Forward important emails as messages
- calendar - Create events from email content
1---2name: gmail3description: Gmail automation via Google Apps Script. Use for: send emails, read inbox, create drafts, search messages.4---5
6# Gmail Integration
7
8> **First time?** If `setup_complete: false` above, run `./SETUP.md` first, then set `setup_complete: true`.
9
10Full Gmail automation via Google Apps Script API: send, read inbox, create drafts, mark as read.
11
12## Workflow
13
141. **Read inbox** - Get unread emails with optional filters
152. **Send email** - Send with HTML support, CC/BCC
163. **Create drafts** - Save for review before sending
174. **Mark as read** - Update email status
18
19## API Actions
20
21| Action | Description | Required Params | Optional |
22|--------|-------------|-----------------|----------|
23| `send` | Send email | `to`, `subject`, `body` | `html`, `cc`, `bcc`, `name` |
24| `inbox` | Read inbox | - | `maxResults`, `query`, `hours` |
25| `draft` | Create draft | `to`, `subject`, `body` | `html`, `replyTo` |
26| `markRead` | Mark as read | `messageId` | - |
27
28## Examples
29
30```bash
31# Send email
32curl -sL "$URL?token=$TOKEN&action=send&to=user@example.com&subject=Hello&body=Message"
33
34# Get last 10 unread emails from last 6 hours
35curl -sL "$URL?token=$TOKEN&action=inbox&maxResults=10&hours=6"
36
37# Search for specific emails
38curl -sL "$URL?token=$TOKEN&action=inbox&query=from:important@client.com"
39
40# Create draft
41curl -sL "$URL?token=$TOKEN&action=draft&to=user@example.com&subject=Follow%20Up&body=Draft"
42
43# Mark email as read
44curl -sL "$URL?token=$TOKEN&action=markRead&messageId=MESSAGE_ID"
45```
46
47## Response Format
48
49**Send:**
50```json
51{
52 "success": true,
53 "email": { "to": "user@example.com", "subject": "Hello", "cc": null, "bcc": null }
54}
55```
56
57**Inbox:**
58```json
59{
60 "success": true,
61 "count": 5,
62 "emails": [
63 {
64 "id": "message_id",
65 "threadId": "thread_id",
66 "from": "sender@example.com",
67 "subject": "Email Subject",
68 "date": "2026-01-14T08:30:00Z",
69 "snippet": "First 200 chars...",
70 "body": "Full email body",
71 "isUnread": true,
72 "labels": ["INBOX", "UNREAD"]
73 }
74 ]
75}
76```
77
78## Important Notes
79
80- **No emojis** in subject/body - URL encoding breaks them
81- Default inbox query: `is:unread` with time filter
82- `hours` param defaults to 24
83
84## Integration
85
86Works with other skills:
87- **whatsapp** - Forward important emails as messages
88- **calendar** - Create events from email content