Hello,
I am importing contacts using php but the contact owner is importing random onwer name in Hubspot.
$url = "https://api.hubapi.com/crm/v3/imports";
fputcsv($fp, ['Email', 'First Name', 'Last Name', 'Phone', 'Company Name', 'hubspot_owner_id']);
fputcsv($fp, [$email, $firstName,$lastName, $phone, $companyName, xxxxxxx]);
"importOperations" => [
"0-1" => "CREATE"
],
[
"columnObjectTypeId" => "0-1",
"columnName" => "Owner ID",
"propertyName" => "hubspot_owner_id"
]
The blank email is being assigned to correct contact owner but when there is data(Email) in the file, it’s being assigned to random contact owners and deactivated account owners, which is a problem.
Hey @Clearworl and Happy Friday!
Thanks for reaching out to the HubSpot Community!
I’ve gathered some helpful resources for you:
- CRM API | Owners
- CRM API | Properties
Let’s also check in with our fantastic Top Experts: Hi @MichaelMa, @stefen and @Anton do you have any suggestions or tips that might help @Clearworl, please?
Thank you all so much for your support, and wishing everyone a lovely weekend!
Bérangère
Yes, I am using the CRM import contacts method to bulk upload the contacts. But when I am importing the data, the contacts are assigned to random contact owners. I don’t know the reason.
I thought this may be the reason that the contacts that are already into hubspot contacts are uppdating when I upload into Hubspot.
If this is the reason, can someone help me out how can I only create new contacts into Hubspot and don’t update (That is the contacts should not to enter/update in Hubspot when they are in the contacts[hubspot])
Hi @Clearworl and thanks for getting back to us!
Based on the documentation, when importing contacts via the CRM Imports API, you can control whether to create new contacts only or update existing ones using the importOperations parameter.
To only create new contacts and skip updating existing ones, set importOperations to “CREATE” in your import request. For example:
{
“name”: “November Marketing Event Leads”,
“importOperations”: {
“0-1”: “CREATE”
},
“files”: […]
}
This will only create new contacts and won’t update existing ones in HubSpot.
Owner assignment during imports typically follows your account’s default settings or the owner values specified in your import file.
Make sure you’re including the hubspot_owner_id column in your import with the correct owner IDs if you want to control ownership.
Here is the documentation that can be hlpful: “CRM API | Imports”.
Let us know how it goes!
Have a lovely day!
Bérangère
This post was created with the assistance of AI tools.