Integrations / HubSpot
HubSpot
CRM: contacts, companies and deals.
5 actions
OAuth 2
2 read3 write
Calls api.hubapi.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "hubspot" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
| Scope | Why it is requested |
|---|---|
oauth | Identify the connected HubSpot account |
crm.objects.contacts.read | Read contacts |
crm.objects.contacts.write | Create and update contacts |
crm.objects.companies.read | Read companies |
crm.objects.deals.read | Read deals |
crm.objects.deals.write | Create and update deals |
Actions
Create contactwritehubspot.create_contactCreate a contact from a property map (email, firstname, lastname...).
Needs scope: crm.objects.contacts.write
| Input | Type | Description | |
|---|---|---|---|
properties | object | Required | HubSpot contact properties |
await setu.execute({
userId: "user_1",
action: "hubspot.create_contact",
input: {
"properties": {}
},
});Create dealwritehubspot.create_dealCreate a deal from a property map (dealname, amount, dealstage...).
Needs scope: crm.objects.deals.write
| Input | Type | Description | |
|---|---|---|---|
properties | object | Required |
await setu.execute({
userId: "user_1",
action: "hubspot.create_deal",
input: {
"properties": {}
},
});List companiesreadhubspot.list_companiesList companies in the CRM.
Needs scope: crm.objects.companies.read
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional |
await setu.execute({
userId: "user_1",
action: "hubspot.list_companies",
input: {},
});Search contactsreadhubspot.search_contactsSearch contacts by a text query.
Needs scope: crm.objects.contacts.read
| Input | Type | Description | |
|---|---|---|---|
query | string | Required | |
limit | integer | Optional |
await setu.execute({
userId: "user_1",
action: "hubspot.search_contacts",
input: {
"query": "<query>"
},
});Update contactwritehubspot.update_contactUpdate properties of an existing contact.
Needs scope: crm.objects.contacts.write
| Input | Type | Description | |
|---|---|---|---|
contact_id | string | Required | |
properties | object | Required |
await setu.execute({
userId: "user_1",
action: "hubspot.update_contact",
input: {
"contact_id": "<contact_id>",
"properties": {}
},
});