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 Gmail add-ons. When a user reads a message in Gmail, a Gmail add-on can present a interactive, customized message 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.
In addition to the message UI, a Gmail add-on can define an interactive, customized compose-time UI that can assist the user when they are composing or replying to messages.
The video above shows how you can build an add-on to import receipt information directly from Gmail into a Google Sheet to help your users process their expense reports from one place.
Once you've created an add-on, you can publish it for your domain or globally for others to use.
Structure of a Gmail add-on
Gmail add-ons present information and widgets to the user in the sidebar of the Gmail UI. An add-on consists of a main identifying toolbar along with one or more contextual cards. You can define navigation flows between cards for a rich interaction experience.
Each card consists of a header and one or more card sections. Each section is composed of a set of widgets. Widgets display information to the user or provide interaction controls like buttons.
The contextual cards you create for your add-ons work for both web and mobile versions of Gmail. This means that you don't need to create separate web and mobile versions of the add-on—the same code works everywhere!
See what you can make
You build Gmail add-ons using Apps Script, a server-side scripting platform that requires zero setup and can connect to many Google services, including Calendar, Drive, Docs, Sheets, Forms, and of course, Gmail.
- Try a quickstart! Create a Gmail add-on in just a few minutes.
- Get a bigger picture. To see a more in-depth add-ons, view the source code of some Gmail add-on examples.
- Learn how to make add-ons. The Building a Gmail add-on guide describes the process of building a Gmail add-on.
- Learn how to talk to non-Google services. The Connect to non-Google services guide describes how to connect your add-on to an external service using OAuth.
- Publish what you build. The Publishing Gmail add-ons guide shows you how to make your add-ons available to others.
- Learn more about what Apps Script can do. Review the Google Apps Script documentation.
- Wondering what other developers have built? Visit the Gmail add-ons store.