I'm trying to attach an audience list - which I have already created on Google ads using the python api - to an existing campaign on the same Google ads account. I have both the ID of the campaign and the ID of the audience list, but I did not find any clear example in the documentation on how to attach an audience list to campaign.
Can anyone provide example on how the json object to be sent to google ads is structured to request adding an audience list to a campaign?
I tried to follow the reference guidelines in the documentation to compose the request json format object needed to be sent to add an audience list to a certain campaign .
```python
from googleads import adwords
import yaml
data = {} # should contain credentials for authentication
auth_data = yaml.dump(data)
client = adwords.AdWordsClient.LoadFromString(auth_data)
campaign_criterion_list_service = client.GetService(
'CampaignCriterionService', version='v201809')
operations = [
{
'operand': {
'campaignId': 1982314222, # some campaign in my account
'criterion': {
'type': 'USER_LIST',
'id': 823895895,# an existing audience list on my google ads account
},
'campaignCriterionStatus': 'ACTIVE'
},
'operator': 'ADD',
}
]
campaign_criterion_list_service.mutate(operations)```
But it fails providing the error
GoogleAdsServerFault: [CampaignCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand.criterion]And also searched for similar problems, found this solution in Java,but I did not succeed into coming up with a similar one in python.