Help CenterUse Cases / Spreadsheet Operations

AppScript Mode: Build Custom Automations and Buttons in Google Sheets

Overview

By default, SheetXAI's chatbot runs in Agent Mode — when it needs to run a script to complete your request, it executes that script for you automatically and you never see the underlying code.

AppScript Mode is different: switch to it when you want SheetXAI to hand you the raw Google Apps Script code so you install and run it yourself. Use AppScript Mode when you want:

  • A scheduled/recurring automation that keeps running even when the sheet is closed (e.g. "deduplicate column D every time new data comes in")
  • An interactive button or UI element added to your sheet
  • Any script you want to see, keep, edit, or reuse yourself

How To Use It

Step 1: Switch to AppScript Mode

In SheetXAI, switch the chat mode to AppScript.

Step 2: Describe what you want

Tell it in plain English, for example:

"Whenever any data gets written, deduplicate column D."

or:

"Add a button that adds the current row's data to a Master List sheet."

SheetXAI will generate the corresponding Google Apps Script code — and its reply will also walk you through exactly what to do with it.

Step 3: Follow the instructions SheetXAI gives you

SheetXAI's reply tells you where to paste the code (Extensions → Apps Script in your spreadsheet) and, if what you asked for needs it, how to set it up from there — a time-driven trigger for scheduled/recurring automation, or a button wired up to run it on click. Just follow those instructions as given; they're tailored to what you asked for.

AppScript Mode vs. Agent Mode

Agent Mode (default)AppScript Mode
Who runs the scriptSheetXAI, automaticallyYou, after pasting it into Apps Script
Do you see the codeNoYes
Keeps running with sheet closedNoYes, if set up with a time-driven trigger
Best forOne-off requests, no manual stepsRecurring automation, buttons, anything you want to own/reuse

Last updated on 2026-08-08