This skill helps you automate Google Workspace tasks with Apps Script, enabling efficient management of Sheets, Docs, Gmail, Drive, Calendar, and more.
npx playbooks add skill henkisdabro/wookstar-claude-plugins --skill google-apps-script
Server-side JavaScript that runs on Google's infrastructure with built-in, auto-authorised services for Workspace. V8 is the only runtime: Rhino was shut down on 31 January 2026, so write modern JavaScript (const/let, arrow functions, classes, template literals, destructuring) and set "runtimeVersion": "V8" in appsscript.json if a legacy manifest still says DEPRECATED_ES5.
getActiveSpreadsheet() / getActiveDocument() and simple triggers (onOpen, onEdit). Standalone scripts and anything run from a time trigger must open files by ID or URL. Done when every file access in the plan uses a call that works in the chosen binding.getValues(), transform in memory, write back once with setValues(). Cache expensive lookups with CacheService and persist config or cursors with PropertiesService. Done when no getValue/setValue/appendRow sits inside a loop over rows.ScriptApp.newTrigger(...), delete existing triggers for the same handler so re-running setup never duplicates them. Done when running the setup function twice leaves one trigger per handler.oauthScopes explicitly in appsscript.json, preferring spreadsheets.currentonly, drive.file and script.send_mail over their broad counterparts. Done when every scope in the manifest maps to a call the script makes.console.error (it reaches Cloud Logging with severity), and notify by email or an error sheet - a failed time trigger is otherwise silent. Done when every trigger handler has a catch that records the error somewhere a human will see it.function generateWeeklyReport() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const rows = ss.getSheetByName('Data').getRange('A2:C').getValues()
.filter(row => row[0]);
const summary = ss.getSheetByName('Summary') || ss.insertSheet('Summary');
summary.clear();
const out = [['Name', 'Value', 'Status'], ...rows];
summary.getRange(1, 1, out.length, out[0].length).setValues(out);
MailApp.sendEmail({
to: Session.getEffectiveUser().getEmail(),
subject: 'Weekly report generated',
body: `Report generated with ${rows.length} records.`
});
}
script.send_mail scope; reach for GmailApp when the script also reads, searches, labels or drafts.onOpen, onEdit) run without authorisation, so they cannot send mail or open other files; use an installable trigger for that..clasp.json holds the scriptId and rootDir; clasp push uploads .js/.gs and appsscript.json.scripts/validators.py checks spreadsheet IDs, A1 notation (including open-ended ranges like A2:D), sheet names, cell values and the 10-million-cell limit before you hard-code them. Run with python3 "${CLAUDE_SKILL_DIR}/scripts/validators.py" for a self-test, or import its functions.
assets/spreadsheet-automation-template.js and assets/trigger-setup-template.js - copy as a starting point for a new Sheets automation or trigger manager.Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.