Hello,
Thank you for reaching out to the Google Ads script support channel. I’m James, I’ll be assisting you with this.
Based on the given query, it appears that there are some issues with the formatting of your query. That said, you didn’t use any spaces between your selector, your FROM clause and your condition. Also, you didn’t include an AND operator and date segmentation on your last filter. Instead, you’ve directly used the DURING operator. Having said that, can you please try the following script converted into GAQL query below and observe if the issue will persist on your end?
function main() {
var spreadsheet = SpreadsheetApp.openByUrl('INSERT_SPREADSHEET_URL_HERE');
var sheet = spreadsheet.getSheetByName(’INSERT_SHEET_NAME_HERE’);
var report = AdsApp.report("SELECT campaign.name, ad_group.name, ad_group_ad.ad.id, ad_group_ad.policy_summary.approval_status FROM ad_group_ad WHERE ad_group_ad.policy_summary.approval_status = 'DISAPPROVED' AND ad_group_ad.status IN ('ENABLED', 'PAUSED') AND segments.date DURING TODAY");
report.exportToSheet(sheet);
}
For better construction of query. I would suggest that you use this Google Ads Query builder.
Regards,
|
||||||
|
||||||
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/NRaOUA-SKho/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/c59568ab-f68b-49bc-8bf8-db92a22100a1n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/b5227e9a-4ded-41e0-b9f1-93540efaff44n%40googlegroups.com.