/install gmail-attachment-downloader
Gmail Attachment Downloader
Use this skill when the user wants files downloaded from Gmail to the local machine.
When To Use
Trigger this skill when the user asks to:
- Download Gmail attachments in bulk
- Export invoices, statements, or receipts from Gmail
- Filter Gmail attachments by sender, subject, date range, extension, or limit
- Save Gmail attachments into a local folder without using Google Cloud APIs
Do not use this skill for:
- Sending email
- Modifying or deleting mailbox contents
- Managing Google OAuth projects
Inputs To Collect
Collect or infer these inputs before running the script:
gmail_user: Gmail addressgmail_pass: Gmail app passwordsender: optional sender filtersubject: optional subject filtersince: optional start date inDD-Mon-YYYYbefore: optional end date inDD-Mon-YYYYextensions: optional comma-separated extension list such as.pdf,.ofdsave_folder: destination folder on the local machinemax_results: optional safety limit for matched messagesdry_run: optional preview mode when the user wants to inspect matches first
If the user did not specify save_folder, choose a clear folder under their home
directory and state it explicitly before running.
Execution
Run the bundled script with explicit arguments instead of editing source files.
python3 scripts/download_gmail_attachments.py \
--gmail-user "$GMAIL_USER" \
--gmail-pass "$GMAIL_PASS" \
--sender "[email protected]" \
--subject "发票" \
--since "01-Jan-2025" \
--extensions ".pdf,.ofd" \
--save-folder "~/Documents/walmart-invoices" \
--max-results 200
Preview matches without writing files:
python3 scripts/download_gmail_attachments.py \
--gmail-user "$GMAIL_USER" \
--gmail-pass "$GMAIL_PASS" \
--sender "[email protected]" \
--extensions ".pdf,.ofd" \
--save-folder "~/Documents/walmart-invoices" \
--dry-run
Environment variables are also supported:
GMAIL_USERGMAIL_PASS
Workflow
- Confirm the user has Gmail IMAP enabled and an app password.
- Decide the destination folder and filters.
- Run
scripts/download_gmail_attachments.pywith explicit arguments. - Report:
downloaded count, skipped count, and destination folder.
If
--summary-jsonis used, prefer reading that file for the final report. - If authentication fails, tell the user to re-check IMAP and the app password.
Failure Handling
- If
GMAIL_USERorGMAIL_PASSis missing, stop and ask for it. - If mailbox auto-detection cannot find Gmail All Mail, fall back to
INBOX. - If no messages match, suggest loosening sender/subject/date filters.
- If downloads are zero, suggest removing extension filtering.
Resources
- Setup details: references/setup.md
- Script entry point: scripts/download_gmail_attachments.py
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install gmail-attachment-downloader - 安装完成后,直接呼叫该 Skill 的名称或使用
/gmail-attachment-downloader触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Gmail Attachment Downloader 是什么?
Download Gmail attachments through IMAP when the user wants to pull invoices, statements, or other files from Gmail into a local folder. Use it when the task... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 79 次。
如何安装 Gmail Attachment Downloader?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install gmail-attachment-downloader」即可一键安装,无需额外配置。
Gmail Attachment Downloader 是免费的吗?
是的,Gmail Attachment Downloader 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Gmail Attachment Downloader 支持哪些平台?
Gmail Attachment Downloader 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Gmail Attachment Downloader?
由 whauff(@whauff)开发并维护,当前版本 v1.1.0。