Error in BETA scripting when editing price extensions

242 views
Skip to first unread message

Pascal

unread,
Nov 9, 2021, 10:37:08 AM11/9/21
to Google Ads Scripts Forum
Hi,

I've written a script to automatically keep our price extensions up-to-date based on feed data. Since bulk uploads are not available for price extensions I have to remove and add price items to existing price extensions in order to update them.

This works perfectly fine with the old scripting interface, but since the account contains quite a few price extensions it takes a lot of API calls. This poses issues with the maximum runtime; depending on the number of price extensions that need to be updated the script will sometimes exceed maximum execution time.

I tried switching to the new BETA scripting experience to utilize the improved performance, but this leaves the script useless due to unexplainable errors. When trying to remove price items I get the following error message.

InputError: Price item with header 'XXX' and description 'XXX' matched multiple items on the price extension.
    at n (adsapp_compiled:346:11)
    at tl.remove (adsapp_compiled:3514:5)
    at Object.<anonymous> (adsapp_compiled:14633:46)

Could you please check what is causing this error? Thanks in advance.

Kind regards,

Pascal

Google Ads Scripts Forum Advisor

unread,
Nov 10, 2021, 1:38:19 AM11/10/21
to adwords...@googlegroups.com
Hi Pascal,

Thank you for reaching out to us.

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._5004Q2R7Zlg:ref

Google Ads Scripts Forum Advisor

unread,
Nov 11, 2021, 4:56:52 AM11/11/21
to adwords...@googlegroups.com
Hi Pascal,

Thanks for coming back. I work along Teejay on the same team.

It looks like you use a template spreadsheet in your script so you would you mind providing a shareable link of that so I can fully troubleshoot your script on our end? On the other hand, can you kindly confirm if you only encounter the issue using the new Google Ads Scripts Beta or by turning on the new scripts experience option? Can you kindly execute the script with this option turned off and let me know how it goes?

Looking forward to your reply.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2R7Zlg:ref

Pascal

unread,
Nov 11, 2021, 7:23:16 AM11/11/21
to Google Ads Scripts Forum
Hi Harry,

I have sent a shareable link via e-mail. The first tab of the spreadsheet is used to store existing item IDs and the corresponding product category.

Isn't the Beta and new scripts experience the same? The error only occurs when I enable it in the script itself yes. When I use the default scripting experience everything works fine, but as stated in my initial post, execution times can sometimes exceed the maximum of 30 minutes. That's why I wanted to test the new scripts experience, since it should have faster entity processing.

Kind regards,

Pascal

Google Ads Scripts Forum Advisor

unread,
Nov 12, 2021, 2:31:11 AM11/12/21
to adwords...@googlegroups.com
Hi Pascal,

Thanks for coming back. Unfortunately, I was not able to fully troubleshoot your script on my end as it uses the Analytics Service to use the Google Analytics and the UrlFetchApp access other resources on the web in which I won't have access/visibility to. Would you be able to provide a shortened version of your script which could replicate the multiple price item issue?

For the time out issue you are encountering, I would recommend to somehow limit the data that the script would expect to handle and reassess how you structured your script to somehow alleviate its execution time.

Let me know your thoughts.

Pascal

unread,
Nov 15, 2021, 6:34:29 AM11/15/21
to Google Ads Scripts Forum
Hi Harry,

I have created a shortened version of the script without the advanced API's. It's listed under the same account with the following script name: 'Price Extension Test'. Could you please have a look what's causing this error? Thanks.

Kind regards,

Pascal

Google Ads Scripts Forum Advisor

unread,
Nov 16, 2021, 1:42:03 AM11/16/21
to adwords...@googlegroups.com
Hi Pascal,

Thank you for getting back to us. Unfortunately, I wasn't able to find the script "price extension test" on the CID that you provided on this thread. Could you please provide where the script is implemented, so we could check?

Regards,
Google Logo
Teejay Wennie Pimentel
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2R7Zlg:ref

Pascal

unread,
Nov 16, 2021, 3:07:47 AM11/16/21
to Google Ads Scripts Forum
Hi Harry,

I just checked but the script should definitely be in that account. Perhaps you have set your overview to 10 rows? It's the 11th script within the overview, so perhaps it was pushed to the second page. Could you please check again?

Kind regards,

Pascal

Google Ads Scripts Forum Advisor

unread,
Nov 17, 2021, 2:58:19 AM11/17/21
to adwords...@googlegroups.com
Hi Pascal,

Thanks for creating the shortened version of the script. Allow me to take this with the rest of team to further investigate on what causes the issue when running the script using beta. I would recommend using the current scripts version and make separate instances of your script to avoid the timeout issues while we sort out the issue at hand.

Let me know if you have other questions/concerns I can assist you with.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2R7Zlg:ref

Pascal

unread,
Nov 17, 2021, 3:31:34 AM11/17/21
to Google Ads Scripts Forum
Thank you Harry. Looking forward to hearing from you!

Kind regards,

Pascal

Pascal

