Sample Gmail add-on: Meeting Assistant
This is a sample add-on that demonstrates interactivity and the use of the Calendar API service to facilitate creating meetings based on email threads.
Note: This is not an official Google product.
Before you begin
If you're new to add-on development or Apps Script, try the quickstart before proceeding.
This sample requires the following:
Downloading the sample
Download the sample app and navigate into the app directory:
Clone the Gmail add-ons samples, to your local machine:
git clone https://github.com/googlesamples/gmail-add-ons-samples.git
Alternatively, you can download the sample as a zip file and extract it.
Change to the sample directory:
Initialize the project:
Bundle the dependencies:
npm run build
Deploy the add-on
Deploy the add-on by following these steps:
Create a new project:
clasp create "Meeting Assistant"
Push the code:
Open the project
Enable the Calendar API by following the instructions for enabling advanced services:
Tag a version:
clasp version 'Push from github'
Deploy the add-on:
clasp deploy 1 'test'
Verify the deployments:
Note the deployment ids. There will be two deployments, one for the tagged
version, another for the
@HEAD version. Use the
@HEAD deployment when
installing the add on if you intend to modify or experiment with the code.
Install the add-on
One the add-on is deployed, install the add-on on your account using these steps:
Open the Gmail add-on settings tab.
In the Add-ons tab, ensure that you have selected the Enable developer add-ons for my account checkbox.
Paste your add-on's deployment ID into the Install developer add-on textbox and click Install.
In the Install developer add-on dialog that appears, click the checkbox to indicate that you trust this developer (yourself), then click Install.
The add-on appears in the Developer add-ons list at this point. The Enable debugging information checkbox (which is checked by default) instructs Gmail to create and display an error report card when script or runtime errors occur during the execution of the add-on.
Run the add-on
Open Gmail. If Gmail was open prior to enabling the add-on, you may need to refresh the tab.
Open a message in Gmail.
The add-on should place a contextual card on the right-side of the window, with a message asking for authorization. Click the Authorize access link to open a dialog where you can authorize the add-on.
Select the account that should authorize the add-on.
The next dialog may inform you that the app is not verified. In this case you can proceed by doing the following:
a. Click Advanced.
b. At the bottom of the dialog, click Go to Meeting Assistant (unsafe).
c. In the new dialog, type "Continue" into the text field, then click Next.
Read the notice in the next dialog carefully, then click Allow.
Once authorized, the add-on should automatically refresh and start operating.
Please read our guidelines for contributors.
This sample is licensed under the Apache 2 license.