Executing Google Apps Script Functions from Mobile App

The following work with the mobile versions of Google sheets:

  • Custom functions
  • onEdit simple/installed trigger
  • onChange trigger
  • onSelectionEvent trigger(Works partially, if sheets is also open in desktop)

Notes:

  • Avoid calls to get active: getActive() sheet, range or cell. These don’t work in mobile or they return a default value like A1 in the first sheet for range.

  • Avoid calls to ui: getUi(). These have no meaning in the context of mobile app and won’t work. This includes calls to alerts/prompts. More than likely, You’ll hit execution timeout because alerts will wait for user input and this won’t show up in mobile. If you do want to show some message, Here is a excellent workaround using images to do the same.

    • Avoid calls to HtmlService. Sidebars/Modal dialogs are not supported in mobile versions.

    • Buttons/Menu items don’t work.

  • The best way to support apps script is mobile apps is to chain onEdit calls to a checkbox. Click here for a sample.

Leave a Comment