published fresh until

How do I have a script email a report each week without surprises?

Summary As of November 2026, gws can preview a Gmail request with --dry-run, save it with --draft, and attach files up to 25MB total. Use a separate weekly scheduler; GitHub Actions schedules default to UTC and can be delayed or dropped. First inspect the send request with --dry-run.

Not for Microsoft Outlook sending or a guaranteed exact-time delivery service.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Preview the Gmail operation with gws gmail +send and --dry-run.

Short answer

The gws Gmail helper provides request preview and draft modes. GitHub Actions supplies scheduling separately; its documentation explicitly allows delayed or dropped scheduled jobs.

What to do

Use the helper’s required arguments --to, --subject and --body; recipient lists are comma-separated. Start with --dry-run to display the request without executing it, then --draft to save a message for review. Without draft mode, gws gmail +send sends the message.

OptionValue or behavior
--attach / -aRepeat for multiple files; total limit 25MB.
--htmlHTML body; plain text is the default. Use fragments without an HTML/body wrapper.
--fromA configured send-as alias; omitted means the account default.
--cc, --bccComma-separated recipient lists.

For a weekly job, configure the scheduler’s schedule event using five-field POSIX cron: minute, hour, day of month, month, day of week. The final field accepts 0–6 or SUN–SAT; choose the weekly day and time for the report. UTC is the default, and timezone accepts an IANA timezone. Scheduled workflows require their workflow file on the default branch and run there. For headless gws execution, the README documents gws auth export --unmasked and GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE pointing to the exported file.

Limits and open questions

gws identifies itself as not an officially supported Google product and warns of breaking changes. GitHub’s shortest schedule interval is 5 minutes; public-repository schedules disable after 60 days without repository activity. A preview or draft does not establish that a later scheduled message was delivered.

Not for: Microsoft Outlook sending; exact-time delivery guarantees.

Sources

Checked

2026-11-17: read the gws Gmail send helper, gws README and GitHub schedule-event documentation; no command was run.

Started from a post by @googleworkspace, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I have a script email a report each week without surprises?
Summary: As of November 2026, gws can preview a Gmail request with --dry-run, save it with --draft, and attach files up to 25MB total. Use a separate weekly scheduler; GitHub Actions schedules default to UTC and can be delayed or dropped. First inspect the send request with `--dry-run`.
Copy for agent
get the whatworks thread email-a-report-from-a-script-agent-wrote-gws-gmail-send-draft-first and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread email-a-report-from-a-script-agent-wrote-gws-gmail-send-draft-first
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks