Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Getting 'No campaign found with [Campaign ID]' error when pulling Performance Max spends into Google Sheets – Any suggestions?

25 views
Skip to first unread message

Rene Carling

unread,
Jan 28, 2025, 7:25:09 PMJan 28
to Google Ads Scripts Forum

I'm trying to pull spend data from my Google Ads campaigns into a Google Sheet using Google Apps Script. Everything works fine for most campaigns, but I'm getting the error "No campaign found with [Campaign ID]" when trying to pull data for Performance Max campaigns.

Here's a snippet of the code I’m using:

var campaignIterator = AdsApp.campaigns()
.withIds([campaignId])
.withCondition('Status = "ENABLED"')
.get();

Some additional details:

  • The campaign IDs are pulled from a sheet and seem correct.
  • I've double-checked the campaign status and they’re "ENABLED".
  • The campaign IDs are valid in the account (checked in Google Ads).
  • This only seems to happen for Performance Max campaigns.

Has anyone run into this issue before, or can anyone suggest a fix? I’ve already confirmed that the campaigns exist and are active in Google Ads. Could this be something specific to Performance Max campaigns, or am I missing something in the API request?

Would appreciate any help or suggestions!

Thanks in advance!

Google Ads Scripts Forum Advisor

unread,
Jan 28, 2025, 8:37:53 PMJan 28
to adwords...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads Scripts support team.

I would like to inform you that the Performance Max campaigns have separate methods to iterate by using the Google Ads Scripts. The default method “AdsApp.campaigns()” does not iterate through PMax campaigns. To work on PMax campaigns, I would recommend that you use the “AdsApp.performanceMaxCampaigns()” method.

For more information, I would suggest that you go through the documents “AdsApp.​PerformanceMaxCampaignSelector” and “AdsApp.​PerformanceMaxCampaignIterator”. 

I hope this helps. Feel free to reach out to us if you still face any issues.

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGyt3:ref" (ADR-00286217)

Thanks,
 
Google Logo Google Ads Scripts Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5



Reply all
Reply to author
Forward
0 new messages