【问题标题】:Is there any way to embed Google Apps Script in a Gmail Contextual Gadget? I need to access the Apps Script API functionality from by Gmail gadget有没有办法将 Google Apps 脚本嵌入到 Gmail 上下文小工具中?我需要通过 Gmail 小工具访问 Apps Script API 功能
【发布时间】:2012-08-31 19:02:36
【问题描述】:

有没有办法在 Gmail 上下文小工具中嵌入或访问 Google Apps 脚本?我需要从 Gmail 上下文小工具访问 Apps Script API 功能。

我创建了一个测试网络服务,当从 wget 调用时它返回我的公司单点登录页面(SAML with Google)而不是“Hello World”。

function doGet(e) {
  var output = ContentService.createTextOutput();
  output.setContent("Hello world");
  return output;
}

$ wget https://script.google.com/a/macros/example.com/s/AKfycbz-aVKchJk3AQltnd5CKabbGJawCu0U3ySChcT5QxBNWBS_FoU/exec
--2012-08-31 14:37:03--  https://script.google.com/a/macros/example.com/s/AKfycbz-aVKchJk3AQltnd5CKabbGJawCu0U3ySChcT5QxBNWBS_FoU/exec
Resolving script.google.com... 74.125.225.97, 74.125.225.99, 74.125.225.110, ...
Connecting to script.google.com|74.125.225.97|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://www.google.com/a/example.com/ServiceLogin?service=wise&passive=1209600&continue=https://script.google.com/a/macros/example.com/s/AKfycbz-aVKchJk3AQltnd5CKabbGJawCu0U3ySChcT5QxBNWBS_FoU/exec&followup=https://script.google.com/a/macros/example.com/s/AKfycbz-aVKchJk3AQltnd5CKabbGJawCu0U3ySChcT5QxBNWBS_FoU/exec [following]
--2012-08-31 14:37:03--  https://www.google.com/a/example.com/ServiceLogin?service=wise&passive=1209600&continue=https://script.google.com/a/macros/example.com/s/AKfycbz-aVKchJk3AQltnd5CKabbGJawCu0U3ySChcT5QxBNWBS_FoU/exec&followup=https://script.google.com/a/macros/example.com/s/AKfycbz-aVKchJk3AQltnd5CKabbGJawCu0U3ySChcT5QxBNWBS_FoU/exec
Resolving www.google.com... 209.85.225.147, 209.85.225.104, 209.85.225.105, ...
Connecting to www.google.com|209.85.225.147|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://extsignon.example.com:443/amserver/SSORedirect/metaAlias/emplFed/idp?SAMLRequest=......

【问题讨论】:

    标签: gmail google-apps-script


    【解决方案1】:

    这应该是可能的,因为有人使用 Apps 脚本作为日历小工具 (see here) 的数据源。在您的情况下,您将获得一个登录屏幕,因为您以不允许匿名访问的方式发布您的网络应用程序,并且 wget 没有传递您的 cookie。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-17
      相关资源
      最近更新 更多