Questions tagged [gmail-addons]

Questions related to Gmail Add-ons, the modern developer platform that allows custom sidebars and buttons to be added to the Gmail user interface.

A Gmail Add-on is a standalone Google Apps Script project. Its purpose is to improve productivity and help the user perform an action directly from the Gmail page without leaving it.

The language used, Google Apps Script, is a server-side scripting language based on JavaScript 1.6. All add-ons use a "card"-style UI, to enable a common appearance on all platforms.

387 questions
28
votes
3 answers

How to create a Gmail addon?

How can I create a Gmail addon? I don't find any API to do it.
donald
  • 23,587
  • 42
  • 142
  • 223
22
votes
4 answers

Google gmail script that triggers on incoming email

I've been reading through gmail addons. They have contextual triggers that trigger when you open an email. Is it possible to trigger a service when an email is received by me? Best I can find is unconditional but that only triggers when the email is…
Jeff
  • 4,285
  • 15
  • 63
  • 115
18
votes
2 answers

Gmail Add-on trigger criteria

Can someone accurately describe the trigger criteria for Gmail Add-on scripts? Apparently, the trigger is not invoked each time the user navigates between Gmail conversations. The only documentation I can find is…
user3754273
  • 183
  • 1
  • 6
12
votes
2 answers

Gmail Add-Ons onTriggerFunction only ran once per email even if opening the email again

We're building a Gmail Add-On however we wish to show a different card on depending on some business logic when the add-on's onTriggerFunction is called. This works fine for the first time the function runs when an email opens. We have the…
Tom Bell
  • 1,120
  • 2
  • 16
  • 33
12
votes
3 answers

Permissions error using UrlFetchApp in Gmail Add-on

I am just starting to try building a new Gmail Add-on, and am running into the following error message: "You do not have permission to call fetch" This happens when testing the add-on in the Script Editor, and also when deployed inside my Gmail.…
11
votes
2 answers

Obtain an id token in the Gmail add-on for a backend service authentication

The background I'm using the Google Apps Script to create a Gmail Add-on. Via this plugin, I would like to connect to my backend server (a non-Google service) using a REST service request. The request has to be authorised. When authorised, I could…
10
votes
1 answer

How to distribute a Google Apps Script (processing Gmail mails) publicly?

I developed a Google Apps Script to process some emails automatically (connected to Gmail), more or less like a bot, and it's working as expected. It runs every minute, using a Time-driven trigger Minutes timer > Every minute: Is it possible to…
Basj
  • 41,386
  • 99
  • 383
  • 673
7
votes
2 answers

Gmail Add-On: Oauth not being triggered

In the code below, 'Test' button triggers a function which calls an external endpoint to load data. However, nothing happens when the button is clicked and I get a 400 error in the console area saying Invalid Argument. Code.gs function buildAddOn(e)…
Shyamal Parikh
  • 2,988
  • 4
  • 37
  • 78
6
votes
1 answer

Access browser cookies from Google Apps Script

I am new to Google Addon development. I have been working to develop a Gmail addon using the Google Apps script. My current requirement is to retrieve some information from a website which is authenticated in the same browser (in a different tab).…
rydgaze
  • 1,050
  • 13
  • 24
6
votes
5 answers

How can I relaunch/update/refresh the card again using Apps Script

I'm having a nightmare doing a lot of scenarios using Apps Script, but nothing works! I have a function that makes a GET request returns an array of cards. Now, sometimes I need this card refreshes again to fetch the new content. function…
Mohammed AlBanna
  • 2,350
  • 22
  • 25
6
votes
1 answer

Google app script,gmail addon get TextInput value

I have create simple gmail addon using google script,in that i have struggle here, how to get textinput value when we perform some action,i have checked the document, i couldn't find any methods TextInput The below code i have tried, var card =…
Robert
  • 3,373
  • 1
  • 18
  • 34
6
votes
2 answers

Handling persistent user-specific values in Gmail Add-ons

I have created simple Gmail addon, now I'm struggling with below strategies. After installing the addon, when first inbox is opened, we ask basic info input from users, when he opens second mail we won't ask basic info details again. How I can…
Robert
  • 3,373
  • 1
  • 18
  • 34
6
votes
1 answer

Only one type of action can execute?

I going to show my problem with an example: I have a button. When clicked, it creates a mail draft based on the TextInputFields in the add-on. I have a validate function, which can say if the fields filled right or not. If I want to notify the user…
6
votes
2 answers

Password type field in gmail card service

Right now, in gmail appscript we don't have any option to add a password type field. Gmail Card Service for add-on has a very good ability to show any thing in it. We can integrate with any app which has basic REST api. We need authentication for…
Siva Kumar J
  • 165
  • 1
  • 10
6
votes
2 answers

GMail Add-On not reloading after AuthorizationAction completes

I have a GMail AddOn that uses OAuth2 for authorization of an external service. When starting the AddOn, I check if the user already has an access token by calling oauthService.hasAccess(). If the user doesn't have a token, then I'll show a card…
Conrad Herrmann
  • 281
  • 1
  • 7
1
2 3
25 26