Skip to content

Diagnostic reference

Script function not found

Why a custom menu item, an assigned drawing, or an installable trigger reports Script function not found, and how to point it at the right function.

Updated October 18, 2026

Apps Script error

Script function not found: buildReport

What it means

Custom menu items, drawings with an assigned script, and installable triggers store the function to run as a text name. Apps Script looks that name up when someone clicks the item or the trigger fires. If the function was renamed, deleted, misspelled, or declared inside another function, the lookup finds nothing. The editor reports no error when you save, because the name is only a string until it runs.

Before and after

The code before and after the fix.

Problem 1 changed line
function onOpen() {
  SpreadsheetApp.getUi()
    .createMenu('Reports')
    .addItem('Build summary', 'buildReport')
    .addToUi();
}

function buildSummary() {
  Logger.log('Summary built.');
}
Fixed 1 changed line
function onOpen() {
  SpreadsheetApp.getUi()
    .createMenu('Reports')
    .addItem('Build summary', 'buildSummary')
    .addToUi();
}

function buildSummary() {
  Logger.log('Summary built.');
}

How to fix it

  • Make the name in addItem match a top-level function exactly, including capital letters.
  • Reload the spreadsheet, or run onOpen from the editor, so the menu is built again with the new name.
  • For an installable trigger, delete it in Triggers and create it again with the current function name.

Things to check

  • Renaming a function does not update menus, assigned drawings, or installed triggers that still store the old name.
  • myFunction does not change installed triggers or assigned scripts.