Claude Prompt Library

Google Sheets Workflows Claude Reasons Through

20 copy-paste prompts

20 Claude prompts for QUERY functions, Apps Script automations, data cleaning pipelines, and the multi-step Google Sheets problems where Claude's structured thinking helps.

In short: This page contains 20 copy-paste ready prompts, organized into 4 categories with a description and pro tip for each. The first 5 prompts are free instantly, no signup needed. Hand-curated and tested by the AI Academy team.

Louis Corneloup
By Louis Corneloup · Founder, Techpresso
Last updated ·Hand-curated & tested by the AI Academy team

Formulas & QUERY

5 prompts

QUERY Function Builder

1/20

✨ What it does

Builds SQL-like QUERY formulas with clauses explained and dynamic inputs.

<task>Write Google Sheets QUERY for [need]</task> <data_location>[range]</data_location> <columns>[describe]</columns> <output> 1. QUERY with SELECT/WHERE/GROUP BY/ORDER BY/LIMIT 2. Explain each clause 3. Dynamic inputs via concat 4. Non-QUERY alternative with FILTER/SORT 5. When QUERY beats pivot </output>

💡

Pro tip: QUERY is Sheets' secret weapon — essentially SQL inside a cell. Learn SELECT/WHERE/GROUP BY and you replace 80% of complex formulas.

ARRAYFORMULA Rewriter

2/20

✨ What it does

Rewrites dragged formulas into single ARRAYFORMULA cells with spill explanation.

<task>Convert dragged formula to ARRAYFORMULA</task> <formula>[paste]</formula> <range>[describe]</range> <output> 1. Single ARRAYFORMULA 2. How spill works 3. Functions that don't vectorize 4. Performance vs dragged </output>

💡

Pro tip: ARRAYFORMULA replaces 1,000 dragged cells with 1 cell. Maintainability skyrockets, performance improves, doesn't break when new rows add.

Complex Formula Builder

3/20

✨ What it does

Builds complex Sheets formulas with error handling and ARRAYFORMULA options.

<task>Build Google Sheets formula for [calculation]</task> <data>[describe]</data> <edge_cases>[blanks, errors]</edge_cases> <output> 1. Formula in Sheets syntax 2. Each part explained 3. IFERROR wrapping 4. ARRAYFORMULA version if helpful </output>

💡

Pro tip: Sheets formulas differ subtly from Excel — comma vs semicolon by locale, different array behavior. Specify locale if you hit syntax errors.

Advanced Lookup

4/20

✨ What it does

Builds multi-criteria lookups with fallback logic and performance notes.

<task>Build advanced lookup for [scenario]</task> <output> 1. XLOOKUP / FILTER / INDEX-MATCH as appropriate 2. Fallback for missing matches 3. Case sensitivity handling 4. Performance notes for large data </output>

💡

Pro tip: VLOOKUP in Sheets is obsolete. XLOOKUP handles errors better, works any direction. Switching is the biggest readability upgrade you can make.

IMPORTRANGE Setup

5/20

✨ What it does

Sets up IMPORTRANGE with authorization, errors, and Apps Script alternatives.

<task>Set up IMPORTRANGE between [source] and [target]</task> <output> 1. Formula 2. Authorization flow 3. Error handling 4. Rate limits 5. Apps Script alternative for reliability </output>

💡

Pro tip: IMPORTRANGE breaks silently on renames/permissions. For critical sheets, use Apps Script copy instead. One-click convenience isn't worth silent breakage.

Apps Script

5 prompts

Apps Script Generator

6/20

✨ What it does

Generates Apps Script with scopes, triggers, error handling, and test modes.

<task>Write Apps Script for [purpose]</task> <sheet_structure>[describe]</sheet_structure> <trigger>[manual / onEdit / time-driven]</trigger> <output> 1. Complete script with comments 2. Authorization scopes 3. Trigger setup 4. Error handling + logging 5. Dry-run test </output>

💡

Pro tip: Apps Script is Sheets' VBA, but cloud-native. Claude writes defensive scripts with try/catch + logging — far safer than most tutorial examples.

Custom Menu / Sidebar

7/20

✨ What it does

Builds custom menus turning Sheets into apps for non-technical users.

