hi,
I am at a complete loss with a script problem and hoping someone can shed some light on what might be happening. I have exhausted every solution i can think of.
the script is meant to monitor the budgets of all active campaigns hourly and send a slack alert when a budget is changed.
It works flawlessly for our standard search campaigns.
It cannot find or manage any of our shopping campaigns. it's as if they are invisible to the script's management functions.
Our environment seems to be a key part of the puzzle. while the main script list page appears to be the modern ui ("powered by apps script"), during troubleshooting we have encountered errors (like isShared is not a function) that are characteristic of the older, classic editor. this conflicting evidence has made debugging very difficult. the script is running directly inside a single client account, not at the mcc level.
Summary of what we've tried
here is a list of everything we have tried that has failed:
Generic campaign selector: we started with AdsApp.campaigns().get(). this only ever returns our search campaigns and ignores all shopping campaigns.
Specific shopping selector: we then used AdsApp.shoppingCampaigns().get(). this returns nothing, even though we have multiple active and eligible shopping campaigns.
Performance max selector: just in case the campaigns had been upgraded, we also tried AdsApp.performanceMaxCampaigns().get(). this also returned nothing.
Report-based workaround: this was our most robust attempt. we used AdsApp.report() to run a CAMPAIGN_PERFORMANCE_REPORT.
The report successfully lists the shopping campaigns, so we are able to retrieve their CampaignName and CampaignId.
However, when we immediately use that id to fetch the campaign entity (AdsApp.campaigns().withIds([campaignId]).get()), the script still cannot get the campaign's budget.
We seem to be in a state where the reporting api can see the campaign data, but the scripting api cannot fetch the campaign entity itself to manage it.
Has anyone ever encountered a situation like this, where shopping campaigns are invisible to all selectors and management functions, even when they appear in reports? is there any other method to get a handle on a campaign object that we might be missing?
Any help or insight would be massively appreciated. thank you.
Hi,
Thank you for reaching out to the Google Ads Scripts support team.
In order to investigate further on this issue, kindly provide us with the following details.
You can share the requested details via Reply privately to the author option or a direct private reply to this email.
Thanks,