Gmail contextual gadget

删除回忆录丶 提交于 2019-12-18 11:13:21

问题


I guess question one is - is it actually possible to create a contextual gadget for gmail right now?

I have spent the last 2 days solid reading the (very out of date) documentation backwards and forwards, and every forum post I could find on the topic. I have tried everything I and see nothing, not even a hint of an error message that might point me in the right direction.

These are the steps I have been following, starting at the start, and going step by step when logged into my google apps domain as admin.

1) In google drive, created a new TestGadget.xml file, shared it publicly across the whole web and copied the contents of the Hello World example code from here https://developers.google.com/gmail/contextual_gadgets into it.

2) In https://console.developers.google.com deleted the previous attempts and created a new project and named it.

3) Once project was created, went to API's (6 were already enabled, have also tried with them removed), clicked Google Apps Marketplace SDK and enabled it.

4) Once enabled, went to API Configuration for Google Apps Marketplace SDK, and go to original console.

now in the apis console -

5) Clicked API Access, then clicked the big blue "Create an OAuth 2.0 client ID"

6) Gave it a name (used the same name as the project, not sure if that matters?) then next, and created clientID settings for both Web Application and Service Account (not really sure what a contextual gadget needs).

7) Went to Google Apps Marketplace SDK options.
Added a description
Added 4 icons
Cleared the checkbox for "Allow individual install"
Added a URL (http://www.google.com) for the TOS just to keep it happy

8) In the extensions section, checked the Universal Navigation Extension, and again pointed it at www.google.com (have to have either this or the drive extension, but neither make sense for a contextual gadget?!)

9) Enabled COB extension.
Extractor URL - google.com:HelloWorld
Gadget URL - https://drive.google.com/file/d/0B9LL5RYGoC4GUUFFU1FtOXpWSms
Param Name - hello (have tried @hello, and other combination too just incase)
Param Value - .*
Scopes - Mail - Subject line, Mail - Message Body

and Saved changes. In other attempts I have tried different extractors from the documentation, and changed the gadget code to match, using the param name specified there e.g google.com:EmailBodyExtractor with email_body and always .* for the value

10) Click Test installation flow , get the grants page appear, agree to conditions, turn ON for my domain, and accept. Then click next next next thru the next bit agreeing to send notifications out.

11) Went to https://admin.google.com/AdminHome?fral=1#AppsList:serviceType=MARKETPLACE , and the app was listed there. Checked the settings, and Data access was granted, and it was ON for everyone.

12) Sent myself an email from a different account sprinkled liberally with 'hello world' in the subject and body.

13) Logged into gmail with https://mail.google.com/mail/u/0/?nogadgetcache=1

... and nothing

14) Bang head against wall. HARD !

15) repeat last 2 steps with a non admin user - still nothing (and no notification of the app either)

16) return to wall . . . . .

What am I missing?


回答1:


Finally got it working. The problem was hosting/linking to the gadget on google drive. With the exact example above, I ftp'd the gadget to my website and linked to it there, and it all started working.

This however is a really annoying way to work, and I have seen a lot of other examples that claimed to use a document on google drive, so is there a proper way to use google drive to host a gadget during development?



来源:https://stackoverflow.com/questions/29926796/gmail-contextual-gadget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!