
- Updated
Automate Google Sheets with Apps Script
This prompt writes a Google Apps Script for your sheet, such as a daily email of rows due today. It adds a menu item to run it by hand, an optional timed trigger and clear steps to test it on a copy.
Act as a Google Apps Script expert. My sheet: [DESCRIBE THE TABS AND COLUMNS] What I want automated: [e.g. every morning, email me rows where due date is today] Write the full script with comments, a menu item to run it by hand, and a time-driven trigger if it should run on its own. Handle empty rows and bad dates. Tell me exactly where to paste the code, what permissions Google will ask for and why, and how to test it on a copy of the sheet first.
Test on a copy of your sheet. Scripts can change many rows at once, and undo does not always catch it.
Get a better result
A complete commented script with a menu item to run it by hand and a trigger if needed, which handles empty rows and bad dates, plus instructions on where to paste it, what permissions it asks for and how to test it.
The script cannot find your columns.
Fix: List the tab names and column headings exactly as they appear, including spaces and capitals. Paste a few sample rows.
- It runs but sends too many emails. Ask for a small test mode that logs what it would send instead of sending, and use a copy of the sheet first.
- Google shows a scary permission warning. Ask the AI to explain each permission in your script. Only accept scopes that match what the script does.
Ask for “a Log tab that records the time, the rows touched and any errors on each run”. It makes problems easy to trace when the script runs on its own.
Add a test mode that writes the planned actions into a new tab and sends nothing. Then show how to switch it off.
Guides on this topic
More chat & writing prompts
See all 465 →More like this
- Add secure login to a web appClaude · ChatGPT · Gemini
- Write Google Ads copyChatGPT · Gemini · Claude
- Write a Dockerfile for your appClaude · ChatGPT · Claude Code
- Build a small command-line toolClaude · ChatGPT · Gemini
- Build a simple Chrome extensionClaude · ChatGPT · Gemini



