Extending Gmail with Google Workspace add-ons

  • Google Workspace add-ons automate tasks within Gmail, saving users time and effort by providing interactive UI elements within emails.

  • Add-ons enhance the Gmail experience by displaying extra information, connecting to external services, and letting users control add-on behavior.

  • Developers can build custom add-ons with Apps Script and the Card service to extend Gmail's functionality on both desktop and mobile.

  • Gmail add-ons can have homepages, contextual interfaces triggered by opening or composing emails, and the ability to create new drafts automatically.

  • To learn more about building and configuring Gmail add-ons, explore the provided resources on extending UI, composing messages, manifests, and scopes.

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

You can save time and effort for your users by automating these tasks withGoogle 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 letsthe 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 otheractions.
  • Providing the means to control the add-on behavior or send information toanother service.
Note: You can alsodevelop your own Chat apps toenhance the Gmail experience.

Google Workspace add-ons can define the following kinds of extensions withinGmail:

In addition, Google Workspace add-ons that extend Gmail do so on both desktop and mobileclients.

Gmail homepages

Gmail supports displaying Google Workspace add-onhomepages.To show your add-on's common homepage in Gmail simply make sure thereis aaddOns.gmailfield in the add-on's manifest.

Alternatively, add agmail.homepageTriggerto the add-on manifest to provide a Gmail-specific homepage.

In either case, you must provide the name of a homepage trigger function in youradd-on's script project. This function is automatically called to build theGmail homepage when it is needed. You must implement this function to buildand return a singleCard or an array ofCardobjects that make up the homepage. The homepage trigger function is passed anevent objectas a parameter that contains some general information such as the client'splatform. You can use the event object data to tailor the construction of thehomepage.

See what you can make

Google Workspace add-ons are built usingApps Script, and theirinterfaces defined using the Apps ScriptCard service. SeeBuilding Google Workspace add-onsfor an overview. Google Workspace add-on behavior is configured using amanifest, which includesGmail-specific sections.

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

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-22 UTC.