6
我想编写一个允许用户直接从多功能框发送电子邮件的Chrome扩展程序。是否可以直接在Chrome扩展程序内执行Google Apps脚本代码,例如Gmail Services API?我可以从Chrome扩展程序执行Google Apps脚本代码吗?
我想编写一个允许用户直接从多功能框发送电子邮件的Chrome扩展程序。是否可以直接在Chrome扩展程序内执行Google Apps脚本代码,例如Gmail Services API?我可以从Chrome扩展程序执行Google Apps脚本代码吗?
是的,你可以但有一些限制 如果你发布你的应用程序脚本代码作为一个web应用程序,可以公开访问,你可以向webapp URL发出GET请求来执行应用程序脚本代码。
如
doGet(e){
//use e.parameter here
//write your apps script code
return ContentService.createTextOutput('your return content');
}
发布之后,说你有喜欢
https://script.google.com/macros/s/djihwerd98ejdeijded/exec
一个URL现在从您的Chrome应用程序的请求
GET https://script.google.com/macros/s/djihwerd98ejdeijded/exec?param=value
你能提供一个最小的工作示例? – qed
@qed上面的示例代码是在上述情况下工作正常的最小代码。 –