recipe-forward-labeled-emails
googleworkspace/cli
Find Gmail messages with a specific label and forward them to another address.
What is recipe-forward-labeled-emails?
This recipe helps you automatically locate Gmail messages tagged with a specific label and forward them to another recipient. Use it to route messages for review, delegation, or archival without manual searching.
- Search Gmail for messages matching a specific label
- Retrieve full message content including subject and body
- Forward matched messages to a designated email address
- Preserve original message context in forwarded emails
- Automate routing of labeled messages to team members
How to install recipe-forward-labeled-emails
npx skills add null --skill recipe-forward-labeled-emails- gws-gmail skill must be installed
- Access to Gmail API via Google Workspace CLI (gws)
- Appropriate Gmail labels already created in your account
How to use recipe-forward-labeled-emails
- 1.List all messages with your target label using the gws gmail list command with a label query
- 2.Retrieve the full content of each message using its message ID
- 3.Compose and send a forwarded email to the recipient address with the original subject and body
Use cases
- Forward all messages labeled 'needs-review' to your manager for approval
- Route customer inquiries tagged with a specific label to the support team
- Delegate tasks by forwarding labeled messages to relevant team members
- Create automated workflows for message triage and distribution
- Gmail users managing high-volume inboxes
- Team leads delegating work via email
- Support teams routing tickets to specialists
- Anyone automating email workflows in Google Workspace
recipe-forward-labeled-emails FAQ
Any label you've created in Gmail. Use the label name in the query format 'label:label-name'. Built-in labels like 'INBOX' and 'SENT' are also supported.
This recipe forwards messages one at a time. To forward multiple messages, you would need to loop through the list results and repeat the forward step for each message ID.
Yes, forwarded emails are sent from your Gmail account. The original message content is included in the body to preserve context.
You need access to the Gmail API through Google Workspace CLI and appropriate permissions in your Gmail account to read and send messages.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: recipe-forward-labeled-emails description: "Find Gmail messages with a specific label and forward them to another address." metadata: version: 0.22.5 openclaw: category: "recipe" domain: "productivity" requires: bins: - gws skills: - gws-gmail
Forward Labeled Gmail Messages
PREREQUISITE: Load the following skills to execute this recipe:
gws-gmail
Find Gmail messages with a specific label and forward them to another address.
Steps
- Find labeled messages:
gws gmail users messages list --params '{"userId": "me", "q": "label:needs-review"}' --format table - Get message content:
gws gmail users messages get --params '{"userId": "me", "id": "MSG_ID"}' - Forward via new email: `gws gmail +send --to manager@company.com --subject 'FW: [Original Subject]' --body 'Forwarding for your review:
[Original Message Body]'`
Related skills
More from googleworkspace/cli and the wider catalog.
gws-gmail
Send, read, and manage Gmail emails via Google Workspace CLI.
gws-drive
Manage Google Drive files, folders, and shared drives via CLI.
gws-docs
Read and write Google Docs via command line.
gws-calendar
Manage Google Calendar events, calendars, and access control via CLI.
gws-sheets
Read and write Google Sheets spreadsheets via CLI.
gws-gmail-send
Send emails via Gmail with attachments, CC/BCC, HTML support, and draft options.