ChatGPT Prompts for Google Apps Script
20 copy-paste ChatGPT prompts for Apps Script: automation across Workspace, custom Sheets functions, Gmail automation, calendar workflows, and the JavaScript-based scripts that extend Workspace.
Sheets Automation
4 promptsCustom Sheets Function
1/20Custom Sheets function for [calculation/transformation]. Output: Apps Script code, JSDoc comments, parameters, return type, error handling, deployment as custom function. Test before relying.
Writes custom Sheets functions.
Pro tip: Custom functions extend Sheets formula language. Same as VLOOKUP but yours. JSDoc comments = autocomplete in Sheets. Documentation = usability.
Sheet onEdit Trigger
2/20Apps Script onEdit trigger for [behavior]. Trigger: when [condition met], do [action]. Output: code with event handling, condition check, action execution, error handling. Watch out for trigger loops.
Builds onEdit triggers.
Pro tip: onEdit fires on EVERY edit. Filter by sheet/range/value to avoid running on irrelevant edits. Unfiltered triggers = performance problem + quota exceeded.
Daily/Scheduled Trigger
3/20Time-based trigger for [task — daily summary email, weekly cleanup]. Output: trigger setup code, function logic, frequency, time zone considerations, monitoring (script email on error). Set-and-forget automation.
Builds time-based triggers.
Pro tip: Apps Script time triggers = scheduled tasks. "Send weekly summary every Monday 9am" = code + trigger + done. Most users do this manually forever.
Sheet Data Cleanup Script
4/20Apps Script to clean [paste data structure]. Cleanup: trim whitespace, standardize case, remove duplicates, format dates, fill missing values. Run on demand or schedule. Manual cleanup = repetitive.
Cleans sheet data via script.
Pro tip: Manual data cleanup = 30 min weekly for some teams. Script = 0 min after setup. Compounded time savings; classic Apps Script use case.
Prompts get you started. Tutorials level you up.
A growing library of 300+ hands-on AI tutorials. New tutorials added every week.
Gmail + Calendar
4 promptsGmail Auto-Label Script
5/20Auto-label Gmail emails matching [criteria]. Beyond Gmail filters (which are limited). Output: Apps Script code, criteria check, labeling, archive option, daily run frequency. Power-user inbox automation.
Auto-labels Gmail via script.
Pro tip: Gmail filters limited (no regex, no complex logic). Apps Script = full programmability. Combine with filters for sophisticated inbox routing.
Email-to-Sheet Logger
6/20Log emails matching [criteria] to Google Sheet. Output: Apps Script that reads Gmail (filter), extracts data, appends to Sheet, deduplicates, runs on schedule. Email-data → analysis.
Logs Gmail to Sheets.
Pro tip: Patterns in email (e.g., support tickets, lead inquiries) = data. Logging to Sheet = analyzable. Most teams have email patterns + don't analyze.
Calendar Event Bulk Create
7/20Bulk create Calendar events from Sheet data. Output: read sheet rows, create event per row (title, time, description, attendees), error handling per row, summary email. Mass scheduling.
Bulk creates calendar events.
Pro tip: Manual creation of 50 events = hours. Sheet + script = minutes. Use for: training schedules, recurring 1:1 setups, customer onboarding.
Calendar Conflict Detector
8/20Apps Script to detect calendar conflicts. Output: scan calendar for overlapping events, highlight conflicts, email summary, integration with team calendars. Conflicts = double-booking risk.
Detects calendar conflicts.
Pro tip: Calendar visible only one at a time = conflicts hide. Script scanning + alerting = preemptive. Especially useful when managing multiple calendars (work + personal).
Cross-App Workflows
4 promptsForm → Email Notification
9/20Form submission triggers personalized email. Output: Apps Script onFormSubmit handler, parse response, compose email per response, send, error handling. Replaces basic form notifications.
Sends form-trigger emails.
Pro tip: Default form notification = generic. Custom email per response = personalized acknowledgment + relevant follow-up. Better experience for respondents.
Sheet → Calendar Sync
10/20Sync Sheet rows to Calendar events. Output: read sheet (project deadlines, milestones), create/update events, handle deletions, two-way sync if needed, schedule. Sheet-as-source-of-truth pattern.
Syncs Sheets to Calendar.
Pro tip: Project deadlines in Sheet + sync to calendar = visibility. Without sync = team forgets. Sheet edit → calendar update = always current.
Doc Template Auto-Generation
11/20Generate Google Docs from template + data. Output: Apps Script reading data (Sheet/Form), copying template, replacing placeholders, saving to Drive folder, naming convention, link return. Mass doc generation.
Auto-generates docs from templates.
Pro tip: Mass document generation (proposals, reports, certificates) = hours manual. Template + script = minutes. Replace placeholders + save = scaled output.
Slack/Teams Integration via Webhook
12/20Apps Script post to Slack/Teams via webhook. Output: webhook URL setup, payload format (markdown), trigger logic (event-driven), error handling. Workspace events → chat notifications.
Integrates Workspace with chat.
Pro tip: Form submitted → Slack channel notified = real-time team awareness. Cell changed → Teams alert = trigger-based notifications. Cross-tool integration via webhook.
Like these prompts? There are full tutorials behind them.
Learn the workflows, not just the prompts. 300+ easy-to-follow tutorials inside AI Academy — and growing every week.
Advanced + Best Practice
4 promptsApps Script Project Structure
13/20Structure Apps Script project for [size]. Output: file organization (separate utilities, triggers, services), naming convention, library use (shared code), version management. Most scripts grow ad-hoc.
Structures Apps Script projects.
Pro tip: One-file scripts work for 50 lines. Beyond = file structure prevents chaos. Separate concerns: triggers, utilities, services. Future you thanks past you.
Error Handling + Logging
14/20Add robust error handling to Apps Script. Output: try/catch pattern, Logger.log for debug, console.log for Cloud Logging, email on error, retry logic. Production scripts need this.
Adds error handling.
Pro tip: Default scripts fail silently. Try/catch + logging + alert = production-grade. Most user scripts skip; production scripts require.
Quota + Performance
15/20[Paste slow Apps Script]. Optimize: batch sheet operations (getValues + setValues > one cell at a time), avoid sleep, use built-in services efficiently, monitor execution time. Quota: 6 min/script default.
Optimizes Apps Script performance.
Pro tip: Apps Script quota: 6 min execution. Slow scripts = timeout. Batch operations (read all values at once, transform in memory, write all at once) = 10-100x speedup.
Sharing + Deployment
16/20Share Apps Script with team. Options: bound to spreadsheet, standalone, library. Output: when each appropriate, deployment as add-on, sharing permissions, version control. Sharing strategy matters.
Plans Apps Script sharing.
Pro tip: Bound script = lives with one Sheet. Standalone = reusable. Library = shared code across scripts. Choose intentionally; conversion is hard later.
Frequently Asked Questions
Prompts are the starting line. Tutorials are the finish.
A growing library of 300+ hands-on tutorials on ChatGPT, Claude, Midjourney, and 50+ AI tools. New tutorials added every week.
7-day free trial. Cancel anytime.