Custom Operations menu
onOpen in the bound script adds a menu to this workbook only, calling functions that format the active tab.
A bound script, also called a container-bound script, lives inside a specific spreadsheet file. You open it from Extensions > Apps Script and it travels with that workbook. getActiveSpreadsheet() works naturally because the script and sheet share one container. Most spreadsheet automations beginners build are bound scripts.
Use a bound script when automation belongs to one workbook: custom menus, onEdit on that file, form responses tab, or a web app backed by that sheet data.
Choose a standalone script when one codebase must manage many spreadsheets by ID, or when you publish a workspace add-on not tied to a single file.
Open Extensions > Apps Script from the target spreadsheet to create or edit the bound project.
The script project ID is linked to this file in Drive, not floating alone in My Drive unless copied.
Simple triggers onEdit and onOpen run in the context of this spreadsheet.
Deploy web apps from the bound project; they usually read the parent sheet via getActiveSpreadsheet or openById on the parent.
Copying the spreadsheet copies the script container, but verify triggers and authorizations after duplicate.
clasp clone works on bound projects for local development with git.
onOpen in the bound script adds a menu to this workbook only, calling functions that format the active tab.
Bound script reads line items from the same file, builds a PDF in Drive, and emails the customer.
A bound web app deployment serves managers a lookup UI over rows in the parent spreadsheet.
Watch how bound script works
Guides that explain bound script in more depth.
Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →Did you know you can actually code in Google Sheets?
Read post →Did you know you can use Google Apps Script to turn a Google Sheet into a free, auto-syncing database for your website? This guide shows you exactly how to set it up. You’ll prepare your spreadsheet, write a few lines of code and publish your site. Don’t worry if you’re not a developer, we’ll walk you through it. Why Use Google Sheets as a Database? For small projects, Google Sheets offers many advantages over traditional databases: * Free hosting and storage * Easy to edit data without...
Read post →The Script Editor is the Apps Script workspace inside your spreadsheet where you write JavaScript that talks to Sheets, Gmail, and other Google services. You open it from Extensions > Apps Script. Every function you save can be run manually, bound to a trigger, or linked from a custom menu.
Read guide →Triggers tell Apps Script when to run a function: on edit, on open, on a schedule, or when a form is submitted. Simple triggers use reserved names like onEdit. Installable triggers are created in the Apps Script Triggers page and can do more, including running as a specific user or on a timer.
Read guide →The onOpen trigger runs an Apps Script function automatically when someone opens the spreadsheet. It is the standard way to add custom menus, show instructions, or refresh lightweight cache without asking the user to run a macro first. Name the function onOpen or bind it as an installable open trigger.
Read guide →Automation means work happens without repeating the same clicks every day: imports update, emails send, rows move, and dashboards refresh. In Sheets, automation usually stacks built-in features, Apps Script, and sometimes the Sheets API or add-ons. Start with the lightest tool that still solves the job.
Read guide →Done reading about bound script?
Membership unlocks 637+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.