Friday, 9 May 2014

How to host a gadget on Google Drive

To add a gadget such as a twitter widget into a Google Site, it is necessary to host the gadget file that you create somewhere.  Although in the past I used to host these gadgets on external websites, or via Dropbox, it is possible to use your Google Drive to host the gadget instead.

To do this, I created a folder in Google Drive, and set the sharing permissions for that folder to public on the web

I then uploaded a gadget containing the Twitter Widget code to that folder.

To get the URL that is required on a site when using the 'Add Gadget by URL' option,  In Drive, I clicked on the "Details and Activity" Button   and selected the Details pane

In this pane, there is a link to the hosting path for the files in this folder.  Clicking this link should take you to a folder view, where you can click on any of the files to get the URL

Clicking on the gadget gives a display of the file and the URL you need to copy and use

Using this link on a Google site, 'Add Gadget by URL' will then bring this through.


  1. Hosting in Google Drive no longer works.

    1. Thanks for the info - looks like we have 1 year before it is removed - perhaps Google cloud platform is the way forward...

  2. This explains why the Twitter feed stopped showing on our site.
    Uploading the xml file to DropBox works as a temporary workaround though.