Link Google Forms to Bitly Automatically

If you have a account, you can get a public API token which can be used to create shortcodes. This is really handy in my situation, where I'm creating a ton of feedback spreadsheets (another monster post on that later). Using a small code snippet, you can create a feedback form, throw in some code, and have it display as a short URL and QR code.

If you're starting from scratch, create a template form and spreadsheet. When you need to make a feedback form, use File > Make a copy on the spreadsheet to copy over the code.

Otherwise, you can make a copy of this blank template to get started (code is already inserted). If you're going to make your own, be sure you have a form linked. If there is no form on your sheet, you'll get an error.

The code

The full source code is below. Note that there are two files: one called and one called popup.html. If you're copying/pasting, you need to create an HTML file (File > New > Html file in the script editor) and call it 'popup'.

In action

click for larger view

The wheels of the web keep spinning...

Cog in the wheel flickr photo by WickedVT shared under a Creative Commons (BY-NC-ND) license

Leave a Reply

Your email address will not be published. Required fields are marked *