gmail-addons

Gmail add-on define pattern for the urlFetchWhitelist

旧城冷巷雨未停 提交于 2019-12-10 11:19:01
问题 I'm creating a Gmail add-on and one of the use cases is that user could define a server URL from which the data should be fetched. However, the URL always will have trailing part in the domain name https:// [part which user defines] .my.domain.com Currently, there is no option to deploy Gmail add-on without providing the urlFetchWhitelist list. In my case, I can specify the end part of the whitelisted URLs, whereas the GAS gives only define prefix Are there any approaches how to define some

Appscript handled errors not shown in stackdriver errors

ⅰ亾dé卋堺 提交于 2019-12-08 10:08:35
问题 I'm writing a Gmail Addon with Appscript. If the application throws an unhandled error, it will be automatically logged on stackdriver and displayed in Stackdriver Error Reporting. However, I want to manually send errors to Stackdriver Error Reporting: try{ thisMayThrowAnError(); catch(err){ console.error(new Error("Something Failed")) } In the example above, the error log is being displayed in Stackdriver Logs, but it won't appear on Stackdriver Error Reporting. Is there a way to achieve

How to load Gmail addon without opening mail message

北城以北 提交于 2019-12-07 22:28:51
问题 We need to develop the gmail addon to read the checked mail messages and process the content.We are using the below application json: { "oauthScopes": [ "https://www.googleapis.com/auth/gmail.addons.execute", "https://www.googleapis.com/auth/gmail.readonly" ], "gmail": { "name": "My Addon", "logoUrl": "https://www.gstatic.com/images/icons/material/system/2x/bookmar k_black_24dp.png", "contextualTriggers": [{ "unconditional": {}, "onTriggerFunction": "buildAddOn" }], "primaryColor": "#4285F4",

How to create this UI in Gmail Add-on using Google Apps Script

柔情痞子 提交于 2019-12-06 21:56:27
Can someone tell me how to achieve below UI in Gmail Add-on using Google Apps Script? I tried KeyValue for the icon with text which is clickable and I am able to achieve that but I don't know how to put email text, next to the keyValue icon. Right now, I don't care about the position of the icon with counter and email text, I want them in the same row doesn't matter left or right . This is my code which is just showing icon with counter on the left side but not able to add email text anywhere. var card = CardService.newCardBuilder() .setHeader( CardService.newCardHeader() .setTitle('some Title

How to fix “Invalid Add-on” error when installing unpublished Gmail addon?

霸气de小男生 提交于 2019-12-06 15:46:04
I developed a Gmail addon on my personal Google scripts workspace. I didn't have any trouble installing it on my personal Gmail. I haven't published it to the app marketplace yet and I wanted to install ( using this method ) it on my company's Google Suite email account (I am the administrator of that Google Suite account). However, when I copy the deployment ID and press install I get an error saying "invalid addon". I have made sure that: My work email account has read access to the google scripts folder with the code Security preferences allow third party marketplace apps on the Any guess

How to load Gmail addon without opening mail message

陌路散爱 提交于 2019-12-06 10:57:08
We need to develop the gmail addon to read the checked mail messages and process the content.We are using the below application json: { "oauthScopes": [ "https://www.googleapis.com/auth/gmail.addons.execute", "https://www.googleapis.com/auth/gmail.readonly" ], "gmail": { "name": "My Addon", "logoUrl": "https://www.gstatic.com/images/icons/material/system/2x/bookmar k_black_24dp.png", "contextualTriggers": [{ "unconditional": {}, "onTriggerFunction": "buildAddOn" }], "primaryColor": "#4285F4", "secondaryColor": "#4285F4" } } We have tried above json to load the gmail addon without opening

Can't access Gmail Drafts via Gmail Add-ons

百般思念 提交于 2019-12-06 08:10:45
I am trying to access all the drafts in Gmail using Gmail Add-ons, but it logs error like this Access denied: : Missing access token for per message scope authorization. [line: 8, function: buildAddon, file: Code] My onTrigger function looks like this function buildAddon(e) { var cards = []; var accessToken = e.messageMetadata.accessToken; GmailApp.setCurrentMessageAccessToken(accessToken); var draftMessages = GmailApp.getDraftMessages(); for (var i = 0; i < draftMessages.length; i++) { cards.push(CardService.newCardBuilder() .setHeader(CardService.newCardHeader() .setTitle(draftMessages[i]

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

烂漫一生 提交于 2019-12-06 07:10:42
问题 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 listTemplatesCards(){ var getAllTemplates = getTemplates(); var allTemplates = getAllTemplates.templates; var theUserSlug = getAllTemplates.user_slug; var templateCards = []; //There are templates if(allTemplates.length > 0){ allTemplates.forEach(function

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

纵饮孤独 提交于 2019-12-03 13:17:28
问题 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 conditional logic, but Gmail appears to cache the result of the initial call returning the first card. Going to another email and back to original, the onTriggerFunction is not called again, so the conditional logic is not run to change the initial card

How to create a Gmail addon? [closed]

痞子三分冷 提交于 2019-12-03 05:39:48
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . How can I create a Gmail addon? I don't find any API to do it. 回答1: You can however add scripted gadgets to the sidebar, or triggered by email content: http://code.google.com/apis/gmail/ 回答2: Gmail finally supports ADD-ONS now in Oct, 2017. You can read the documentation here -