googleworkspace avatar

Recipe Backup Sheet As Csv

A straightforward recipe for getting your Google Sheets data out as CSV files. Shows three different approaches: using the Drive API export endpoint, getting spreadsheet metadata first, or reading values directly through the Sheets API. The direct read method with csv format is probably the cleanest for most use cases. Handy when you need local backups, want to process data with other tools, or just prefer working with CSV over the web interface. Requires the gws-sheets and gws-drive skills to handle the API calls.

skills.sh installs
31.7K
GitHub stars
32.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add googleworkspace/cli --skill recipe-backup-sheet-as-csv --agent claude-code

Installs into .claude/skills of the current project.

Files

Export a Google Sheet as CSV

PREREQUISITE: Load the following skills to execute this recipe: gws-sheets, gws-drive

Export a Google Sheets spreadsheet as a CSV file for local backup or processing.

Steps

  1. Get spreadsheet details: gws sheets spreadsheets get --params '{"spreadsheetId": "SHEET_ID"}'
  2. Export as CSV: gws drive files export --params '{"fileId": "SHEET_ID", "mimeType": "text/csv"}'
  3. Or read values directly: gws sheets +read --spreadsheet SHEET_ID --range 'Sheet1' --format csv

Sponsors

Details

Repository
github.com/googleworkspace/cli
Categories
CLI & Terminal, Office & Documents

More from googleworkspace/cli

All 113
1googleworkspace avatarrecipe-organize-drive-foldergoogleworkspace/cliCreate a Google Drive folder structure and move files into the right locations.31.7Kskills.sh installs
2googleworkspace avatarpersona-exec-assistantgoogleworkspace/cliManage an executive's schedule, inbox, and communications.31.6Kskills.sh installs
3googleworkspace avatarrecipe-find-free-timegoogleworkspace/cliQuery Google Calendar free/busy status for multiple users to find a meeting slot.31.5Kskills.sh installs
4googleworkspace avatarrecipe-compare-sheet-tabsgoogleworkspace/cliRead data from two tabs in a Google Sheet to compare and identify differences.31.5Kskills.sh installs
5googleworkspace avatarpersona-content-creatorgoogleworkspace/cliCreate, organize, and distribute content across Workspace.31.5Kskills.sh installs
6googleworkspace avatargws-events-renewgoogleworkspace/cliGoogle Workspace Events: Renew/reactivate Workspace Events subscriptions.31.5Kskills.sh installs