Skip to content
Back to skills

1228 Patterns 73fdd9ee

ASecurity

Reusable patterns for typical Google Apps Script automation scenarios.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentjavascriptgojavaapi

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 1228-patterns_73fdd9ee --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1228 Patterns 73fdd9ee?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1228 Patterns 73fdd9ee
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1228-patterns-73fdd9ee/badge)](https://www.skillsdirectory.com/skills/tools-only-1228-patterns-73fdd9ee)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Google Apps Script - Common Patterns

Reusable patterns for typical Google Apps Script automation scenarios.

## Pattern: Spreadsheet Data Validation

```javascript
function setupDataValidation() {
  const sheet = SpreadsheetApp.getActiveSheet();
  const range = sheet.getRange('A2:A100');

  // Create dropdown rule
  const rule = SpreadsheetApp.newDataValidation()
    .requireValueInList(['Option 1', 'Option 2', 'Option 3'])
    .setAllowInvalid(false)
    .build();

  range.setDataValidation(rule);
}
```

## Pattern: Retry Logic for API Calls

```javascript
function fetchWithRetry(url, maxRetries = 3) {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    try {
      const response = UrlFetchApp.fetch(url);
      return JSON.parse(response.getContentText());
    } catch (error) {
      if (attempt === maxRetries) {
        throw error;
      }
      Utilities.sleep(Math.pow(2, attempt) * 1000);  // Exponential backoff
    }
  }
}
```

## Pattern: Form Response Processing

```javascript
function onFormSubmit(e) {
  const response = e.values;  // Form responses
  const email = response[1];  // Assuming email is column B
  const name = response[2];   // Name in column C

  // Send confirmation email
  MailApp.sendEmail({
    to: email,
    subject: 'Form Submission Received',
    body: `Hi ${name},\n\nThank you for your submission.`
  });

  // Log to separate sheet
  const ss = SpreadsheetApp.getActiveSpreadsheet();
  const logSheet = ss.getSheetByName('Processed') || ss.insertSheet('Processed');
  logSheet.appendRow([new Date(), name, email, 'Processed']);
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.