CLAUDE LABJP
FORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as OctoberFORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as October
Articles/Cowork
Cowork/2026-05-03Intermediate

Claude in Chrome × Google Sheets — Automate Repetitive Tasks with Apps Script

A practical guide to generating and running Google Sheets Apps Script with Claude in Chrome. No programming experience required — automate data cleanup, aggregation, and conditional formatting in minutes.

claude-in-chrome4google-sheetsapps-scriptautomation95google-workspace

Do you find yourself doing the same spreadsheet work every month? Sorting rows, removing duplicates, rebuilding summary tables — that entire routine can be dramatically shortened by combining Claude in Chrome with Google Apps Script.

For me, the turning point was monthly GA4 reporting. Pulling data into a sheet and reformatting it used to take 30 to 40 minutes. After I started having Claude generate Apps Script for me, the same job now takes under five minutes. The code quality is solid, and Claude explains every line in plain English — so even if you've never written JavaScript, you understand what's about to happen before you run anything.

What Makes Claude in Chrome and Apps Script Such a Good Match

Google Sheets includes a built-in scripting environment called Apps Script — a JavaScript-based platform that lets you automate almost anything you'd do manually in a spreadsheet. You can delete rows, aggregate data across multiple sheets, format cells based on conditions, send emails, and even call external APIs. The catch is that you need to write code, which creates a barrier for most people.

Claude in Chrome removes that barrier entirely. With the extension installed, you get a Claude sidebar that lives inside your browser next to whatever page you have open — including Google Sheets. Describe your spreadsheet and what you want to automate, and Claude generates ready-to-run Apps Script code alongside a plain-language explanation of what the script does.

This is different from asking Claude in a general chat window. Because Claude can see the context you're working in (the page you have open, any text you highlight), the scripts it generates tend to be more precisely tailored to your actual situation rather than generic templates.

Setting Up: What You Need

Before starting, make sure you have:

  • The Claude in Chrome browser extension installed and signed in
  • A Google account with access to Google Sheets
  • No programming experience required — though understanding what your data looks like (column names, formats, sheet names) will help you give Claude better instructions

That's genuinely the full list. No API keys, no third-party tools, no developer setup.

Step-by-Step: From Request to Running Script

Open your Google Sheet in Chrome, then activate Claude in the side panel. Describe your sheet and your goal as specifically as you can.

The key to getting good code on the first try: mention column positions and data formats. Instead of "remove duplicates," say "Column A has dates in YYYY/MM/DD format, column B has product names, column C has sales amounts — remove rows where column B is duplicated, keeping the row with the highest value in column C."

Once Claude returns the code, open your spreadsheet's Extensions → Apps Script, paste it into the editor, and click Run.

// Remove duplicate rows, keeping the row with the highest value in column C
// Claude generates code like this based on your description
function removeDuplicatesKeepHighest() {
  const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  const data = sheet.getDataRange().getValues();
  const header = data[0];
  const rows = data.slice(1);
 
  // Group rows by column B value, track the highest column C within each group
  const grouped = {};
  for (const row of rows) {
    const key = row[1]; // Column B
    const value = row[2]; // Column C
    if (!grouped[key] || value > grouped[key][2]) {
      grouped[key] = row;
    }
  }
 
  const result = [header, ...Object.values(grouped)];
 
  sheet.clearContents();
  sheet.getRange(1, 1, result.length, result[0].length).setValues(result);
  SpreadsheetApp.getUi().alert(`Done. Kept ${result.length - 1} unique rows.`);
}

The first time you run a script, Google asks you to authorize it. You'll see a warning that the app isn't verified by Google — that's normal for scripts you create yourself. Click Advanced → Go to (your project name) (unsafe) to proceed. This only happens once per project.

Practical Example 1: Automatic Monthly Aggregation

You have daily sales entries piling up in Sheet1 and want monthly totals automatically written to Sheet2 — including new rows as new months appear. Tell Claude exactly that:

"Sheet1 has daily records with dates in column A (YYYY/MM/DD) and revenue in column B. Write a script that calculates monthly totals and writes them to Sheet2. Add new rows for new months automatically, and sort by date ascending."

Claude will typically generate a loop-based approach that extracts the year-month from each date, accumulates totals, and writes the results in one pass. Ask it to explain the output format (what columns Sheet2 will have, how dates will appear) before running it, so you can verify it matches what you need.

Practical Example 2: Conditional Highlighting for Anomalies

"Highlight rows where this month's revenue dropped more than 20% compared to last month" is the kind of sentence most people would never think to turn into code — but Claude handles it naturally:

