
Gws Gmail Send
Send transactional, support, or outreach email from the terminal without opening Gmail when your agent or script needs to notify users or contacts.
Overview
gws-gmail-send is an agent skill for the Grow phase that sends Gmail messages through the `gws` CLI with to, subject, body, and optional attachments.
Install
npx skills add https://github.com/googleworkspace/cli --skill gws-gmail-sendWhat is this skill?
- CLI send via `gws gmail +send` with required --to, --subject, and --body
- Optional HTML body, multi-recipient to/cc/bcc, multiple --attach files, and send-as --from
- --dry-run previews the API request without sending; --draft saves instead of send
- Depends on gws-shared for auth, global flags, and security rules (gws 0.22.5)
- 7 documented CLI flags table rows plus dry-run and draft modes
- metadata version 0.22.5
Adoption & trust: 24.9k installs on skills.sh; 26.9k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need your coding agent to send or draft a real Gmail message from automation without clicking through the Gmail UI or wiring a custom API client.
Who is it for?
Solo builders already on Google Workspace who standardize ops and growth email through the gws CLI inside agent workflows.
Skip if: Bulk marketing campaigns, non-Gmail providers, or environments where installing the gws binary and Workspace OAuth is not allowed.
When should I use this skill?
Agent must send or draft a Gmail message via the installed gws binary after gws-shared auth is in place.
What do I get? / Deliverables
A sent message (or saved draft) is created via Gmail API with the flags you specified, or a dry-run shows the exact request before send.
- Sent Gmail message
- Gmail draft
- Dry-run request preview
Recommended Skills
Journey fit
Email is a core lifecycle channel for solo builders—onboarding, support replies, and retention nudges—so the canonical shelf is Grow. Lifecycle covers one-to-one and small-batch email to existing or prospective users, which matches Gmail send with CC, BCC, attachments, and draft mode.
How it compares
Use for quick Gmail sends from the terminal instead of ad-hoc Python/google-api-python-client scripts for one-off mail.
Common Questions / FAQ
Who is gws-gmail-send for?
Indie builders and small teams who use the Google Workspace `gws` CLI and want their agent to send or draft Gmail from documented, repeatable commands.
When should I use gws-gmail-send?
Use in Grow lifecycle for support or onboarding email, in Launch distribution for targeted outreach, or in Operate when an automated run must email you a summary—after gws-shared auth is configured.
Is gws-gmail-send safe to install?
It drives a real mail API with your Workspace credentials; review the Security Audits panel on this page and follow gws-shared security rules before granting network and secret access to your agent.
Workflow Chain
Requires first: gws shared
SKILL.md
READMESKILL.md - Gws Gmail Send
# gmail +send > **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. Send an email ## Usage ```bash gws gmail +send --to <EMAILS> --subject <SUBJECT> --body <TEXT> ``` ## Flags | Flag | Required | Default | Description | |------|----------|---------|-------------| | `--to` | ✓ | — | Recipient email address(es), comma-separated | | `--subject` | ✓ | — | Email subject | | `--body` | ✓ | — | Email body (plain text, or HTML with --html) | | `--from` | — | — | Sender address (for send-as/alias; omit to use account default) | | `--attach` | — | — | Attach a file (can be specified multiple times) | | `--cc` | — | — | CC email address(es), comma-separated | | `--bcc` | — | — | BCC email address(es), comma-separated | | `--html` | — | — | Treat --body as HTML content (default is plain text) | | `--dry-run` | — | — | Show the request that would be sent without executing it | | `--draft` | — | — | Save as draft instead of sending | ## Examples ```bash gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi Alice!' gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi!' --cc bob@example.com gws gmail +send --to alice@example.com --subject 'Hello' --body '<b>Bold</b> text' --html gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi!' --from alias@example.com gws gmail +send --to alice@example.com --subject 'Report' --body 'See attached' -a report.pdf gws gmail +send --to alice@example.com --subject 'Files' --body 'Two files' -a a.pdf -a b.csv gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi!' --draft ``` ## Tips - Handles RFC 5322 formatting, MIME encoding, and base64 automatically. - Use --from to send from a configured send-as alias instead of your primary address. - Use -a/--attach to add file attachments. Can be specified multiple times. Total size limit: 25MB. - With --html, use fragment tags (<p>, <b>, <a>, <br>, etc.) — no <html>/<body> wrapper needed. - Use --draft to save the message as a draft instead of sending it immediately. > [!CAUTION] > This is a **write** command — confirm with the user before executing. ## See Also - [gws-shared](../gws-shared/SKILL.md) — Global flags and auth - [gws-gmail](../gws-gmail/SKILL.md) — All send, read, and manage email commands