Use this skill when the user wants files downloaded from Gmail to the local
machine.
Trigger this skill when the user asks to:
Do not use this skill for:
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 in DD-Mon-YYYYbefore: optional end date in DD-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 firstIf the user did not specify save_folder, choose a clear folder under their home
directory and state it explicitly before running.
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 "auth@shove.xforceplus.com" \
--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 "auth@shove.xforceplus.com" \
--extensions ".pdf,.ofd" \
--save-folder "~/Documents/walmart-invoices" \
--dry-run
Environment variables are also supported:
GMAIL_USERGMAIL_PASSscripts/download_gmail_attachments.py with explicit arguments.downloaded count, skipped count, and destination folder.
If --summary-json is used, prefer reading that file for the final report.
GMAIL_USER or GMAIL_PASS is missing, stop and ask for it.INBOX.共 1 个版本