“Error: Please specify a valid Spreadsheet URL.” How to Fix?

ERROR: “Please specify a valid Spreadsheet URL.” 

This error typically occurs when you copy-paste a Google Ads scripts solution from the Google Developer site and forget to edit the configuration.

Solution:

1) Go look for a configuration variable (usually at the top of the script), create a new empty Google Sheet, copy-paste the URL of the new Google Sheet and insert the URL between the (double)quotes:

Simply replace code that looks like this

var SPREADSHEET_URL = 'YOUR_SPREADSHEET_URL';

into this:

var SPREADSHEET_URL = 'https://docs.google.com/spreadsheets/d/42g2D8t2AmHDD6fs6y__kLG80fa_4aeoeLjjiQrwXXXX/';

 

2) Sometimes you need to create a new copy of the Spreadsheet template mentioned in the documentation of the script. Make sure you do so using File -> Make a copy

Copy-paste the URL of the Google sheet.

Edit the CONFIG object (shown below) that is at the beginning of the script.

Here’s an example of the Link Checker script.

NOTE: 

The only areas where you need to modify the SPREADSHEET_URL and RECIPIENT_EMAILS are the ones from the var CONFIG at the top of the script, shown above.

If you modify the functions 'validateAndGetSpreadsheet' and/or 'validateEmailAddresses' the script will throw errors.

 

WARNING:

You might get an error like this

Invalid argument: url (file Code.gs, line XX)

If so, here is the fix for “Invalid argument: url (file Code.gs, line XX)” errors.

 

Join thousands of PPC geeks who already have access:

If the button above isn’t working for you, you can sign up here to get access.