@sysa-ivan/gas-helpers
v1.3.0
Published
Helper utilities for Google Apps Script: UI dialogs, triggers, Telegram notifications, Entity/Repository for Sheets (TableRepository for named Tables + Sheets advanced service)
Maintainers
Readme
gas-helpers
Helper utilities for Google Apps Script: UI, triggers, Telegram notifications, Google Sheets (Entity, Repository, TableRepository for named tables via the Sheets API).
For AI agents: See AGENTS.md for imports, patterns, and GAS caveats.
Installation
npm install gas-helpersModules
| Module | Description | | ---------------------------------------- | ------------------------------------------------------------------------------------------ | | ui | Spreadsheet UI dialogs (alert, confirm, prompt) with availability check | | triggers | Managing time-based triggers in Google Apps Script | | telegram | Sending notifications to Telegram via Bot API | | sheet | Entity, Repository (whole tab), TableRepository (Insert → Table + Sheets advanced service) | | properties | ScriptProperty for typed key-value storage in script properties |
Requirements
- Google Apps Script
@types/google-apps-script(peer dependency)
Common Pitfalls
- Ui unavailable: When script runs from a trigger,
onEdit, or time-driven execution,SpreadsheetApp.getUi()throws. Always useUi.isAvailable()beforealert,confirm,prompt. - Secrets: Store
botTokeninPropertiesService.getScriptProperties(), not in source code. - Entity columns: Column indices are 0-based (same as array indices).
- TableRepository: Requires the Google Sheets advanced service enabled in the Apps Script project (Editor → Services / + Google Sheets API). Uses the REST Sheets API (
Sheets.Spreadsheets) for table metadata and some row operations; bindsheetNameto the table name from the Sheets UI, not necessarily the worksheet tab title.
License
ISC
