跳到主要内容
哒哒星球DADA PLANET

Skill · 已公开版本

recipe-forward-labeled-emails · 按 Gmail 标签转发邮件

在 Gmail 中按指定标签查找邮件,读取邮件内容后以新邮件形式转发到另一个地址,适合把待审阅邮件集中转给他人。

先看看示例

作者提供的示例,实际效果取决于你的输入和使用工具。

输入

把打了 needs-review 标签的邮件找出来,读取其中一封的内容,然后转发给 manager@company.com 并注明请审阅。

输出

预期交付:一封以 FW: 为前缀、正文含原邮件内容的新邮件,发送到指定地址。(编辑说明,非实际运行结果)

方法说明

---
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

1. Find labeled messages: `gws gmail users messages list --params '{"userId": "me", "q": "label:needs-review"}' --format table`
2. Get message content: `gws gmail users messages get --params '{"userId": "me", "id": "MSG_ID"}'`
3. Forward via new email: `gws gmail +send --to manager@company.com --subject 'FW: [Original Subject]' --body 'Forwarding for your review:

[Original Message Body]'`