/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
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install gmail-attachment-downloader - After installation, invoke the skill by name or use
/gmail-attachment-downloader - Provide required inputs per the skill's parameter spec and get structured output
What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 79 downloads so far.
How do I install Gmail Attachment Downloader?
Run "/install gmail-attachment-downloader" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Gmail Attachment Downloader free?
Yes, Gmail Attachment Downloader is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Gmail Attachment Downloader support?
Gmail Attachment Downloader is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Gmail Attachment Downloader?
It is built and maintained by whauff (@whauff); the current version is v1.1.0.