<task>Build custom menu for my sheet</task> <menu_items>[list]</menu_items> <output> 1. onOpen() function 2. Each action as function 3. Sidebar HTML if needed 4. Installation instructions </output>

💡

Pro tip: Custom menus make Sheets feel like apps. 20 minutes saves 100 "how do I run this?" questions from teammates.

Email Automation

8/20

✨ What it does

Automates sheet-driven emails with templates, quotas, and dry-run mode.

<task>Automate emails from sheet</task> <use_case>[describe]</use_case> <output> 1. MailApp/GmailApp script 2. Template with variable substitution 3. Quota management 4. Dry-run via logs 5. Kill-switch </output>

💡

Pro tip: Apps Script has 100-email quota on free / 1,500 on Workspace. Always dry-run first — one buggy script can blast your whole contact list.

Scheduled Refresh

9/20

✨ What it does

Builds scheduled refresh scripts with notifications, archival, and rate limits.

<task>Build scheduled refresh script</task> <source>[API / sheet / system]</source> <schedule>[describe]</schedule> <output> 1. Fetch/sync logic 2. Time trigger 3. Error notifications 4. Data archival 5. Rate limit handling </output>

💡

Pro tip: Scheduled scripts fail silently are worse than no automation. Always wrap in try/catch + email on failure. Knowing it broke beats the automation itself.

Two-Way Sync

10/20

✨ What it does

Designs two-way sync with conflict resolution, unique IDs, and audit logs.

<task>Design two-way sync between [A] and [B]</task> <fields>[list]</fields> <output> 1. Source of truth per scenario 2. Apps Script for both directions 3. Unique ID strategy 4. Conflict resolution 5. Audit log </output>

💡

Pro tip: Two-way sync is hard. Conflicts and deletions bite fast. If one side can be read-only, pick one-way. Only go two-way when truly necessary.

Data Transformation

5 prompts

REGEX Data Cleaner

11/20

✨ What it does

Cleans messy data with REGEX wrapped in ARRAYFORMULA for bulk application.

<task>Clean messy data with REGEX</task> <samples>[paste 5-10 rows]</samples> <issues>[describe]</issues> <output> 1. Cleaning sequence 2. REGEXEXTRACT/REGEXREPLACE formulas 3. ARRAYFORMULA application 4. Verification QUERY </output>

💡

Pro tip: REGEX unlocks most cleanup tasks — extracting emails from paragraphs, phone numbers from strings, dates from text. 30 minutes learning regex pays back 100×.

Duplicate Handling

12/20

✨ What it does

Detects and handles duplicates with flagging, merge strategy, and non-destructive output.

<task>Handle duplicates in [range]</task> <definition>[exact / fuzzy]</definition> <output> 1. QUERY/formula to flag duplicates 2. Merge strategy 3. Near-match handling 4. Output to clean sheet (preserve original) 5. Auto-dedupe script option </output>

💡

Pro tip: Never delete duplicates from original data. Copy to clean sheet first. Saves you when "those weren't duplicates" conversations happen.

Transformation Pipeline

13/20

✨ What it does

Builds multi-stage data pipelines with validation checkpoints and sheet layout.

<task>Build data pipeline from raw to analysis-ready</task> <raw>[describe]</raw> <target>[describe]</target> <output> 1. Transformations in order 2. Method per step 3. Sheet layout (Raw → Staging → Clean → Analysis) 4. Validation between stages 5. Refresh instructions </output>

💡

Pro tip: "One sheet per stage" is the winning pattern. Raw → Staging → Clean → Analysis. Mixing stages in one sheet makes debugging impossible.

Form Response Processor

14/20

✨ What it does

Processes Form responses with categorization, routing, and dashboard automation.

<task>Process Google Form submissions</task> <fields>[list]</fields> <actions>[auto-categorize / route / email]</actions> <output> 1. Response sheet formulas 2. onFormSubmit trigger 3. Conditional routing logic 4. Confirmation email 5. Dashboard summary </output>

💡

Pro tip: Forms + Sheets + Apps Script = free CRM / helpdesk / registration. Before paying SaaS, check if this combo solves 80% of your need. Usually does.

Performance Optimization

15/20

✨ What it does

Optimizes slow Sheets with formula replacement and BigQuery migration recommendations.

