Import Objects into HubSpot
This task will create new or update existing objects in HubSpot, based on data provided via an XML file. It also supports creating associations between objects, including creating and updating the associated objects themselves.
Settings
Connection
Required
The HubSpot connection to use. See Connecting to HubSpot.
Fail File
Required
The XML file to write failed records to.
Input File
Required
The XML file containing the objects you want to import into HubSpot. A sample of the XML format is shown below, or refer to HubSpot Object XML for more details.
Success File
Required
The XML file to write successfully imported records to.
Zynk Settings
Examples
A sample input file is shown below, showing how to create or update a deal, and associate it with a company, contact and some line items. For full documentation see HubSpot Object XML.
<?xml version="1.0" encoding="utf-8"?>
<HubSpotObjects ObjectType="deal">
<HubSpotObject>
<Key>dealname</Key>
<Properties>
<Property Name="amount" Value="2000" />
<Property Name="closedate" Value="2024-03-15T00:00:00Z" />
<Property Name="dealname" Value="T-Shirts" />
<Property Name="dealstage" Value="closedwon" />
<Property Name="dealtype" Value="newbusiness" />
<Property Name="description" Value="A large order of t-shirts" />
<Property Name="pipeline" Value="default" />
<Property Name="hubspot_owner_id">
<LookupProperty Name="email" Value="[email protected]" />
</Property>
</Properties>
<Associations ObjectType="contact">
<Association>
<HubSpotObject>
<Key>email</Key>
<Properties>
<Property Name="email" Value="[email protected]" />
</Properties>
</HubSpotObject>
</Association>
</Associations>
<Associations ObjectType="companies">
<Association>
<HubSpotObject>
<Key>name</Key>
<Properties>
<Property Name="name" Value="Zynk Software Limited" />
</Properties>
</HubSpotObject>
</Association>
</Associations>
<Associations ObjectType="line items">
<Association>
<HubSpotObject>
<Id>8808697025</Id>
<Properties>
<Property Name="description" Value="Red T-Shirt" />
<Property Name="discount" />
<Property Name="name" Value="Red T-Shirt" />
<Property Name="price" Value="10" />
<Property Name="quantity" Value="100" />
<Property Name="tax" Value="0" />
</Properties>
</HubSpotObject>
</Association>
<Association>
<HubSpotObject>
<Id>8808697026</Id>
<Properties>
<Property Name="description" Value="Blue T-Shirt" />
<Property Name="discount" />
<Property Name="name" Value="Blue T-Shirt" />
<Property Name="price" Value="10" />
<Property Name="quantity" Value="100" />
<Property Name="tax" Value="0" />
</Properties>
</HubSpotObject>
</Association>
</Associations>
</HubSpotObject>
</HubSpotObjects>