GAM 2.0中的Google Contextual Gmail小工具无法触发

时间:2014-08-12 16:06:27

标签: google-apps-marketplace gmail-contextual-gadgets

我有一个Google Apps Mail Contextual Gadget,它在之前版本的GAM(Google Apps Marketplace)中使用了供应商帐户上的manifest.xml文件。我现在正在填写GAM2的COB表单,但是当通过测试安装流程按钮激活时,应用程序永远不会在我的Gmail帐户中触发。

我正在使用自定义提取器:

customExtractor.xml

<?xml version="1.0" encoding="UTF-8"?>

<OpenCOBData id="testCustomExtractor">

  <ExtractorSpec platform="gmail" language="en">

    <Search input_type="text">
      <Pattern input_fields="from_email,body"> 
        <![CDATA[(?P<sender_name>.*)]]> 
      </Pattern> 
    </Search>

    <Response platform="gmail" format="cardgadget">
      <Output name="sender_name">{@__FROM_PERSONAL__}</Output>
      <Output name="sender_email">{@__FROM_ADDRESS__}</Output>
      <Output name="recipient_name">{@__TO_PERSONAL__}</Output>
      <Output name="recipient_email">{@__TO_ADDRESS__}</Output>
      <Output name="message_id">{@__MESSAGE_ID__}</Output>
    </Response>

  </ExtractorSpec>

</OpenCOBData>

Google Apps Extension Console上此提取程序的ID 500140453954 ,使网址 500140453954:testCustomExtractor

GAM2表单的屏幕截图

Screenshot of GAM form

我在这里犯了明显的错误吗? 我已经测试过使用管理员和普通用户查看小工具,小工具是由管理员帐户编写的。如果有任何影响,自定义提取程序也归管理员帐户所有。

另一个问题:由于表单中的manifest.xml文件现已过时,是否有可以提供权限原因的不同位置?


使用@ koma的网址和预先封装的邮件提取器的新小工具图片。

enter image description here

1 个答案:

答案 0 :(得分:1)

Chrome Webstore应用程序是部署Google Apps市场列表的必要条件。清单通过设置容器和项目ID:

表明这是Google Apps市场应用程序

“container”:[“DOMAIN_INSTALLABLE”],   “api_console_project_id”:“projectNumber”

请参阅the docs here

您必须在项目中启用marketplace SDK并在那里设置所需的范围并配置COB扩展(==上下文小工具)。

我会从罐头提取器开始简单。

配置好所有内容后,您可以从市场SDK配置测试安装流程。小工具应该出现。

我不确定是否可以使用自定义提取器来处理新的市场列表。更好的方法可能是仅使用固定提取器提取消息Id,然后调用new Gmail API以检索有关手头消息的任何其他信息。在这种情况下,您将需要配置其他范围。