Upload users to CRM based user list
See original GitHub issueHi Opteo team!
I’ve been trying to upload users to a Customer Match user list but getting a weird response from Google. I’m able to create the user list and the offline user data job, but when uploading the users, the API responds with:
Upload data is not compatible with the upload key type of the associated user list., at operations[0].create.user_identifiers[0].external_user_id
The operation works from the UI without a problem, even with user lists created with this library.
When retrieving the user list, the upload key matches with what I’m sending. Here is how I’m using the library (google-ads-api v5.1.1, google-ads-node v4.0.2):
// This works
const userListResp = await customer.userLists.create([{
name: "my-user-list",
description: "Test Customer Match audience created by google-ads-api",
membership_life_span: 15,
crm_based_user_list: {
upload_key_type: "CONTACT_INFO"
},
}]);
// This works
const jobRequest = new services.CreateOfflineUserDataJobRequest({
customer_id: ACCOUNT_ID,
job: {
type: "CUSTOMER_MATCH_USER_LIST",
customer_match_user_list_metadata: { user_list:userListResp.results[0].resource_name },
},
});
const jobResp = await customer.offlineUserDataJobs.createOfflineUserDataJob(jobRequest);
// Users
const user1 = common.UserData.create({
user_identifiers: [
common.UserIdentifier.create({address_info: common.OfflineUserAddressInfo.create({
city: "San Francisco,
postal_code: "94111",
country_code: "US",
hashed_first_name: hashIdentifier("First"),
hashed_last_name: hashIdentifier("Name"),
})}),
]
});
const user2 = common.UserData.create({
user_identifiers: [
common.UserIdentifier.create({hashed_email: hashIdentifier("mail@example.com")})
],
});
const user3 = common.UserData.create({
user_identifiers: [
common.UserIdentifier.create({hashed_phone_number: hashIdentifier("+442070313000")})
],
});
const operations = [
{ create: user1 },
{ create: user2 },
{ create: user3 },
]
const operationsRequest = new services.AddOfflineUserDataJobOperationsRequest({
resource_name: jobResp.resource_name,
enable_partial_failure: true,
operations
});
// This doesn't work
const operationsResp = await customer.offlineUserDataJobs.addOfflineUserDataJobOperations(operationsRequest);
console.log(inspect(operationsResp, false, null));
if (operationsResp.partial_failure_error) {
for (const detail of operationsResp.partial_failure_error.details) {
console.log(detail.value.toString());
}
console.log(operationsResp.partial_failure_error.message);
}
The output is:
{ partial_failure_error:
{ details:
[ { type_url:
'type.googleapis.com/google.ads.googleads.v6.errors.GoogleAdsFailure',
value:
<Buffer ... > } ],
code: 3,
message:
'Multiple errors in ‘details’. First error: Upload data is not compatible with the upload key type of the associated user list., at operations[0].create.user_identifiers[0].external_user_id' } }
Upload data is not compatible with the upload key type of the associated user list.
operations
create
user_identifiers
external_user_id
Upload data is not compatible with the upload key type of the associated user list.
operations
create
user_identifiers
external_user_id
Upload data is not compatible with the upload key type of the associated user list.
operations
create
user_identifiers
external_user_id
Multiple errors in ‘details’. First error: Upload data is not compatible with the upload key type of the associated user list., at operations[0].create.user_identifiers[0].external_user_id
Not sure where that external_user_id
comes from, as is not set in the code or the types.
I’ll keep investigating, just wondering if there’s something obvious I’m doing wrong. Thank you so much!!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Create a customer list - Google Ads Help
Zapier automatically uploads new contact details from your CRM system, eCommerce, or marketing automation tool where you collect a user's information to ...
Read more >Add Customer Match User List | Google Ads API
Creates a list of offline user data job operations that will add users to the list. ... Creates the first user data based...
Read more >Adding, Importing, Modifying, and Re-inviting Users
Adding users in CRM is based on your editions and number of user licences. Each user can sign in to their account with...
Read more >Remarketing audience user lists via API - Google Groups
Is there a way to upload users (customer emails) to audience user list ... How can we get customer email ids in CRM...
Read more >Upload lists for company and contact targeting for LinkedIn Ads
Company and contact targeting enable advertisers to build audience segments based on lists of companies and organizations or contact information.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@CarlosMecha @lushu The latest version of the API has been released under
v5.2.0
of this library. Upgrading should hopefully fix your issue. If not then feel free to reopen this issue.@CarlosMecha Thankyou for your kind comments. On further inspection this appears to be a known issue and we are waiting on a fix in the node-js gapic library. Once this has been done we will release with the fix.