<task>Optimize slow Sheet</task> <size>[rows × cols]</size> <symptoms>[describe]</symptoms> <output> 1. Slow elements identified 2. Volatile formula replacements 3. When to split sheets 4. When to move to BigQuery Connected </output>

💡

Pro tip: Sheets comfortable max is ~5M cells. Past 1M rows, move to BigQuery + Connected Sheets. Keep UX; gain database performance.

These prompts give you the what. Tutorials give you the why.

Learn when to use extended thinking, how to build Claude Projects, and workflows that compound. 300+ tutorials and growing.

Try AI Academy Free

Dashboards & Sharing

5 prompts

Interactive Dashboard

16/20

✨ What it does

Builds interactive Sheet dashboards with drop-down slicers and mobile-safe design.

<task>Build dashboard in Sheets</task> <purpose>[describe]</purpose> <output> 1. Tab layout 2. KPI formulas / QUERY 3. Drop-down slicers with FILTER/QUERY 4. Chart design 5. Mobile view notes </output>

💡

Pro tip: Sheets lacks native slicers, but drop-downs + FILTER/QUERY approximate them. 90% as good, 100% as free.

BigQuery Connected Sheets

17/20

✨ What it does

Sets up Connected Sheets with BigQuery for massive-data analysis in Sheet UX.

<task>Set up Connected Sheets with BigQuery</task> <use_case>[describe]</use_case> <output> 1. BigQuery prep 2. Connection setup 3. Pivot/chart behavior 4. Refresh scheduling 5. Cost considerations </output>

💡

Pro tip: Connected Sheets is Google's best-kept Workspace secret. Analyze billions of rows in pivot tables. If your company uses BigQuery, this is non-negotiable.

Sheet Governance

18/20

✨ What it does

Sets up sheet governance with protection, permissions, and audit processes.

<task>Design governance for shared sheet</task> <team_size>[number]</team_size> <issues>[describe]</issues> <output> 1. Protected ranges strategy 2. Permission tiers 3. Named versions workflow 4. Edit alerts 5. "How to use" tab </output>

💡

Pro tip: Shared sheets without governance become graveyards. Lock formulas, open input ranges, name critical versions. 1 hour saves 100 broken-formula mysteries.

Slides Report Generator

19/20

✨ What it does

Automates Slides deck creation from Sheet data with template placeholders.

<task>Automate Slides from Sheet data</task> <output> 1. Apps Script reading sheet + writing Slides 2. Template with {{variable}} placeholders 3. Chart insertion (linked vs pasted) 4. Trigger + email delivery </output>

💡

Pro tip: Weekly executive decks that took hours become one-click buttons. Template once, automate once, save forever.

Mail Merge to Docs

20/20

✨ What it does

Builds Sheet-to-Docs mail merge with placeholders, organization, and delivery.

<task>Build mail merge Sheet → Docs/PDF</task> <use_case>[contracts / invoices / letters]</use_case> <output> 1. Apps Script generating one Doc per row 2. Placeholder replacement 3. File naming + folder organization 4. PDF conversion 5. Email delivery </output>

💡

Pro tip: Paid mail-merge tools charge $10-50/month for what Apps Script does free. Learn the pattern once, generate thousands of personalized docs in minutes.

Free tool

Formula Genie

Describe what you need and get the exact Excel or Google Sheets formula.

Try it free →

Frequently Asked Questions

Claude's step-by-step reasoning handles complex QUERY formulas, Apps Script debugging, and multi-step data transformations particularly well. It's also good at writing defensive Apps Script with proper error handling.
Yes, very reliably — with proper error handling, authorization scopes, and trigger setup. Always test in a copy first. Claude's defensive coding style prevents most runtime failures.
Particularly strong at QUERY — Claude thinks in structured SQL-like terms naturally. For complex QUERY formulas with multiple clauses, Claude outperforms quick references.
ARRAYFORMULA for applying a formula across a range. LAMBDA (via Name Manager) for reusable custom functions. Most power users combine both — ARRAYFORMULA wrapping LAMBDA calls.
Over 1M rows or multi-million-cell sheets. Connected Sheets keeps Sheet UX but moves computation to BigQuery. The migration is easier than most think — often an afternoon's work.

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.