Hello all,

We are aware of the frequent requests for this feature. I will pass along 
to the team how important it is to get official support so that you don't 
have to use custom workarounds with AdWords Scripts.

Regards,
Mike, AdWords API Team

On Friday, June 13, 2014 5:26:36 AM UTC-4, Ben Marengo wrote:
>
> great, thanks. i'll give it a whirl!
>
> On Friday, 13 June 2014 11:22:12 UTC+2, DavM wrote:
>>
>> Here you go! You still need to create an endpoint that will take the 
>> posted label mappings, I hope it helps!
>>
>> Use at your own risk, don't blame me if it breaks everything, etc:
>>
>> //Set "apiUrlAndKey" to url of API enpoint that accepts post of json data 
>> with mappings
>> var apiUrlAndKey = '__API_URL__';
>>
>> function main() {
>>   var labelUpdates = [];
>>   //Push all label names to array
>>   var labelNames = getAllLabels();
>>   
>>   //Iterate through all labels
>>   labelNames.forEach(function (labelName) {
>>     //Iterate through all campaigns with that label
>>     var campaignIterator = AdWordsApp.campaigns()
>>         .withCondition('LabelNames CONTAINS_ANY ["' + labelName + '"]')
>>         .get();
>>     while (campaignIterator.hasNext()) {
>>       var campaign = campaignIterator.next();
>>       //Push update to object array
>>       labelUpdates.push({label: labelName, campaignId: campaign.getId()});
>>     }
>>   });
>>
>>   var req = JSON.stringify(labelUpdates);
>>   
>>   //Call api with mappings
>>   //You can add authorization header to authenticate or send internal api 
>> key in query string
>>   var options = {
>>     method: 'POST',
>>     payload: req,
>>     contentType: 'application/json'
>>   };
>>   
>>   Logger.log('Sending request to API: ' + req);
>>   var resp = UrlFetchApp.fetch(apiUrlAndKey, options).getContentText();
>>   Logger.log('Response from API: ' + resp);
>> }
>>
>> function getAllLabels() {
>>   var labelNames = [];
>>   var labelIterator = AdWordsApp.labels().get();  
>>   while (labelIterator.hasNext()) {
>>     var label = labelIterator.next();
>>     labelNames.push(label.getName());
>>   }
>>   return labelNames;
>> }
>>
>>
>> On Friday, 13 June 2014 07:55:42 UTC+1, Ben Marengo wrote:
>>>
>>> yes please!
>>>
>>> On Thursday, 12 June 2014 18:05:11 UTC+2, DavM wrote:
>>>>
>>>> I've managed to find a workaround which involves creating an AdWords 
>>>> script that runs hourly and collects all the label/campaign mappings (we 
>>>> only need campaign-level labels) and posts them to our API.
>>>>
>>>> It's not pretty, but it works! I can post the code if anyone is 
>>>> interested...
>>>>
>>>> On Monday, 28 April 2014 19:24:58 UTC+1, Josh Radcliff (AdWords API 
>>>> Team) wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> We're very much aware that there is great interest in adding this 
>>>>> feature, but I don't have a date at this time.
>>>>>
>>>>> Cheers,
>>>>> Josh, AdWords API Team
>>>>>
>>>>> On Thursday, April 24, 2014 9:11:01 AM UTC-4, Amol Sharma wrote:
>>>>>>
>>>>>> +1
>>>>>>
>>>>>> --
>>>>>> Thanks and Regards,
>>>>>> Amol Sharma
>>>>>>
>>>>>>  
>>>>>>
>>>>>> On Thu, Apr 24, 2014 at 6:39 PM, DavM <> wrote:
>>>>>>
>>>>>>> +1 for Label support in AdWords API...
>>>>>>>
>>>>>>> On Thursday, 16 January 2014 17:12:30 UTC, Ray Tsang (AdWords API 
>>>>>>> Team) wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm sorry to inform you that I won't be able to comment on a 
>>>>>>>> release date.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> --
>>>>>>>> Ray Tsang (AdWords API Advisor)
>>>>>>>>
>>>>>>>>
>>>>>>>> On Monday, January 13, 2014 7:51:10 PM UTC-5, adw...@tallemu.com 
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Thanks David, is there any update about this in near feuture?
>>>>>>>>>
>>>>>>>>> On Thursday, October 10, 2013 8:31:30 AM UTC+11, David Torres 
>>>>>>>>> (AdWords API Team) wrote:
>>>>>>>>>>
>>>>>>>>>> Hi All,
>>>>>>>>>>
>>>>>>>>>> Labels is definitively in our TODO list but I can't give a 
>>>>>>>>>> release date yet.
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>>
>>>>>>>>>> - David Torres - AdWords API Team
>>>>>>>>>>
>>>>>>>>>> On Monday, October 7, 2013 7:26:52 PM UTC-4, 
>>>>>>>>>> bg...@walmartlabs.com wrote:
>>>>>>>>>>>
>>>>>>>>>>> +1. This will be very useful API feature.
>>>>>>>>>>>
>>>>>>>>>>> On Monday, September 16, 2013 2:22:41 AM UTC-7, Pau Gargallo 
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> +1
>>>>>>>>>>>>
>>>>>>>>>>>> pau
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thursday, April 4, 2013 9:34:17 AM UTC+2, Oliver wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Another +1 to add labels please.  It's one of the most useful 
>>>>>>>>>>>>> and powerful features in adwords.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Oliver
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Wednesday, April 3, 2013 10:44:02 PM UTC+1, Vanessa Sabino 
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> +1 to please add labels to the API!
>>>>>>>>>>>>>> With the 30 minutes timeout limit for AdWords scripts, it's a 
>>>>>>>>>>>>>> huge pain to bulk edit the labels there.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>  -- 
>>>>>>> -- 
>>>>>>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>>>>>>> Also find us on our blog and Google+:
>>>>>>> https://googleadsdeveloper.blogspot.com/
>>>>>>> https://plus.google.com/+GoogleAdsDevelopers/posts
>>>>>>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>>>>>>>  
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "AdWords API Forum" group.
>>>>>>> To post to this group, send email to adwor...@googlegroups.com
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> adwords-api...@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 "AdWords API Forum" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to adwords-api...@googlegroups.com.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to