Loading...
Loading...
Comprehensive guide for Google Apps Script development covering all built-in services (SpreadsheetApp, DocumentApp, GmailApp, DriveApp, CalendarApp, FormApp, SlidesApp), triggers, authorization, error handling, and performance optimization. Use when automating Google Sheets operations, creating Google Docs, managing Gmail/email, working with Google Drive files, automating Calendar events, implementing triggers (time-based, event-based), building custom functions, creating add-ons, handling OAuth scopes, optimizing Apps Script performance, working with UrlFetchApp for API calls, using PropertiesService for persistent storage, or implementing CacheService for temporary data. Covers batch operations, error recovery, and JavaScript ES6+ runtime.
npx skill4agent add henkisdabro/wookstar-claude-plugins google-apps-scriptfunction generateWeeklyReport() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheetByName('Data');
const data = sheet.getRange('A2:D').getValues();
const report = data.filter(row => row[0]);
const summarySheet = ss.getSheetByName('Summary') || ss.insertSheet('Summary');
summarySheet.clear();
summarySheet.appendRow(['Name', 'Value', 'Status']);
report.forEach(row => summarySheet.appendRow([row[0], row[1], row[2]]));
MailApp.sendEmail({
to: Session.getEffectiveUser().getEmail(),
subject: 'Weekly Report Generated',
body: `Report generated with ${report.length} records.`
});
}appscript.jsonscripts/Logger.log()| Issue | Solution |
|---|---|
| Execution timeout | Split work into smaller batches or use multiple triggers |
| Authorisation error | Check OAuth scopes in manifest file |
| Quota exceeded | Reduce API call frequency, use caching |
| Null reference error | Validate objects exist before accessing properties |