Displaying notifications in Google Sheets using toasts

Last updated: February 10, 2025

A toast is a notification that provides some contextual information to the user in an unobtrusive manner. A toast notification will automatically disappear after a few seconds.

In Google Sheets, toast notifications are displayed in the bottom right corner of the screen.

A screenshot of Google Sheets showing a toast notification in the lower right corner.

It's really simple to write the code to display toast notifications. For example, the code to display the prompt in the above image is just one line.

function toastMessage() {
  SpreadsheetApp.getActive().toast("Message");
}

You can also include a title along with the message.

function toastMessageTitle() {
  SpreadsheetApp.getActive().toast("Message", "Title");
}
A screenshot of Google Sheets showing a toast notification in the lower right corner.

Finally, you can configure the number of seconds the notification should be shown.

function toastMessageTimeout() {
  // Display the toast for 15 seconds
  SpreadsheetApp.getActive().toast("Message", "Title", 15);
}

Conclusion

In this tutorial, you learned how to display toast notifications in Google Sheets using Google Apps Script.

Thanks for reading.

DISCLAIMER: This content is provided for educational purposes only. All code, templates, and information should be thoroughly reviewed and tested before use. Use at your own risk. Full Terms of Service apply.

Small Scripts, Big Impact

Join 1,500+ professionals who are supercharging their productivity with Google Sheets automation

Exclusive Google Sheets automation tutorials and hands-on exercises
Ready-to-use scripts and templates that transform hours of manual work into seconds
Email updates with new automation tips and time-saving workflows

By subscribing, you agree to our Privacy Policy and Terms of Service