Need help determining a google spreadsheet url (Error: Please specify a valid Spreadsheet URL)

1,446 views
Skip to first unread message

Rocky Rawlins

unread,
Dec 5, 2016, 2:19:43 PM12/5/16
to AdWords Scripts Forum
I'm trying to use the Ad Words script named Manager Account Summary at https://developers.google.com/adwords/scripts/docs/solutions/mccapp-account-summary#how-it-works

It's supposed to be pretty much a cut and paste operation into the scripting system. However I continue to get an error of Error: Please specify a valid Spreadsheet URL. I've copied the spreadsheet into my google drive as instructed. 

I've used the URL it provides that ends with .....jKY/edit?usp=sharing.

I've also used one that looks like: https://drive.google.com/open?id=1sJWTL...... 

Neither one works and both produce the same error.

Obviously I'm missing some fundamental concept of what a google spreadsheet url is and how to determine what it is. The folks who put the scripts out there as examples assume that everyone understands whatever that concept is. I'm usually able to find such information but I'm coming up completely blank on what exactly a google spreadsheet url is as desired by this script.

if someone could point me in the right direction I'd appreciate it.

Tyler Sidell (AdWords Scripts Team)

unread,
Dec 5, 2016, 4:59:15 PM12/5/16
to AdWords Scripts Forum
Hi Rocky,

Apologies for the confusion pertaining to the spreadsheet URL format.  Please follow these instructions and you should be good.  

1. Open in same browser that you are logged into AdWords with: http://goo.gl/yFkbH6
2. Go to File->Make a Copy
3. Copy the URL of the new version from the browser (including /edit at the end)
4. Place this URL in between ' ' in script

Let us know if that helps.

Thanks,
Tyler Sidell
AdWords Scripts Team

Rocky Rawlins

unread,
Dec 6, 2016, 7:04:58 AM12/6/16
to adwords...@googlegroups.com

I've got the sharing on the spreadsheet set to Anyone with Link can edit.

First part of script reads:

// Take a copy (File -> Make a copy ...) from http://goo.gl/yFkbH6
var SPREADSHEET_URL = 'https://docs.google.com/spreadsheets/d/1Q9sx3_z6mpqpKhrgH28eqUuE90zD6SM417YFcVzFtDY/edit';

Section towards the end reads:

function validateAndGetSpreadsheet(spreadsheeturl) {
  if (spreadsheeturl == 'https://docs.google.com/spreadsheets/d/1Q9sx3_z6mpqpKhrgH28eqUuE90zD6SM417YFcVzFtDY/edit') {
    throw new Error('Please specify a valid Spreadsheet URL. You can find' +
        ' a link to a template in the associated guide for this script.');


Still produces:

Completely at a loss on this one.

I'm the administrator of the Ad Words accounts. The spreadsheet is in my own drive.

-- 
Rocky Rawlins
Diet Direct Inc.

3200 Corporate Drive
Suite B
Wilmington, NC 28405

TF 800-882-4830 ext. 116
FAX: 910-395-2452

Website: http://www.DietDirect.com
email: rocky....@DietDirect.com
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "AdWords Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/245b491a-9ab8-4adf-9931-2afe15d85b95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tyler Sidell (AdWords Scripts Team)

unread,
Dec 6, 2016, 9:34:13 AM12/6/16
to AdWords Scripts Forum
Hi Rocky,

Thanks for more clarification on your issue. You do not need to change anything in the validateAndGetSpreadsheet function. Please keep the following and do not replace the spreadsheet url. 

function validateAndGetSpreadsheet(spreadsheeturl) {
if (spreadsheeturl == 'YOUR_SPREADSHEET_URL') {

throw new Error('Please specify a valid Spreadsheet URL. You can find' +
' a link to a template in the associated guide for this script.');
}
return SpreadsheetApp.openByUrl(spreadsheeturl);
}

You only need to change the spreadsheet url in one spot of the script:
Thanks,
Tyler Sidell
AdWords Scripts Team

Rocky Rawlins

unread,
Dec 6, 2016, 11:39:47 AM12/6/16
to AdWords Scripts Forum on behalf of Tyler Sidell (AdWords Scripts Team)

Thanks. That solved it. Appreciate the help.

-- 
Rocky Rawlins
Diet Direct Inc.

3200 Corporate Drive
Suite B
Wilmington, NC 28405

TF 800-882-4830 ext. 116
FAX: 910-395-2452

Website: http://www.DietDirect.com
email: rocky....@DietDirect.com

Yuda Ben - Menachem

unread,
Jul 22, 2018, 11:36:51 PM7/22/18
to AdWords Scripts Forum
Hi Tyler, iI have created the script eith your instructions and still have an error, only changed the URL in the var SPREADSHEET_URL above.



here is an image 



Yuda Ben - Menachem

unread,
Jul 22, 2018, 11:36:51 PM7/22/18
to AdWords Scripts Forum
Tyler, iv seen the issue is the sharing in the google sheets i have fixed that and now i get this message in the logs 


You do not have permissions to access the requested document. (line 70)

i am talking about this script https://developers.google.com/adwords/scripts/docs/solutions/account-summary



Please help 

Hiroyuki Miyauchi (AdWords Scripts Team)

unread,
Jul 23, 2018, 3:56:07 AM7/23/18
to AdWords Scripts Forum
Hello Yuda,

Could you confirm if the spreadsheet was made as a copy by the same email address with the one who authorized and run the script? If it's different email address, could you make a copy using the same email address and test the script again? If it's the same email address, please provide me your CID and script name, as well as spreadsheet access via Reply privately to author so I can further investigate.

Regards,
Hiroyuki
AdWords Scripts Team
Reply all
Reply to author
Forward
0 new messages