$npx -y skills add adityahimaone/hermes-agent-rtk-caveman --skill zenith-finance-gsheets-syncSynchronize Zenith Finance ledger and transactions to Google Sheets with automatic updates. Creates/maintains a spreadsheet with Dashboard (summary, charts) and History (full transaction log) sheets.
| 1 | # Zenith Finance → Google Sheets Sync |
| 2 | |
| 3 | Automatically syncs Zenith Finance data (Ledger.md and Transactions.md) to a Google Spreadsheet for dashboard visualization and historical tracking. |
| 4 | |
| 5 | ## Trigger |
| 6 | - User mentions "sync zenith to sheets", "google sheets zenith", "export finance to sheets" |
| 7 | - After any Zenith Finance transaction update (can be called automatically) |
| 8 | - Manual sync request |
| 9 | ## Prerequisites\\n1. Google Workspace OAuth setup completed (google-workspace skill authenticated) with scope including `https://www.googleapis.com/auth/drive`\\n2. Google Sheets API and Google Drive API enabled in Google Cloud project\\n3. Zenith Finance data files exist:\\n - `~/Documents/Obsidian/Notes/Finance/Ledger.md`\\n - `~/Documents/Obsidian/Notes/Finance/Transactions.md`\\n4. **Optional but recommended**: Download a copy of the Google Sheet for manual verification if needed (as user did with `/Users/adityahimawan/Downloads/Zenith Finance Dashboard (4).xlsx`)\n |
| 10 | |
| 11 | ## Storage |
| 12 | - Spreadsheet ID stored at: `~/.hermes/zenith_spreadsheet_id.txt` |
| 13 | - If no ID exists, creates new spreadsheet named "Zenith Finance Dashboard" |
| 14 | |
| 15 | ## Sheets Structure |
| 16 | 1. **Dashboard** (first sheet): Summary metrics and charts |
| 17 | - Detailed metrics and formulas as specified in the JSON structure |
| 18 | 2. **History** (second sheet): Full transaction log |
| 19 | - Columns: Timestamp, Description, Amount, Income/Expense, Category, Source, Balance |
| 20 | - Append-only format matching Transactions.md |
| 21 | 3. **Category** (third sheet): Category list for reference |
| 22 | - Single column list of transaction categories (A1:A9) |
| 23 | - Used for data validation and reference |
| 24 | |
| 25 | ### Dashboard Metrics Specification |
| 26 | Based on the provided JSON structure, the Dashboard sheet should be updated with exact cell positions: |
| 27 | |
| 28 | **Key Metrics:** |
| 29 | - B2: "Metric" / C2: "Value" (header) |
| 30 | - B3: "Total Income" / C3: `=SUMIFS(History!C:C, History!D:D, "Income")` |
| 31 | - B4: "Total Expenses" / C4: `=SUMIFS(History!C:C, History!D:D, "Expense")` |
| 32 | - B5: "Net Savings" / C5: `=C3-C4` |
| 33 | - B6: "Last Updated Now" / C6: `=NOW()` |
| 34 | - B7: "Last Updated" / C7: [static timestamp from last sync] |
| 35 | - B9: "ACCOUNT BALANCES" / C9: "Value" (header) |
| 36 | |
| 37 | **Account Balance Formulas (B10:B15 label, C10:C15 value):** |
| 38 | - B10: "BCA (Main Bank)" / C10: `=SUMIFS(History!C:C, History!F:F, B10, History!D:D, "Income") - SUMIFS(History!C:C, History!F:F, B10, History!D:D, "Expense")` |
| 39 | - B11: "Blu (Digital Bank)" / C11: `=SUMIFS(History!C:C, History!F:F, B11, History!D:D, "Income") - SUMIFS(History!C:C, History!F:F, B11, History!D:D, "Expense")` |
| 40 | - B12: "Gopay (E-Wallet)" / C12: `=SUMIFS(History!C:C, History!F:F, B12, History!D:D, "Income") - SUMIFS(History!C:C, History!F:F, B12, History!D:D, "Expense")` |
| 41 | - B13: "Dompet (Cash on Hand)" / C13: `=SUMIFS(History!C:C, History!F:F, B13, History!D:D, "Income") - SUMIFS(History!C:C, History!F:F, B13, History!D:D, "Expense")` |
| 42 | - B14: "RDN (Saham)" / C14: `=SUMIFS(History!C:C, History!F:F, B14, History!D:D, "Income") - SUMIFS(History!C:C, History!F:F, B14, History!D:D, "Expense")` |
| 43 | - B15: "Emas (Tabungan)" / C15: `=SUMIFS(History!C:C, History!F:F, B15, History!D:D, "Income") - SUMIFS(History!C:C, History!F:F, B15, History!D:D, "Expense")` |
| 44 | |
| 45 | **Derived Metrics:** |
| 46 | - B16: "Total Liquid Assets" / C16: `=SUM(C10:C15)` |
| 47 | |
| 48 | **Monthly Summary (B18:B21):** |
| 49 | - B18: `="MONTHLY SUMMARY (" & TEXT(TODAY(), "mmmm") & ")"` / C18: "Value" (header) |
| 50 | - B19: "Monthly Income" / C19: Complex FILTER/SUM formula for current month |
| 51 | - B20: "Monthly Expenses" / C20: Complex FILTER/SUM formula for current month |
| 52 | - B21: "Monthly Net Savings" / C21: `=C19-C20` |
| 53 | |
| 54 | **Category Summary (B23 onward):** |
| 55 | - B23: "CATEGORY SUMMARY" / C23: "Value" (header) |
| 56 | - B24: Array formula for category-based calculations |
| 57 | - B25:B32: Individual category totals (Expense, Entertainment, Transport, Food, Salary, Other Income, Work) |
| 58 | |
| 59 | ## Workflow |
| 60 | 1. **Auth Check**: Verify Google OAuth token is valid and has required scopes |
| 61 | 2. **Spreadsheet ID**: Load existing ID or create new spreadsheet |
| 62 | 3. **Sheet Setup**: Ensure Dashboard and History sheets exist (rename default sheet to History, add Dashboard) |
| 63 | 4. **Data Extraction**: Parse Ledger.md and Transactions.md |
| 64 | 5. **Update Sheets**: |
| 65 | - Dashboard: Update account balances and summary formulas |
| 66 | - History: Append new transactions since last sync |
| 67 | 6. **Verification**: Confirm update success |
| 68 | |
| 69 | ## Detailed Steps\n\n### 1. Authentication Validation\n```bash\n# Check if authenticated (adjust path if needed)\npython3 /Users/adityahimawan/.hermes/skills/productivity/google-workspace/scripts/setup.py --check\n# Should return: AUTHENTICATED\n# \n# Note: If your Hermes installati |