Index of every page on this site: llms.txt
All skills
googleworkspace avatar

/gws-gmail-send

@cd3697e
by Google Workspacegoogleworkspace/cli32k stars
1,997
Run it yourself

Gmail: Send an email.

Use this Skill: https://skilld.dev/gh/googleworkspace/cli/gws-gmail-send

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈9 tokens for metadata: the name and description. ≈603 when used: this file.

How this Skill uses context

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈38 characters, or 0.5%.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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

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

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

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides a standard interface for the Google Workspace CLI tool (gws) to send emails via Gmail. It supports common email features such as attachments, CC/BCC, and HTML formatting. The skill correctly identifies itself as a write-capable tool and recommends user confirmation before execution. No security issues were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer8mo

    1/1 file flagged

  • ZeroLeaks7mo

    1 finding · Score: 86/100

Signed by skilld at cd3697e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 8 months ago
Other metadata
metadata
{
  "version": "0.22.5",
  "openclaw": {
    "category": "productivity",
    "requires": {
      "bins": [
        "gws"
      ]
    },
    "cliHelp": "gws gmail +send --help"
  }
}
  • CLI
  • gmail
  • google-workspace
  • email
  • gws

README badge

README badge for googleworkspace/cli/gws-gmail-send

Sends an email via Gmail using the gws CLI tool, supporting plain text or HTML body, CC/BCC, file attachments up to 25MB, and send-as aliases. Use this to automate email dispatch from Claude within authenticated Google Workspace accounts.

Generated from the current SKILL.md.

Does this skill require authentication setup?
Yes. You must read and configure gws-shared/SKILL.md first for auth and global flags. Run `gws generate-skills` if it's missing.
Can I send emails with attachments?
Yes. Use --attach or -a (can be specified multiple times). Maximum total size is 25MB.
How do I send HTML emails instead of plain text?
Use the --html flag with --body. Include fragment tags like <p>, <b>, <a>, <br> — don't wrap in <html>/<body>.
Can I send from an alias or different address?
Yes. Use --from to send as a configured send-as alias instead of your primary account address.
What does --dry-run do?
It shows the email request that would be sent without actually executing it, allowing you to verify the message before sending.

Generated from the current SKILL.md. These answers refresh after source changes.