Create Label not working with Google Ads API package by Opteo

41 views
Skip to first unread message

Deepak Chand

unread,
Jul 30, 2020, 8:18:12 AM7/30/20
to AdWords API and Google Ads API Forum
Hi Everyone,

I want to integrate GAQL scripts in Node Js. I have gone through the documentation of  Google Ads API package by Opteo which I find relevant as per my needs for creating capmaigns , reporting etc.

https://opteo.com/dev/google-ads-api/#features

But I cannot create label :


const labelData = {
name: "DCR123",
status: 2
};

await customer.labels
.create(labelData)
.then(response => console.log(response))
.catch(err => console.log(err));


I am getting error: 

Error: Attempted to set value "DCR123" on invalid path "name" in resource
    at toProtoValueFormat (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-node/build/lib/utils.js:191:15)
    at unroll (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-node/build/lib/utils.js:182:19)
    at Object.convertToProtoFormat (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-node/build/lib/utils.js:178:26)
    at GoogleAdsClient.buildResource (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-node/build/lib/client.js:99:41)
    at GrpcClient.buildResource (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-api/build/grpc.js:134:28)
    at LabelService.buildResource (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-api/build/services/service.js:212:32)
    at LabelService.<anonymous> (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-api/build/services/service.js:103:33)
    at Generator.next (<anonymous>)
    at /home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-api/build/services/service.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-api/build/services/service.js:4:12)
    at LabelService.serviceCreate (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-api/build/services/service.js:93:16)
    at LabelService.<anonymous> (/home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-api/build/services/label.js:44:25)
    at Generator.next (<anonymous>)
    at /home/deepak/DCR/DAN/dan-service-kitchen-sink/node_modules/google-ads-api/build/services/label.js:8:71
    at new Promise (<anonymous>)


Can anyone provide help, how we can create labels using google ads api in node.




Google Ads API Forum Advisor Prod

unread,
Jul 30, 2020, 1:39:31 PM7/30/20
to deepak...@successive.tech, adwor...@googlegroups.com

Hi Deepak,

Thank you for reaching out. As the official Google Ads API does not include the Node.js client library, we could not provide assistance for the integration with Node.js. Please reach out to the third party library provider for further assistance.

Thanks and regards,
Xiaoming, Google Ads API Team



 

ref:_00D1U1174p._5004Q22aHVq:ref

Deepak Chand

unread,
Jul 31, 2020, 12:15:41 AM7/31/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Thank you for your response. 
--
Deepak Chand
Engineer
Successive Technologies
A Deloitte Technology Fast 50 Company

INDIA | NORWAY | USA


CONFIDENTIALITY NOTICE
This email (including any attachments) may contain confidential, proprietary and/or privileged information, if you are not the intended recipient, or the person responsible for delivering the message to the intended recipient then please notify us by return email immediately. Should you have received this email in error then you should not copy this for any purpose nor disclose its contents to any other person.
Reply all
Reply to author
Forward
0 new messages