$npx -y skills add googleworkspace/cli --skill gws-gmail-replyGmail: Reply to a message (handles threading automatically).
| 1 | # gmail +reply |
| 2 | |
| 3 | > **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. |
| 4 | |
| 5 | Reply to a message (handles threading automatically) |
| 6 | |
| 7 | ## Usage |
| 8 | |
| 9 | ```bash |
| 10 | gws gmail +reply --message-id <ID> --body <TEXT> |
| 11 | ``` |
| 12 | |
| 13 | ## Flags |
| 14 | |
| 15 | | Flag | Required | Default | Description | |
| 16 | |------|----------|---------|-------------| |
| 17 | | `--message-id` | ✓ | — | Gmail message ID to reply to | |
| 18 | | `--body` | ✓ | — | Reply body (plain text, or HTML with --html) | |
| 19 | | `--from` | — | — | Sender address (for send-as/alias; omit to use account default) | |
| 20 | | `--to` | — | — | Additional To email address(es), comma-separated | |
| 21 | | `--attach` | — | — | Attach a file (can be specified multiple times) | |
| 22 | | `--cc` | — | — | CC email address(es), comma-separated | |
| 23 | | `--bcc` | — | — | BCC email address(es), comma-separated | |
| 24 | | `--html` | — | — | Treat --body as HTML content (default is plain text) | |
| 25 | | `--dry-run` | — | — | Show the request that would be sent without executing it | |
| 26 | | `--draft` | — | — | Save as draft instead of sending | |
| 27 | |
| 28 | ## Examples |
| 29 | |
| 30 | ```bash |
| 31 | gws gmail +reply --message-id 18f1a2b3c4d --body 'Thanks, got it!' |
| 32 | gws gmail +reply --message-id 18f1a2b3c4d --body 'Looping in Carol' --cc carol@example.com |
| 33 | gws gmail +reply --message-id 18f1a2b3c4d --body 'Adding Dave' --to dave@example.com |
| 34 | gws gmail +reply --message-id 18f1a2b3c4d --body '<b>Bold reply</b>' --html |
| 35 | gws gmail +reply --message-id 18f1a2b3c4d --body 'Updated version' -a updated.docx |
| 36 | gws gmail +reply --message-id 18f1a2b3c4d --body 'Draft reply' --draft |
| 37 | ``` |
| 38 | |
| 39 | ## Tips |
| 40 | |
| 41 | - Automatically sets In-Reply-To, References, and threadId headers. |
| 42 | - Quotes the original message in the reply body. |
| 43 | - --to adds extra recipients to the To field. |
| 44 | - Use -a/--attach to add file attachments. Can be specified multiple times. |
| 45 | - With --html, the quoted block uses Gmail's gmail_quote CSS classes and preserves HTML formatting. Use fragment tags (<p>, <b>, <a>, etc.) — no <html>/<body> wrapper needed. |
| 46 | - With --html, inline images in the quoted message are preserved via cid: references. |
| 47 | - Use --draft to save the reply as a draft instead of sending it immediately. |
| 48 | - For reply-all, use +reply-all instead. |
| 49 | |
| 50 | ## See Also |
| 51 | |
| 52 | - [gws-shared](../gws-shared/SKILL.md) — Global flags and auth |
| 53 | - [gws-gmail](../gws-gmail/SKILL.md) — All send, read, and manage email commands |