I have two scripts I'm making:

  1. Shorten URLs within a Google Sheet
  2. Printing a single sheet and sending this as a PDF to a specified email

I have successfully created the first script and added it as a menu item in my Google Sheet, but notice that when I started working on the second script, the first menu item has disappeared!

Is there a way to have both scripts show as menu items please?


1 Answer 1


Rubén pointed out an example using getUi method, and here is a different one, using addMenu method. "Custom" is the menu name that will appear in the navigation bars, and the names in the list below will appear under it, and call the corresponding functions.

function onOpen() {
  SpreadsheetApp.getActiveSpreadsheet().addMenu("Custom", [
    {name: "Delete and Shift Up",       functionName: "deleteAndShiftUp"}, 
    {name: "Insert New Content Above",  functionName: "insertContentAbove"},
    {name: "Insert Blank Cells Above",  functionName: "insertAbove"},

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.