Adds a menu item that runs a function when clicked.
class SpreadsheetApp method .addItem()
SpreadsheetApp is the Apps Script service.
.addItem() is the method name you will see after a dot in your code.
What it does
Why it's used
- Wire each menu entry to a function like send report or clean data.
- Give non-technical teammates one-click access to your code.
Common errors
- Forgetting parentheses on addItem. Write SpreadsheetApp.addItem(), not SpreadsheetApp.addItem or addItem by itself.
- Skipping dots between chained calls. Each step needs a dot, like SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data').addItem().
- Adding spaces where they do not belong. Write SpreadsheetApp.addItem(), not SpreadsheetApp .addItem(), SpreadsheetApp.addItem (), or SpreadsheetApp . addItem().
- Wrong capitalization. Use SpreadsheetApp and addItem, not spreadsheetapp or additem.
Snippets using this method
- Uncheck Every Checkbox in Google Sheets
- Visicalc 2023 Design Walkthrough
- Visicalc 2023 Quick Walkthrough
- Tweet From a Sheet
- SubSpyHub Subreddit Scanner
- Simple Inventory Management Automations
- Self Destructing Google Sheet
- Shaman: AI Blog Writer
- Twitter App Clone in a Google Sheet
- Sheet Stories / Video Notes + Clear 24 Hour Old Videos
- Scrape Google Maps Added Phone and Reviews
- Saving OpenAI API Calls inside of Google Sheets
- I Created an Automatic Emailer
- Make a Tour of Your Sheet
- Introducing SheetFools
- Password Protecting Data In a Google Sheet Part 2 The Basics
- How to Move Tab To End Easily with Apps Script
- How to Insert Multiple Rows in Google Sheets (Easy to Hard)
- How to Merge Cells in Google Sheets
- How to Power Testimonials with Google Forms and Sheets
- Google Maps Scraper for Outreach
- How To Download All Tabs as CSV in a Zip File
- Form Automations: Close Multiple Forms When Over Limit
- How To Change Date Format Automatically
Explore
Related methods
-
.createMenu()
Builds a custom menu in the spreadsheet toolbar.
-
.addToUi()
Publishes a custom menu to the spreadsheet UI.
-
.insertSheet()
Adds a new sheet tab to the spreadsheet.
-
.addSeparator()
Adds a divider line between menu items.
-
.activate()
Makes a sheet or range the active selection.
More Apps Script
Better Sheets tutorials
Access Free API's with Google Sheets
Activate A Certain Sheet When Opening a Spreadsheet
Add Columns Automatically
Add Tasks to Google Tasks From Google Sheets
Advanced Coding in Google Sheets for Programmers
Americano Tournament Template With Four Automations
Automate Emails
Automate Move Blank Rows
Automatically Align Top
Automatically Clear Content | Refresh Reuse Recycle Templates
Automatically Copy Spreadsheet Tab to New File with Values Only, No Formulas
Big Year - a Whole Year in One Google Sheets Tab
Breaking Through Errors In Apps Script
Build Your Own AI Writer in Google Sheets
Built a Cookie Clicker Clone in Google Sheets
ChatGPT Clone in Google Sheets Part 1
ChatGPT Clone in Google Sheets Part 2
Count Merged Rows
Create an Automated Task List
Create an Internal Google Sheets Add-on
Create a PR Agency From Scratch
Curate Google Sheets Easily - Automatic Bookmarklet Maker
Dylan Asks: How to Automatically Delete Rows If Cell Contains Value
Every Google Drive File Created in Last 24 Hours
Explore Readable Hex Codes
Fast FAQS
Form Automations: Close Multiple Forms When Over Limit
Google Maps Scraper for Outreach
Google Sheets Stories? No! But we'll add timestamped video notes to your google sheets.
How To Change Date Format Automatically
How to Create a Google Form Automatically
How to Create AI Images From Google Sheets
How To Download All Tabs as CSV in a Zip File
How To Duplicate a Tab and Move it to the End in Google Sheets
How to Insert Multiple Rows in Google Sheets (Easy to Hard)
How to Merge Cells in Google Sheets
How to Move Tab To End Easily with Apps Script
I Created an Automatic Emailer
Introducing SheetFools
Make a Tour of Your Sheet
Password Protecting Data In a Google Sheet
Password Protecting Data In a Google Sheet Part 2 The Basics
Saving OpenAI API Calls inside of Google Sheets
Scrape Google Maps
Scrape Google Maps Added Phone and Reviews
Self Destructing Google Sheet
Shaman: AI Blog Writer
Simple Inventory Management Automations
SubSpyHub Subreddit Scanner
Tweet From a Sheet
Uncheck Every Checkbox in Google Sheets
Visicalc 2023 Design Walkthrough
Related blog posts
Written guides about SpreadsheetApp.addItem().
What's Better Than Google Sheets?
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 →How to reference a different Google Spreadsheet in Apps Script?
Transferring Data Between Cells in Different Spreadsheets
Read post →How to Send Google Forms Entries Automatically with Apps Script
Google Forms provides basic email notifications for form submissions, but enhancing these notifications with detailed summaries can significantly improve productivity and response management.
Read post →