Extending Gmail with Google Workspace Add-ons

The purpose of many emails is to get the recipient to do a specific task or reach a goal, such as adding a calendar event, filling out a form, making a reservation, or using other applications. However, recipients then have to complete the task without any further prompting, often doing a number of manual steps.

You can save time and effort for your users by automating these tasks with Google Workspace Add-ons. When a user reads or composes a message in Gmail, a Google Workspace Add-on can present an interactive, customized UI that lets the user act on the message in various ways, such as by:

  • Displaying additional information for the user in the Gmail UI.
  • Connecting to non-Google services, to retrieve information or take other actions.
  • Providing the means to control the add-on behavior or send information to another service.

Google Workspace Add-ons can define the following kinds of extensions within Gmail:

In addition, Google Workspace Add-ons that extend Gmail do so on both desktop and mobile clients.

Gmail homepages

Gmail supports displaying Google Workspace Add-on homepages. To show your add-on's common homepage in Gmail simply make sure there is a addOns.gmail field in the add-on's manifest.

Alternatively, add a gmail.homepageTrigger to the add-on manifest to provide a Gmail-specific homepage.

In either case, you must provide the name of a homepage trigger function in your add-on's script project. This function is automatically called to build the Gmail homepage when it is needed. You must implement this function to build and return a single Card or an array of Card objects that make up the homepage. The homepage trigger function is passed an event object as a parameter that contains some general information such as the client's platform. You can use the event object data to tailor the construction of the homepage.

See what you can make

Google Workspace Add-ons are built using Apps Script, and their interfaces defined using the Apps Script Card service. See Building Google Workspace add-ons for an overview. Google Workspace add-on behavior is configured using a manifest, which includes Gmail-specific sections.

When configuring your Google Workspace Add-on to extend Gmail, you must decide what interfaces to create for your add-on and what actions it can take. See the following guides for more information: