i saw your post here so am going to answer you here and not on my blog
theres is two methods to use goo.gl shortner. through JSON and it requires you to use an API from your API Console.
Implementation can be done using Google Apps script like this example here Problems using the goo.gl API from google apps script
and the documentation to use the api can be found here
https://developers.google.com/url-shortener/v1/getting_started#shorten
Thank you