Hi,
Thank you for reaching out to the Google Ads Scripts support team.
I would like to inform you that to retrieve a campaign containing Festool, you can use “withCondition("campaign.name REGEXP_MATCH '.*Festool.*'")”. Given below is a sample code to retrieve search type campaigns based on the above condition.
function main(){
var campaignSelector = AdsApp
var campaignSelector = AdsApp.campaigns().withCondition("campaign.name REGEXP_MATCH '.*Festool.*'");
var campaignIterator = campaignSelector.get();
while (campaignIterator.hasNext()) {
var campaign = campaignIterator.next();
}
}
To retrieve PMax type of campaigns, you can use “AdsApp.performanceMaxCampaigns()” instead of “AdsApp().campaigns()”. I would recommend that you follow the “AdsApp.PerformanceMaxCampaignSelector”, “AdsApp.ShoppingCampaignSelector”, “AdsApp.VideoCampaignSelector”, and “AdsApp.CampaignSelector” for more information.
I hope this helps! If the issue still persists, kindly reach out to us with the below details.
You can share the requested details via Reply privately to the author option or a direct private reply to this email.
Thanks,
Google Ads Scripts team