GMC scripy failed to run

69 views
Skip to first unread message

Hadrien GRACH

unread,
Oct 19, 2021, 6:32:14 AM10/19/21
to Google Ads Scripts Forum
Hi,
I added this Merchant Center Monitoring script from Norisk (code here) to our MCC.
I've change the config start part (from line 9 to line 39) accordingly.

When I run the preview, I have the following error message: "The number of rows in the range must be at least 1. (file Code.gs, line 274)".

Could you help me to debug this script, please?

Thank you.
Best regards,
Hadrien

Google Ads Scripts Forum Advisor

unread,
Oct 20, 2021, 4:00:41 AM10/20/21
to adwords...@googlegroups.com
Hi Hadrien,

For us to assist you further, could you please provide the following details via Reply privately to author option?
  • CID
  • Script Name
  • Shareable link of the spreadsheet being used in the script (if any)
In case you encounter an error when using the mentioned option, you can send the requested information on this email (googleadsscr...@google.com) instead, then let us know here once sent.

Regards,
Google Logo
Teejay Wennie Pimentel
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2PKmzU:ref
Message has been deleted

Hadrien GRACH

unread,
Oct 20, 2021, 12:45:21 PM10/20/21
to Google Ads Scripts Forum
Hi Teejay,

Thanks for your reply. I don't have the permission to reply privately so I sent you an email (Object: GMC scripy failed to run (ref:_00D1U1174p._5004Q2PKmzU:ref))

Best regards,
Hadrien
Message has been deleted

Hadrien GRACH

unread,
Oct 21, 2021, 5:12:52 AM10/21/21
to Google Ads Scripts Forum
Hi Teejay,

I shared it with the provided email address.

Thanks,
Hadrien
On Thursday, October 21, 2021 at 8:39:55 AM UTC+2 adsscripts wrote:
Hi Hadrien,

Thank you for sharing the requested details privately. Unfortunately, I wasn't able to access your spreadsheet due to restrictions. Could you please provide the shareable link of the spreadsheet (privately), or share it directly to rheascriptsteejaywennie@gmail.com, then let us know here once the access has been provided?

Google Ads Scripts Forum Advisor

unread,
Oct 21, 2021, 11:25:55 PM10/21/21
to adwords...@googlegroups.com
Hi Hadrien,

Thanks for providing the requested details. Harry here, I work along Teejay.

It does not seem that you are still encountering the same issue you reported initially but is still unable to run the script successfully. Now, looking at the latest execution of the script, you would have to enable the Shopping Content API on your end to resolve the issue. You can perform this by going through the script itself and click on ADVANCED APIS on the top right side of the script editor beside the DOCUMENTATION button. After that the 'Advanced APIs' dialog will appear then choose to enable 'Shopping content'.

Kindly try and let me know how it goes.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2PKmzU:ref

Hadrien GRACH

unread,
Oct 25, 2021, 10:36:07 AM10/25/21
to Google Ads Scripts Forum
Hi Harry,

I enabled the 'Shopping Content' option under 'Advanced APIs'. But, the script still failed to run. The same error message is displayed:  the number of rows in the range must be at least 1. (file Code.gs, line 274)

Thanks for your help.
Hadrien

Google Ads Scripts Forum Advisor

unread,
Oct 26, 2021, 1:38:24 AM10/26/21
to adwords...@googlegroups.com
Hi Hadrien,

Thanks for coming back. It seems that upon making a copy of the template spreadsheet, you may have also removed columns and rows in each sheet. Can you kindly make a new copy of the sheet to have an original template and update the SPREADSHEET_ID on line 21 again?

Hadrien GRACH

unread,
Oct 27, 2021, 10:44:59 AM10/27/21
to Google Ads Scripts Forum

Hi Harry,

I've made the changes. I still have the same error message:
The number of rows in the range must be at least 1. (file Code.gs, line 290)
It was line 274 before, now it's line 290.

Do I need to change something on the spreadsheet?

Many thanks,
Hadrien

Google Ads Scripts Forum Advisor

unread,
Oct 28, 2021, 4:45:30 AM10/28/21
to adwords...@googlegroups.com
Hi Hadrien,

Thanks trying that to troubleshoot the issue. Could you privately provide a shareable link to the new template spreadsheet you have created so I can have a look with that? You can provide them through the options mentioned previously.

On the other hand, I do not believe you need to make changes to the spreadsheet as they are already templates created to work with the script in question specifically. If you do believe otherwise, it is best to reach out to the script author as they have more insights on how the script was implemented and if you can make changes to sheet to resolve the issue you are encountering.

Looking forward to your reply.
Message has been deleted

Google Ads Scripts Forum Advisor

unread,
Oct 28, 2021, 10:55:39 PM10/28/21
to adwords...@googlegroups.com
Hi Hadrien,

Thanks for coming back. Could you check if the Content API for Shopping is enabled in your Google Cloud Platform account > API console page? Kindly double check it through the email you use to create the script and or log into Google Ads. Please see Enabling Advanced APIs in this regard.

Hadrien GRACH

unread,
Oct 29, 2021, 11:02:37 AM10/29/21
to Google Ads Scripts Forum
Hi Harry,
I've checked and the Content API for Shopping is enabled as you can see on the attached screenshot. 
Many thanks,
Hadrien
screenshot.PNG

Google Ads Scripts Forum Advisor

unread,
Nov 2, 2021, 4:39:08 AM11/2/21
to adwords...@googlegroups.com
Hi Hadrien,

Thank for your continued cooperation here. It looks like that the issue you are encountering is specific to how your script uses the Spreadsheet Service that is around line 290 in your script code rather than an issue with the Google Ads scripts platform. With this, I would recommend that you reach out to the author of the script and or the Google Apps Script Team/Community instead for better assistance and insights on resolving the issue you are encountering.

Should you have other questions/concerns with Google Ads scripts, please let me know.
Reply all
Reply to author
Forward
0 new messages