$npx -y skills add googleworkspace/cli --skill recipe-generate-report-from-sheetRead data from a Google Sheet and create a formatted Google Docs report.
| 1 | # Generate a Google Docs Report from Sheet Data |
| 2 | |
| 3 | > **PREREQUISITE:** Load the following skills to execute this recipe: `gws-sheets`, `gws-docs`, `gws-drive` |
| 4 | |
| 5 | Read data from a Google Sheet and create a formatted Google Docs report. |
| 6 | |
| 7 | ## Steps |
| 8 | |
| 9 | 1. Read the data: `gws sheets +read --spreadsheet SHEET_ID --range "Sales!A1:D"` |
| 10 | 2. Create the report doc: `gws docs documents create --json '{"title": "Sales Report - January 2025"}'` |
| 11 | 3. Write the report: `gws docs +write --document-id DOC_ID --text '## Sales Report - January 2025 |
| 12 | |
| 13 | ### Summary |
| 14 | Total deals: 45 |
| 15 | Revenue: $125,000 |
| 16 | |
| 17 | ### Top Deals |
| 18 | 1. Acme Corp - $25,000 |
| 19 | 2. Widget Inc - $18,000'` |
| 20 | 4. Share with stakeholders: `gws drive permissions create --params '{"fileId": "DOC_ID"}' --json '{"role": "reader", "type": "user", "emailAddress": "cfo@company.com"}'` |