unread,
Dec 3, 2021, 8:01:36 AM12/3/21
to Google Ads Scripts Forum
Hi Harry, 

Any news on the issue yet? Have a great weekend.

Kind regards,

Pascal

Google Ads Scripts Forum Advisor

unread,
Dec 6, 2021, 1:56:33 AM12/6/21
to adwords...@googlegroups.com
Hi Pascal,

Thanks for following up here. Hope that you are well.

Allow me to ask the rest of the team of progress made regarding the issue and get back to you once I hear back from them. In the meantime, please do let me know how I can be of assistance to you.

Pascal

unread,
Feb 24, 2022, 2:59:30 AM2/24/22
to Google Ads Scripts Forum
Hi Harry,

It's been almost 4 months now. Could you please let me know what progress has been made?

Kind regards,

Pascal

Google Ads Scripts Forum Advisor

unread,
Mar 1, 2022, 12:54:02 AM3/1/22
to adwords...@googlegroups.com

Hello Pascal,

I’m James, also a member of the Google Ads Scripts support team. 

Unfortunately, there are no significant updates yet from the team. However, I assured you that we are closely working with this issue and we will get back to you with an update.

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2R7Zlg:ref

Pascal

unread,
Mar 4, 2022, 4:13:43 AM3/4/22
to Google Ads Scripts Forum
Hi James,

Thanks for the reply. Looking forward to hearing from you. When do you expect you could give me an update?

Kind regards,

Pascal

Google Ads Scripts Forum Advisor

unread,
Mar 8, 2022, 4:30:53 AM3/8/22
to adwords...@googlegroups.com
Hi Pascal,

I'm afraid that we cannot provide a definite timeline on investigation. However, rest assured that the team is actively working this. I'll update this thread the soonest the team share their findings.

Regards,
Google Logo
Teejay Wennie
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2R7Zlg:ref

Deepak Thirumurugan

unread,
Mar 30, 2022, 4:45:23 AM3/30/22
to Google Ads Scripts Forum
Hi Pascal, 
I currently have a script in place which only adds price extensions, but I am also searching possible ways update price items in the existing extension in stead of having to add new extension everytime. It would be great if you could share the script which enables me to remove and add price items to existing price extensions

Regards, 
Deepak

Pascal van Dooren

unread,
Mar 30, 2022, 8:31:55 AM3/30/22
to Google Ads Scripts Forum
Hi Deepak,

Since the Google support never checked out the issue I can't help you with a solution within the new script experience.

Basically the concept to update your price extensions works as follows:
  1. Select the price extension
  2. Remove the existing items until the minimum of 3 required items remain
  3. Add 3 unique dummy items to the price extension
  4. Remove the last 3 remaining out-of-date price items
  5. Add the new price items while removing a dummy item on the first 3 iterations
Hope this makes sense. Unfortunately this is the only possibility I have found so far to update existing price extension.

Google Ads Scripts Forum Advisor

unread,
Mar 31, 2022, 11:30:37 PM3/31/22
to adwords...@googlegroups.com

Hello Deepak,

 

Michael here from Google Ads scripts Team.

 

As updating price item values is currently not supported, you may try the work around provided by Pascal and see if it would fit your use case.

 

On the other hand, kindly provide the following information so we can have closer look to your concern:

  • Customer ID / CID
  • Scriptname
  • Screenshot of the issue

Regards,

Google Logo
Michael Angelo
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2ZI0Sn:ref

Deepak Thirumurugan

unread,
Apr 4, 2022, 4:27:57 AM4/4/22
to Google Ads Scripts Forum
Hi Pascal,
Thank you for your response and basing out the logic. This is helpful as it could be on possible solution for updating prices. But a quick question here, the remove function removes the entire price item added as an extension at campaign level right? Or is it possible to remove only slected price items within an extension say item header 1,2 and 3 and leave rest other item headers and its corresponding prices.

Regards, 
Deepak

Pascal van Dooren

unread,
Apr 5, 2022, 3:18:26 AM4/5/22
to Google Ads Scripts Forum
Hi Deepak,

The getPriceItems() method returns an array of price items. You can iterate through this array or call a specific index which you would like to remove. This array will remain the same as long as you don't call the getPriceItems() method again.

In the back-end, removing price items (except for the last one) will shift the remaining price items to the front. This means that all newly added price items will be added at the end of the price extension, so you can't insert new items in a specific location/index. To reflect changes made (such as removing or adding items) you'll have to call the getPriceItems() again.

Deepak Thirumurugan

unread,
Apr 5, 2022, 8:16:28 AM4/5/22
to Google Ads Scripts Forum
Hi Pascal,

Thank you for your quick response and the headsup for the remove function. So basically removing all price items in the extension is not possible right? Remove function would keep 3 price items minimum

Pascal van Dooren

unread,
Apr 5, 2022, 8:22:38 AM4/5/22
to Google Ads Scripts Forum
Hi Deepak,

That is correct. It is required to have a minimum of 3 items. And since you can't have duplicate items either, it's key that you add 3 unique dummy items before you start adding items again to prevent conflicts.

