Google Apps Script: Create an Add-On

Create an add on (1)

Create an Add-On Menu

For most of my scripts I have written you access the script through the Add-On menu. In my group maker script you create a copy of the template and then go to the Add-On menu to locate “Group Maker.” You can create your own Add-On for your scripts you create.
2015-11-24_14-43-20

The scripts are attached to the document, meaning the Add-on you create is not available by searching the Add-on marketplace. For others to access your script, you need to provide them a copy of the document.

Add-On Menu Template

I created a template of the Google Apps Script code to copy and paste into your own document.

tinyurl.com/addonmenu

Directions

Start a new Google Doc or Google Sheet. Go to the tools menu and choose “Script editor.”
Script Editor

Copy and paste the code from the above template into the script editor. Use Control A to select all and delete the default text before pasting.

Google Doc

The sample code is for creating an Add-On menu for a Google Sheets spreadsheet. If you want to create an Add-On for a Google Doc, change the 2 places in the code that says “SpreadsheetApp” to “DocumentApp.”

Add HTML

From the File menu choose “New” and create a new “Html” file.
HTML file

Name the file sidebar.
Sidebar

From the template document above, go to the sidebar html file and copy and paste the sample text.

Button

The sidebar menu has some code to create a button that runs your function from the code page. If you change the default function name from “myFunction” you will need to edit that in the sidebar menu. You can also add instructions in the sidebar html page for how to use the script.
myFunction

Save

Save the files. You will need to click on save for the code page and for the sidebar page. You will be prompted to name the script file. Whatever you name the file will be the name of your Add-On in the menu.

Run on Install

After saving the sidebar and code pages you will want to run the “onInstall” function. The dropdown menu in the toolbar allows you to choose “onInstall.”
onInstall

Click on the run icon which resembles a sideways triangle. This will add your script to the Add-On menu.

2 thoughts on “Google Apps Script: Create an Add-On”

Leave a Comment

© 2026 All Rights Reserved.

💥 FREE December 11th

Join Alice Keeler, Friday December 11th in person at Maize USD 266 or participate on your own time virtually! 

Win prizes such as a $100 Amazon gift card and more.

Kansas has new standards for technology use in classrooms. Even if you do not live in Kansas, these ideas are universal. When should we choose paper and when does the task warrant using technology? Join us in person or register and we will send you the workshop to complete on your own time.

Exit this pop up by pressing escape or clicking anywhere off the pop up.

💥 FREE OTIS WORKSHOP

Join Alice Keeler, Tuesday December 1st or register to gain access to the recording.
Create a free OTIS account.

Join Alice Keeler for this session for adjusting your pacing guide

Join Alice Keeler for an actionable session on instructional pacing and planning.

When school assemblies, weather delays, or reteaching needs disrupt the semester calendar, recalculating weeks of lessons can feel overwhelming. Alice Keeler shows educators how to upload district pacing guides, state standards, and academic schedules into Gemini Notebook to generate balanced, standards aligned pacing adjustments in minutes. Participants discover a reproducible workflow to reorganize instructional units, prioritize essential standards, and rebuild workable calendars that keep learning on track without sacrificing depth.

Exit this pop up by pressing escape or clicking anywhere off the pop up.