set shortURL to do shell script "curl -s https://www.googleapis.com/urlshortener/v1/url?key={YOUR_API_KEY} -H 'Content-Type: application/json' -d \"{\\\"longUrl\\\": \\\"" & longURL & "\\\"}\" | awk '/\"id\":/{print substr($2, 2, length($2)-3)}'"