Question

I'm trying to build a gmail contextual gadget. I had it working in the past but i must of changed something and it does not work now. I have created the listing successfully and added the gadget to a test domain of mine. But still nothing happens when i open up an email.

this is the manifest:

<?xml version="1.0" encoding="UTF-8" ?>
<ApplicationManifest xmlns="http://schemas.google.com/ApplicationManifest/2009">
  <Support>
    <Link rel="manage" href="http://example.com" />
    <Link rel="support" href="http://example.com" />
    <Link rel="deletion-policy" href="http://example.com" />
  </Support>

  <Name>Clarizen</Name>
  <Description>Integrate with clarizen</Description>
  <Extension id="navLink" type="link">
    <Name>Clarizen</Name>
    <Url>http://example.com</Url>
  </Extension>

<!-- EXTRACTOR -->
<Extension id="Ex1" type="contextExtractor">
  <Name>Ex1</Name>
  <Url>google.com:EmailBodyExtractor</Url>
  <Triggers ref="gadget1"/>
  <Scope ref="emailBody"/>
  <Container name="mail"/>
</Extension>

<!-- EXTRACTOR -->
<Extension id="Ex2" type="contextExtractor">
  <Name>Ex2</Name>
  <Url>google.com:SubjectExtractor</Url>
  <Triggers ref="gadget1"/>
  <Scope ref="emailSubject"/>
  <Container name="mail"/>
</Extension>

<!-- GADGET -->

<Extension id="gadget1" type="gadget">
  <Name>Clarizen contextual gadget</Name>
  <Url>http://example.com:2057/test.xml</Url>
  <Container name="mail"/>
  <!-- Uncomment this to enable Caja. -->
  <!-- <Param name="caja" value="enabled"/> -->
</Extension>

<!-- SCOPE -->

<Scope id="emailSubject">
  <Url>tag:google.com,2010:auth/contextual/extractor/SUBJECT</Url>
  <Reason>integaret with clarizen</Reason>
</Scope>

<Scope id="emailBody">
  <Url>tag:google.com,2010:auth/contextual/extractor/BODY</Url>
  <Reason>integaret with clarizen</Reason>
</Scope>

</ApplicationManifest>

I am able to load http://example.com:2057/test.xml in igoogle so i think the problem is with the manifest.

What can the problem be and how can i validate the manifest file and trouble-shoot this sort of problem.

Thanks

Was it helpful?

Solution 2

finally i found out the problem - you cannot use the same gadget spec twice. So i made a fresh copy of the gadget spec - http://example.com:2057/test_V2.xml, and that got it working. See http://code.google.com/apis/gmail/gadgets/contextual/ at the paragraph "Reusing a gadget spec"

OTHER TIPS

You can use the same gadget spec more than once. The reason it does not update is that the gadget spec (the XML file) is cached by Google.

To overcome this problem: Sign out from gmail, then sign in again. Then, in the address bar, add the parameter &nogadgetcache=1 and press enter to load the page. Then open an email message and look at your gadget.

On the same subject... if you make any changes to your Application Manifest, then the data access specs change. You should login to your Google Apps dashboard and click your app. You'll possibly see that you need to review and re-grant data access to your app because of the changes you made. And even if no warning is displayed, it does not hurt to revoke and then grant access again to make sure google updates the data access rules for your app in this domain.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top