Reference

Endpoint Create Contacts


Name

create_contacts

Description

No description available

Related Tables

Contacts

Parameters

Parameter Required Options
There are no parameters

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_I8 bigint
IsArchived DT_BOOL bit
CreatedAt DT_DBTIMESTAMP datetime
UpdatedAt DT_DBTIMESTAMP datetime
[Dynamic Column] DT_WSTR nvarchar(2000) 2000 [$parent.label$]
If the column you are looking for is missing, consider customizing Hubspot Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
[Dynamic Column] DT_WSTR nvarchar(2000) 2000 [$parent.label$]
Required columns that you need to supply are bolded.

Examples

SSIS

Use Hubspot Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Destination

This Endpoint belongs to the Contacts table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to create contacts:

API Destination - Hubspot
Read and write HubSpot data effortlessly. Integrate, manage, and automate contacts, companies, deals, and tickets — almost no coding required.
Hubspot
Contacts
Insert
There are no parameters to configure.
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Insert a contact

<p>Creates a single contact with the given email, first name, last name, and optional custom properties. Column names must match the contact property internal names.</p>

INSERT INTO Contacts(email, firstname, lastname, custom_checkbox, custom_date, custom_number)
VALUES ('john.doe@abc.com', 'John', 'Doe', 'true', '2023-01-01', 100.55)

Bulk create contacts using SQL Server data

<p>Inserts multiple contacts by reading rows from a SQL Server database. Data is read from a SELECT statement (or stored procedure); column names or aliases must match the target contact properties (e.g. <code>firstname</code>, <code>lastname</code>, <code>email</code>). The driver uses the HubSpot bulk API to send the data.</p>

INSERT INTO Contacts
SOURCE (
  'MSSQL',
  'Data Source=localhost;Initial Catalog=Test;Integrated Security=true',
  'SELECT firstname, lastname, email FROM StagingContacts'
)

create_contacts endpoint belongs to Contacts table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Insert a contact

<p>Creates a single contact with the given email, first name, last name, and optional custom properties. Column names must match the contact property internal names.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Contacts(email, firstname, lastname, custom_checkbox, custom_date, custom_number)
VALUES (''john.doe@abc.com'', ''John'', ''Doe'', ''true'', ''2023-01-01'', 100.55)';

EXEC (@MyQuery) AT [LS_TO_HUBSPOT_IN_GATEWAY];

Bulk create contacts using SQL Server data

<p>Inserts multiple contacts by reading rows from a SQL Server database. Data is read from a SELECT statement (or stored procedure); column names or aliases must match the target contact properties (e.g. <code>firstname</code>, <code>lastname</code>, <code>email</code>). The driver uses the HubSpot bulk API to send the data.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Contacts
SOURCE (
  ''MSSQL'',
  ''Data Source=localhost;Initial Catalog=Test;Integrated Security=true'',
  ''SELECT firstname, lastname, email FROM StagingContacts''
)';

EXEC (@MyQuery) AT [LS_TO_HUBSPOT_IN_GATEWAY];

create_contacts endpoint belongs to Contacts table(s), and can therefore be used via those table(s).