// Highlight rows with a significant month-over-month decline
function highlightDeclines() {
  const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  const lastRow = sheet.getLastRow();
 
  for (let i = 3; i <= lastRow; i++) { // Assumes data starts at row 3
    const current  = sheet.getRange(i, 3).getValue(); // Column C: this month
    const previous = sheet.getRange(i, 2).getValue(); // Column B: last month
 
    if (previous > 0 && (current - previous) / previous < -0.2) {
      // More than 20% decline — highlight in light red
      sheet.getRange(i, 1, 1, sheet.getLastColumn())
        .setBackground('#FFCCCC');
    } else {
      // No significant decline — clear any previous highlight
      sheet.getRange(i, 1, 1, sheet.getLastColumn())
        .setBackground(null);
    }
  }
  SpreadsheetApp.getUi().alert('Highlighting complete.');
}

One habit that's worth building: before running any script Claude generates, ask it "In plain English, what data does this script read, what does it change, and can it be undone?" If the answer involves clearContents() or overwriting cells, make sure you have a backup copy first.

Practical Example 3: Sending a Summary Email on a Schedule

Apps Script can be triggered automatically — for example, sending a weekly summary email every Monday morning. You don't need to write a cron job or run anything manually.

Tell Claude: "Write a script that reads the totals from Sheet2 (columns A and B), formats them as a simple table, and emails the summary to my address every Monday at 9 AM. Include instructions for setting up the trigger."

Claude will write the script and walk you through Apps Script's built-in trigger system (Extensions → Apps Script → Triggers). The setup takes about two minutes and then runs without any further input from you.

Limitations Worth Knowing

6-minute execution limit. Apps Script enforces a hard time limit per run. For large datasets (tens of thousands of rows), scripts may time out mid-process. When that happens, tell Claude to "rewrite this with batch processing to stay within the 6-minute Apps Script limit" — it will split the work into smaller chunks that can run in sequence.

Permission scopes. Scripts that send email or call external services require broader permissions than read-only scripts. Claude will explain what each requested scope does if you ask. It's worth asking before approving anything unfamiliar.

No real-time triggers on free Google accounts. Time-based triggers (like the weekly email above) work on both free and Workspace accounts, but certain event-based triggers have limitations on personal accounts. Claude can clarify what's available in your specific account type.

If you want to go further with Cowork automation, the Skill × Schedule design patterns guide covers structuring recurring workflows, and the Gmail automation walkthrough shows how to bring email management into the same system.

What to Ask Claude: Phrasing That Gets Better Results

The way you frame a request makes a noticeable difference in code quality. A few patterns that consistently work well:

  • State the data format explicitly. "Dates in YYYY/MM/DD format in column A" is more useful than "dates in column A."
  • Describe the desired output, not just the input. "I want Sheet2 to have one row per month with columns for month, total revenue, and transaction count" gives Claude the full picture.
  • Mention edge cases you already know about. "Some rows in column B might be empty — skip those" prevents the most common source of script errors.
  • Ask for a dry-run version first. "Write a version that logs what it would change without actually modifying the sheet" lets you verify the logic before committing to it.

When something does go wrong (a script errors out, or produces unexpected output), paste the error message into Claude and describe what you expected instead. The debugging loop — error message, explanation, corrected code — usually resolves issues in one or two exchanges.

Your First Script, Starting Today

The lowest-stakes starting point is a script that doesn't modify data — something like listing all unique values in a column, or counting how many rows match a condition. Ask Claude to write one of those first, run it, verify the output, and then move on to scripts that actually change your sheet.

Once you've seen a working script run and produce the right result, the mental model clicks: Claude generates the code, you review and authorize it, the spreadsheet does the work. The combination handles a surprisingly large share of repetitive spreadsheet tasks — and the time it saves compounds fast once you start applying it consistently.

The first script takes five minutes to set up. The second one takes two.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

Cowork2026-04-11
Automate App Store Connect with Claude in Chrome — Metadata, Reviews, and ASO Optimization
Learn how to use Claude in Chrome with App Store Connect to automate iOS app metadata updates, review replies, and ASO optimization. A practical guide for indie developers looking to cut down on store management overhead.
Cowork2026-07-17
It Worked on My Machine, but Nobody Could Trigger It — Four Assumptions I Stripped Out of a Cowork Plugin
I bundled four working automation skills into a plugin and shared it. Only one of them ever fired. Here is how I measured skill trigger rate, and the four assumptions — vocabulary, paths, connections, and naming — I had to strip out before it was portable.
Cowork2026-07-05
The Two Weeks My Web Monitor Said Everything Was Fine — Field Notes on Catching Silent Misses
A competitor monitor built on Cowork and Claude in Chrome can keep reporting no changes while quietly missing them. Here is how I separated fetch success from extraction success and instrumented the silent failures, with the code I actually run.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →