Hi,
Thank you for reaching out to the Google Ads Scripts support team.
To help us analyze the issue further, please provide the following details:

--
-- 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/3YTrdeRkV_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/adwords-scripts/148cac48-f8e6-484b-bad5-5095d7491670n%40googlegroups.com.
Hi,
Thank you for reaching out to the Google Ads Scripts support team.
I would like to inform you that the resource “CAMPAIGN_PERFORMANCE_REPORT” you are using in the query at line 36 is outdated and it won’t work as intended. I would recommend that you replace your current query with the following query so that the data will be retrieved correctly.
const query = `SELECT campaign.name, metrics.cost_micros, segments.date FROM campaign WHERE metrics.cost_micros > 0 AND segments.date BETWEEN ${startDate} AND ${yesterday};`
Please be noted that the metric “metrics.cost_micros” will retrieve the data 1000000 times to that of the actual value. So, I would request that you use “parseFloat(row['metrics.cost_micros']/1000000)” while exporting the data to the spreadsheet.
I hope this helps! Feel free to get back to us if you still face any issues.
![]() |
Google Ads Scripts Team |
[2025-06-18 20:25:28Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rfi1K:ref" (ADR-00314877)
Hello, I've applied the change, but now all my cost values are pulling #NUM! or zero values. What could be causing this and how to troubleshoot?
Hi,
I could see that you are using a different field “metrics.costMicros” in the query. As mentioned earlier, kindly replace it with the “metrics.cost_micros” at the SELECT and WHERE fields in the query. You can also go through the code available in the script “CP Test Script - Google Cost Weekly Pull (copy)” for your reference. Additionally, you can utilize the Google Ads Query Builder and Query Validator to build and validate the queries for retrieving the data from the Google Ads API.
I hope this helps! Feel free to get back to us for further issues.
![]() |
Google Ads Scripts Team |
[2025-06-18 22:34:53Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rfi1K:ref" (ADR-00314877)
--
-- 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/3YTrdeRkV_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/adwords-scripts/1cecd302-a8a0-434e-879a-d61f0d29fd00n%40googlegroups.com.