Select all product group from specific shopping ad group via script
Hello, i am trying to make a script for automatic bidding in shopping campaigns.
It should read ad group ID's and some modificator (required CPA) from spreadsheet and set maxCPC for every product group, where CPA is bellow.
The problem is ad group doesn't know which product groups contains, so I have to every product group, read his ad group ID and look for it in spreatsheet, if there is a match, i can set maxCPC or skip to another product group.
This will execute too long, does anyone have idea how to make this script more effective? What i want is read row with AdGroup ID, then select all product groups in and work with them, then read second row and so on..
Thanks for any advice.