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 script | SheetXAI, automatically | You, after pasting it into Apps Script |
| Do you see the code | No | Yes |
| Keeps running with sheet closed | No | Yes, if set up with a time-driven trigger |
| Best for | One-off requests, no manual steps | Recurring automation, buttons, anything you want to own/reuse |
Related Guides
- Automating Google Sheets Without Formulas or Code Using SheetXAI — for chat-driven conditional automation (sheet must stay open)
- Automating Content Generation in Google Sheets with SheetXAI
- VBA Mode: Build Custom Macros and Buttons in Excel — the Excel equivalent