AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Ads
3.3K members online now
3.3K members online now
Improve your Google Ads performance and boost your ROI, CTR, and Quality Score
Guide Me
star_border
Reply

Adwords Script Invalid argument: url?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am trying to run Link Checker script, I'm used to it but this time I can't find the way to meke the script work correctly.

 

I simply replaced 

var SPREADSHEET_URL = 'YOUR_SPREADSHEET_URL'

 

with

var SPREADSHEET_URL = 'docs.google.com/spreadsheets/d/13k2D8t4XmHDD6fs5x__jPG80fa_3peoeLjjiWrXXXXX'

 

This is the log:

Using spreadsheet - docs.google.com/spreadsheets/d/13k2D8t4XmHDD6fs5x__jPG80fa_3peoeLjjiWrXXXXX.
Invalid argument: url (line 245)

 

And this is line 245:

this.spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);

 

Any ideas?

 

Thanks

Davide

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Davide V
September 2015

Re: Adwords Script Invalid argument: url?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

I've found the solution!

As Adwiser said the doc must be shared via link
Moreover the doc url must be completed with /edit at the end https://docs.google.com/spreadsheets/d/13k2D8t4XmHDD6fs5x__jPG80fa_3peoeLjjiWrXXXXX/edit

View solution in original post

Re: Adwords Script Invalid argument: url?

Top Contributor
# 2
Top Contributor
Hello, Davide.

Is your spreadsheet public? I don't think the script can access it if it isn't.
Calin Sandici, AdWords Top Contributor | Find me on: Google+ | Twitter | LinkedIn | myBlog
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

Re: Adwords Script Invalid argument: url?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi AdWiser,

thank you for reply, I made a copy from the original template, so I think the settings should be ok.
Following your suggestion I even tried changing the share setting to "Public on the web" but I had the same result.

Re: Adwords Script Invalid argument: url?

Top Contributor
# 4
Top Contributor
Just a guess, as I don't have the time now to try the script myself: please use the protocol for that URL as well, as in HTTP or HTTPS. Making it https://docs.google.com/spreadsheets/d/13k2D8t4XmHDD6fs5x__jPG80fa_3peoeLjjiWrXXXXX
Calin Sandici, AdWords Top Contributor | Find me on: Google+ | Twitter | LinkedIn | myBlog
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Marked as Best Answer.
Solution
Accepted by topic author Davide V
September 2015

Re: Adwords Script Invalid argument: url?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

I've found the solution!

As Adwiser said the doc must be shared via link
Moreover the doc url must be completed with /edit at the end https://docs.google.com/spreadsheets/d/13k2D8t4XmHDD6fs5x__jPG80fa_3peoeLjjiWrXXXXX/edit

Adwords Script Invalid argument: url?

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Hello, 

 

I am having a similar problem. I have a script that is due to pause ads which go through to an OOS page and then these get emailed to me in a Google Sheet. 

 

However in some of my accounts I am encountering a problem, but not in others which I find confusing. 

 

It comes back with an "invalid argument (line 144) which is follows:

sheet.insertRowsAfter(2, data.length);

 

Does anyone have any ideas as to what is causing this? 

 

Thanks, 

Denney