save_media_window
Bulk-save WhatsApp media from recent hours to disk with configurable concurrency. Handles failures per item without aborting, returning results for each media file.
Instructions
Bulk-save WhatsApp media from the last N hours to disk. Downloads with bounded concurrency (default 3) and returns PER-ITEM results - items that fail (expired, no keys, network) are reported in items[].ok=false with a code, but the overall call still succeeds with ok:true. The errors array rolls up failure codes ({code, count}) for quick summarization. Default folder: /data/media//. Each item in the result has the absolute saved path. The call ABORTS the remaining work only on disk_full or disconnected - never on individual download failures.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hours | No | ||
| kinds | No | Which media types to save. | |
| chatId | No | ||
| folder | No | Override default folder. Must be an absolute path. | |
| maxItems | No | ||
| timeoutMs | No | Per-item download timeout. Defaults: 30s images, 60s voice, 120s video. | |
| transcribe | No | For voice notes: also run Whisper transcription. Requires api-key.txt. | |
| concurrency | No | ||
| skipIfExists | No | If a target file already exists, skip the download and return the existing path. | |
| excludeGroups | No |