It is not possible to completely remove the entire price extension. So if you want to deactivate it via a script I would recommend to set an end or (future) start date or unlink it from all campaigns.

Deepak Thirumurugan

unread,
Apr 5, 2022, 8:25:19 AM4/5/22
to Google Ads Scripts Forum
Hi Pascal,

Thank you so much for the insights, really helpful. Hope Google comes with bulk schedule function or set amount function soon which only makes a lot more sense than other set functions

Google Ads Scripts Forum Advisor

unread,
Apr 6, 2022, 7:26:29 AM4/6/22
to adwords...@googlegroups.com

Hello Pascal,

Thank you for sharing your insights with Deepak.  Your suggestion appears to be correct and helpful in a way. 

@Deepak, please let us know if you have any further questions or concerns. I’ll be happy to assist you.

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2ZI0Sn:ref

Pascal van Dooren

unread,
May 10, 2022, 8:48:38 AM5/10/22
to Google Ads Scripts Forum
Hi James,

Could you please provide me with an update. It has been almost 7 months ago since this issue was addressed with the development team. Surely there must be some progress.

I have been very patient, but I'm really getting the impression Google is not doing anything at all to solve bugs and issues. Over the past few months I have flagged many bugs, but never have I received even one single update, even though I was promised the team would investigate them.

Many of our clients depend on these automation solutions to work and often even pay us to build these solutions. It's impossible to keep telling our clients that scripts are not working for months on end due to a lack of support on Google's side.

Pascal van Dooren

unread,
May 12, 2022, 7:57:26 AM5/12/22
to Google Ads Scripts Forum
It seems another error has surfaced when creating price extensions. Everytime I try to create a price extension with 8 price items (which is the allowed maximum) the script falsely throws the following error:

InputError: Can't build price extension: at most eight PriceItems are allowed
  at Kk (adsapp_compiled:3260:11)
  at bm.build (adsapp_compiled:3905:5)
  at Qo.build (adsapp_compiled:5871:23)
  at Object.<anonymous> (adsapp_compiled:18324:54)

Google Ads Scripts Forum Advisor

unread,
May 12, 2022, 9:34:30 PM5/12/22
to adwords...@googlegroups.com

Hello Pascal,

I understand the inconvenience that this might have caused you on your end and apologize that this issue has been taking a while to be resolved. However, I assure you that we are doing everything in our ability to fix all the pending issues on our end. Allow me to forward your exact response to our internal team as a follow up and rest assured that we will update this thread once we have received any feedback from the team.

Regarding the new issue upon creating a price extension, can you please provide us with the following items so that we can check this first?

  • Google Ads account ID / CID
  • Name of the affected script

Pascal van Dooren

unread,
May 13, 2022, 4:40:27 AM5/13/22
to Google Ads Scripts Forum
Hi James,

I have created a simple script to show the error. The script is named 'Price Extension Test' and is placed within the following account:  284-918-9430.

As you'll see the script tries to create a price extension with exactly 8 price items, but will still throw an error saying at most eight price items are allowed.

The script works perfectly fine in the legacy script experience (you'll just have to change the 'unit' from 'UNSPECIFIED' to 'NONE' since these values are different in the old and new script experience).

Looking forward to hearing from you. We have lots of scripts to transfer to the new script experience before the migration on November the 1st, and new bugs are popping up every week. Having this many scripts not working after the migration would be catastrophic for us.

Google Ads Scripts Forum Advisor

unread,
May 17, 2022, 1:39:04 AM5/17/22
to adwords...@googlegroups.com
Hi Pascal,

Thank you for providing the requested information.

I tested your script and can confirm the reported issue on my end. With that, let me share this to the rest of the team for further investigation. I'll update this thread the soonest the team share their feedback.

Regards,
Google Logo
Teejay Wennie
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2ZI0Sn:ref

Pascal van Dooren

unread,
May 17, 2022, 3:29:12 AM5/17/22
to Google Ads Scripts Forum
Thanks Teejay, looking forward to hearing from you.

Kind regards,

Pascal

Google Ads Scripts Forum Advisor

unread,
Jul 21, 2022, 4:57:30 AM7/21/22
to adwords...@googlegroups.com

Hi Team,

 

This is Yasmin from the Google Ads Scripts team. Hope you are doing well.

 

Just bumping up this thread. I'd like to inform you that this issue has been fixed. Should you still encounter an issue on your side, just let us know.

 

Cheers,

 

Google Logo
Yasmin Gabrielle
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2R7Zlg:ref

Google Ads Scripts Forum Advisor

unread,
Aug 30, 2022, 3:46:02 AM8/30/22
to adwords...@googlegroups.com

Hi Pascal,

 

This is Yasmin from the Google Ads Scripts team.

 

Just circling back to this. I heard back from the team and it appears that this issue is already fixed. Should you encounter any issues on your end, just let us know.

 

Regards,

 

 

Google Logo
Yasmin Gabrielle
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2ZI0Sn:ref
Reply all
Reply to author
Forward
0 new messages