gmail-addons

Google app script,gmail addon get TextInput value

风流意气都作罢 提交于 2020-07-19 04:20:08
问题 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 = CardService.newCardBuilder(); card.setHeader(CardService.newCardHeader().setTitle("Login Here")); var section = CardService.newCardSection() var cleint_id_Input = CardService.newTextInput() .setFieldName("client_id") .setTitle("Please enter clinet id")

Handling Gmail Addon Timeouts

一笑奈何 提交于 2020-07-09 12:52:26
问题 I'm trying to upload a larger size document from a gmail add on but I keep getting "Gmail could not perform this add-on action" when I try to hit my endpoint because it takes too long and I "Exceeded maximum execution time" of 30 seconds. Is there a way to increase the maximum execution time or at least catch the error and display something else other than Gmail's runtime error message? 回答1: I found some Google documentation that sheds light on this issue. Check out the Callback Function

Gmail add-on connecting to non-Google Services without oAuth

自作多情 提交于 2020-07-09 11:50:12
问题 Is it possible to authenticate to third-party service in G-Suite (Gmail) Add-ons, but without oAuth . The service I want to authenticate works on REST API and has no oAuth support. The best for me would be to open a new window (as with oAuth), login there and return token to the Gmail add-on frame. If that won't be possible, I'd go with giving a username and password in dedicated Card in add-on, but I'm not sure it that solution will pass Google verification when publishing in Marketplace. I

Gmail add-on connecting to non-Google Services without oAuth

冷暖自知 提交于 2020-07-09 11:47:41
问题 Is it possible to authenticate to third-party service in G-Suite (Gmail) Add-ons, but without oAuth . The service I want to authenticate works on REST API and has no oAuth support. The best for me would be to open a new window (as with oAuth), login there and return token to the Gmail add-on frame. If that won't be possible, I'd go with giving a username and password in dedicated Card in add-on, but I'm not sure it that solution will pass Google verification when publishing in Marketplace. I

google script use html service in gmail addon

心不动则不痛 提交于 2020-06-10 02:10:29
问题 I've try to create simple form in gmail addon, how to use html service The below code,i have tried, function buildAddOn(e) { var accessToken = e.messageMetadata.accessToken; GmailApp.setCurrentMessageAccessToken(accessToken); var test_card = doGet() cards.push(test_card); return cards; } function doGet() { return HtmlService.createHtmlOutput('<b>Hello, world!</b>'); } Thanks in advance 回答1: I understood that you want to use HTML at Gmail add-on. If my understanding is correct, how about these

How to use HtmlService in Gmail add-on using App Script

£可爱£侵袭症+ 提交于 2020-06-08 18:31:05
问题 I am creating a Gmail Add-on. The following reference page says - https://developers.google.com/gmail/add-ons/reference/ "Gmail add-ons are built using Apps Script and the many services it provides. You can use any of the Apps Script services when building your add-on" Basically, I want to have the small screen to pop up on clicking a button in my Gmail add-on. As of now I have added a button in my section as follows and tied it to an action handler 'htmltest':- var htmlTest = CardService

Log-in to an external site from Gmail Addon

落爺英雄遲暮 提交于 2020-05-17 03:53:52
问题 First of all, sorry for my bad English :) I am building a Gmail addon which integrates file uploading to an external website using their API. The API have an auth endpoint which uses plain authorization flow i.e. takes email and password of a user to authorize and return authorization token. That token is then used in the subsequent call of file uploading process. My question is, it has been mentioned in gmail addon guide that an app should use oAuth when connecting to a third-party service.

How to have simple google apps script send mails from Sheets from owner account regardless of who's accessing file

风格不统一 提交于 2020-01-15 12:36:07
问题 I've clicked around for the past few days trying to find an answer but can't seem to find one that makes sense to me (forgive me, I'm fairly new to GAS). I am trying to set up a Fantasy Golf Draft sheet to be used by about 12 users, but over half of which don't have/aren't willing to use a Gmail address. Getting access to the file is no problem, where I am running into an issue is trying to run a script, where when a Button/Shape is clicked, it sends an automated email to the next person who

Passing additional parameters to an Apps Script event object

牧云@^-^@ 提交于 2020-01-15 10:44:26
问题 I'm having a lot of headaches with callbacks and scopes in Apps Script. I have the following function, that creates a Gmail Add-On section with a checkbox for each attached file on the currently open email: function createAttachmentsSection( attachments ){ var widget = CardService.newSelectionInput() .setFieldName( 'selectedFiles' ) .setType( CardService.SelectionInputType.CHECK_BOX ) .setOnChangeAction( CardService.newAction() .setFunctionName( 'checkboxAltered' ) ); for ( var i = 0 ; i <

Does Google AppScript (GAS) supports O-Auth 2.0 Implicit Grant-Type

房东的猫 提交于 2020-01-15 09:32:27
问题 I'm trying to create a new Gmail add-on using Google Apps Script and trying to access third-party, non-Google API. For that I am using O-Auth 2.0 Implicit Grant-Type for authentication. This is how the AuthService looks like : function getOAuthService() { return OAuth2.createService('Podio O-Auth') .setAuthorizationBaseUrl('Base Url') .setTokenUrl('Token Url') .setClientId('clientId') .setClientSecret('clientSecret') .setParam('redirect_uri', 'https://script.google.com/macros/d/' + scriptID +