A quick answer, instead of:
\"updateMask\": *Current_Campaign_Name*, 
try
\"updateMask\": [\"name\"]
I believe updateMask should be a list of field name(s) that you intend to 
update - you pass a value.


Further, the new campaign name should also be passed in double quotes.
I hope these suggestions work out.

On Friday, April 12, 2024 at 4:55:34 AM UTC+2 caroline oscarsson wrote:

>
> Hi, 
>
> I am getting errors in my Json script between google sheets and google 
> ads. The goal with the scenario is to update current campaign names with 
> new names found in the google sheet. When running the script, I get 404 
> error and can't figure out where the error is embedded in the script. I am 
> using an API tool service called Make.com, which is both storing my access 
> token and sends the output to the endpoint. I wonder if you could help me 
> with my script to find why I get errors?
>
> *The greenmarked text is dynamic variables, fyi*
>
> [ { "url": 
> "https://googleads.googleapis.com/v16/customers/*Customer-ID*//campaigns:mutate";,
>  
> "body": "{\n \"operations\": [\n {\n \"updateMask\": 
> *Current_Campaign_Name*,\n \"update\": {\n \"resource_name\": customers/
> *Customer-ID*/campaigns/*Campaign-ID*,\n \"name\": *New_Campaign_Name*\n 
> }\n }\n ]\n}", "method": "PUT", "headers": [ { "key": "Content-Type", 
> "value": "application/json" } ] } ]
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/dbf5b7b3-0eb9-4f97-9be0-e213b9420f5dn%40googlegroups.com.
  • Up... 'caroline oscarsson' via Google Ads API and AdWords API Forum
    • ... Zweitze
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to