APIs & Integrations

Sameer
Participant | Platinum Partner
Participant | Platinum Partner

Urgent | HubSpot API integration with WebFlow

SOLVE

Hi @cbarley  @IsaacTakushi ,

 

Recently we've migrated the website from WordPress to Webflow.

 

I want to pull contacts from Webflow to Hubspot using HubSpot API.

 

Could you please provide the code for this.

 

Thanks in advance.

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Urgent | HubSpot API integration with WebFlow

SOLVE

Hi, @Sameer.

 

We won't be writing code, but we can guide you in using the HubSpot APIs.

 

The Contacts API allows you to create contact records in your HubSpot CRM, but it cannot retrieve contacts from Webflow. For that, you would need a way to get contacts out of Webflow via an API. This may prove to be a problem, as the only publicly documented APIs I can find for Webflow are for their CMS. (There don't appear to be any CRM endpoints.)

 

If you were able to access Webflow "contact" objects via an API, you would need to build a middleware integration to place and translate calls between the two systems. This will require development skill and/or resources which this Forum cannot provide.

 

Please let me know if I have misunderstood your question.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
5 Replies 5
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Urgent | HubSpot API integration with WebFlow

SOLVE

Hi, @Sameer.

 

We won't be writing code, but we can guide you in using the HubSpot APIs.

 

The Contacts API allows you to create contact records in your HubSpot CRM, but it cannot retrieve contacts from Webflow. For that, you would need a way to get contacts out of Webflow via an API. This may prove to be a problem, as the only publicly documented APIs I can find for Webflow are for their CMS. (There don't appear to be any CRM endpoints.)

 

If you were able to access Webflow "contact" objects via an API, you would need to build a middleware integration to place and translate calls between the two systems. This will require development skill and/or resources which this Forum cannot provide.

 

Please let me know if I have misunderstood your question.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Sameer
Participant | Platinum Partner
Participant | Platinum Partner

Urgent | HubSpot API integration with WebFlow

SOLVE

Hi @IsaacTakushi,

 

Thank you for response.

 

I'm using that code for pull the contacts. Could you please confirm, is it correct or not.


$("button").click(function(){
$.post("https://api.hubapi.com/contacts/v1/contact/?hapikey=[redacted]",data,
function(data, status){
alert("Data: " + data + "\nStatus: " + status);
});
});
var data = {
"properties": [
{
"property": "email",
"value": $('input#Email').val();
},
{
"property": "firstname",
"value": $('input#First-Name').val();
},
{
"property": "lastname",
"value": $('input#Last-Name').val();
},
{
"property": "company",
"value": $('input#Company-Name').val();
}
]
}

Here, I'm using ID of the fields. 

 

Thanks
-Sameer Thakur

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Urgent | HubSpot API integration with WebFlow

SOLVE

Hi, @Sameer.

 

Please don’t share production or developer API keys on this forum. Anyone who has a key has full access to the corresponding account.
 
I have removed the hapikey value from your example but it's been visible on this public forum for several hours, so I strongly recommend deactivating that API key and creating a new one, per these steps.
 
It looks like you are attempting to POST form data to the Create a new contact endpoint from the browser. It is not possible to submit this request client-side. Like most HubSpot APIs, the Contacts API does not support CORS/AJAX requests.
 
If you're trying to pass form data to HubSpot, you can use this Forms API endpoint, which accepts CORS/AJAX requests and does not require authentication.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Sameer
Participant | Platinum Partner
Participant | Platinum Partner

Urgent | HubSpot API integration with WebFlow

SOLVE

Hi @IsaacTakushi 

 

I'm still stuck in it.  I've droped a message in your inbox. Please let me know about it. 

 

Thanks,

-Sameer

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Urgent | HubSpot API integration with WebFlow

SOLVE

Hi, @Sameer.

 

I've responded to your direct message.

Isaac Takushi

Associate Certification Manager
0 Upvotes