recipe-bulk-download-folder
googleworkspace/cli
List and download all files from a Google Drive folder in bulk.
What is recipe-bulk-download-folder?
This recipe enables you to retrieve a complete list of files from a Google Drive folder and download them locally. Use it when you need to back up folder contents, migrate files, or batch-process Drive documents.
- List all files in a specified Google Drive folder
- Download each file to your local system with original filenames
- Export Google Docs and Sheets as PDF or other formats
- Handle multiple file types in a single operation
- Preserve file structure during bulk downloads
How to install recipe-bulk-download-folder
npx skills add null --skill recipe-bulk-download-folder- gws-drive skill installed and configured
- Google Drive API access enabled
- Valid Google Workspace credentials
How to use recipe-bulk-download-folder
- 1.Run the list command with your folder ID to retrieve all files: gws drive files list --params '{"q": "FOLDER_ID in parents"}' --format json
- 2.For each file returned, use the download command with its file ID: gws drive files get --params '{"fileId": "FILE_ID", "alt": "media"}' -o filename.ext
- 3.For Google Docs, use the export command to convert to PDF: gws drive files export --params '{"fileId": "FILE_ID", "mimeType": "application/pdf"}' -o document.pdf
- 4.Repeat for all files or automate with a script loop
Use cases
- Back up an entire Google Drive folder to local storage
- Migrate files from Google Drive to another system
- Batch download project files for offline processing
- Export all documents in a folder as PDFs
- Archive team shared folders before deletion
- Google Workspace administrators
- Project managers managing shared drives
- Users migrating away from Google Drive
- Teams needing local backups of cloud content
recipe-bulk-download-folder FAQ
The folder ID is the unique identifier in the Google Drive URL. For a folder at drive.google.com/drive/folders/ABC123, the folder ID is ABC123.
Yes, specify the original filename in the -o parameter when running the get command.
Change the mimeType parameter: use application/pdf for PDF, application/vnd.openxmlformats-officedocument.wordprocessingml.document for DOCX, etc.
No, the list command only retrieves files directly in the specified folder. Subfolders must be processed separately with their own folder IDs.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: recipe-bulk-download-folder description: "List and download all files from a Google Drive folder." metadata: version: 0.22.5 openclaw: category: "recipe" domain: "productivity" requires: bins: - gws skills: - gws-drive
Bulk Download Drive Folder
PREREQUISITE: Load the following skills to execute this recipe:
gws-drive
List and download all files from a Google Drive folder.
Steps
- List files in folder:
gws drive files list --params '{"q": "'\''FOLDER_ID'\'' in parents"}' --format json - Download each file:
gws drive files get --params '{"fileId": "FILE_ID", "alt": "media"}' -o filename.ext - Export Google Docs as PDF:
gws drive files export --params '{"fileId": "FILE_ID", "mimeType": "application/pdf"}' -o document.pdf
Related skills
More from googleworkspace/cli and the wider catalog.
gws-gmail
Send, read, and manage Gmail emails via Google Workspace CLI.
gws-drive
Manage Google Drive files, folders, and shared drives via CLI.
gws-docs
Read and write Google Docs via command line.
gws-calendar
Manage Google Calendar events, calendars, and access control via CLI.
gws-sheets
Read and write Google Sheets spreadsheets via CLI.
gws-gmail-send
Send emails via Gmail with attachments, CC/BCC, HTML support, and draft options.