Hi Luuk,
Thanks for providing more context to this as well as for confirming that those accounts are paused or deactivated. Kindly note that, by default, only ACTIVE accounts are retrieved by the selector in the new script experience unless you explicitly include the status of the account in the .withCondition method. With this, I would recommend testing the script with active child accounts.
Let us know how it goes on your end.
Best regards,
|
||||||
Hi Luuk,
Kindly note that the new Google Ads Scripts experience has a completely rewritten backend to take advantage of new features in the Google Ads API. It's infrastructure is based on the said API. With this, please refer to the Google Ads API resources documentation to check the filterable resource fields. You may navigate specifically to the customer_client report and try to use the field customer_client.status to filter the accounts.
As an aside, I'd also like to suggest you check this link for more information on how to query in the Google Ads API as it states these operators in the AdWords API WHERE clauses are not supported in the Google Ads API:
Let us know if you have any further clarifications.
Hi Luuk,
I'd like to reiterate that the new Google Ads Scripts experience has a completely rewritten backend to take advantage of new features in the Google Ads API. It's infrastructure is based on the said API. With this, I would suggest to refer to the Google Ads API resources documentation to check the filterable resource fields.
I checked the script you implemented and observed that you are not following the best practices as per our documentation. It appears that you are looping through two account IDs and then applying the condition to it which may have caused the issue. I would recommend to follow the sample implementation as per our documentation. You may follow this simple script I've created:
var accountSelector = AdsManagerApp
.accounts()
.withCondition("customer_client.status IN ('CANCELED','CLOSED','ENABLED','SUSPENDED','UNKNOWN')")
;
var accountIterator = accountSelector.get();
while (accountIterator.hasNext()) {
var account = accountIterator.next();
console.log(account.getName())
}
Let us know if you still encounter any issues on your end.
Hi Luuk,
We were able to reproduce the issue on our end, and will be raising this to our wider team for further investigation. We'll be getting back with relevant information once we hear any from them soon.
Your patience is greatly appreciated.
Best regards,
![]() |
Google Ads Scripts Team |
Hello Luuk,
Your patience is greatly appreciated, however, I'm afraid we do not have any updates to share with you yet. I'll follow-up on the issue and we'll get back the soonest we do receive a response with relevant information.
Hi Luuk,
I'm afraid we do not have any updates to share yet. Allow me to follow up and our team will get back soon as we hear anything from our wider team.
![]() |
Google Ads Scripts Team |