Tested this script but gets an error on line 2 where the Urlfetchapp google.com url is. This the code used…