---
id: sm-recipe-search-and-export-emails
name: "recipe-search-and-export-emails"
url: https://skills.yangsir.net/skill/sm-recipe-search-and-export-emails
author: googleworkspace
domain: ai-productivity-automation
tags: ["email-management", "data-export", "gmail-api", "compliance", "information-retrieval"]
install_count: 619
rating: 4.20 (51 reviews)
github: https://github.com/googleworkspace/cli
---

# recipe-search-and-export-emails

> 查找符合特定查询条件的Gmail邮件，并将其导出以供审查，便于邮件归档和分析。

**Stats**: 619 installs · 4.2/5 (51 reviews)

## Before / After 对比

### Gmail邮件搜索导出，便捷归档分析

## Readme

# recipe-search-and-export-emails

# Search and Export Emails

**PREREQUISITE:** Load the following skills to execute this recipe: `gws-gmail`

Find Gmail messages matching a query and export them for review.

## Steps

- Search for emails: `gws gmail users messages list --params '{"userId": "me", "q": "from:client@example.com after:2024/01/01"}'`

- Get full message: `gws gmail users messages get --params '{"userId": "me", "id": "MSG_ID"}'`

- Export results: `gws gmail users messages list --params '{"userId": "me", "q": "label:project-x"}' --format json > project-emails.json`

Weekly Installs619Repository[googleworkspace/cli](https://github.com/googleworkspace/cli)GitHub Stars21.4KFirst Seen14 days agoSecurity Audits[Gen Agent Trust HubPass](/googleworkspace/cli/recipe-search-and-export-emails/security/agent-trust-hub)[SocketPass](/googleworkspace/cli/recipe-search-and-export-emails/security/socket)[SnykPass](/googleworkspace/cli/recipe-search-and-export-emails/security/snyk)Installed oncodex603opencode602gemini-cli600cursor600github-copilot600kimi-cli599

---
*Source: https://skills.yangsir.net/skill/sm-recipe-search-and-export-emails*
*Markdown mirror: https://skills.yangsir.net/api/skill/sm-recipe-search-and-export-emails/markdown*