
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.
$ npx -y skills add googleworkspace/cli --skill recipe-backup-sheet-as-csv --agent claude-codeInstalls into .claude/skills of the current project.
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.
gws sheets spreadsheets get --params '{"spreadsheetId": "SHEET_ID"}'gws drive files export --params '{"fileId": "SHEET_ID", "mimeType": "text/csv"}'gws sheets +read --spreadsheet SHEET_ID --range 'Sheet1' --format csvSponsors