节点 / builtin / integration
HubSpot
Log the contact or company you're viewing to HubSpot CRM — create or update records, attach the page as a note, and list deals.
此内容尚不支持你的语言。
Add or update contacts and companies in HubSpot, search them, log notes from the page you are on, and list deals.
What it does
Section titled “What it does”The HubSpot node works on four kinds of things (Resource):
- Contact: Create or update a contact, keyed by email; Update a contact by its id; or Search contacts.
- Company: Create or update a company, keyed by domain, or Search companies.
- Note: Create a note, optionally attached to a contact, company or deal.
- Deal: List deals with their name, stage, amount and pipeline.
Create or update first looks for a record with the same email (contacts) or domain (companies). If one exists, it is updated; otherwise a new record is created. The result says which happened. Fields you leave empty are not sent, so an update never blanks a value already in HubSpot.
A Note is your Note text, then the Selection in quotes, then Source: and the Source URL, each separated by a blank line. It is dated with the time the node runs.
When to use it
Section titled “When to use it”- Log the profile or company page you are viewing as a HubSpot contact or company.
- Keep a lead up to date each time you visit their page, without creating duplicates.
- Save a quote or a page link as a note on the right contact, company or deal.
- Pull your deal list into a daily summary.
Inputs and settings
Section titled “Inputs and settings”| 设置项 | 类型 | 作用 |
|---|---|---|
| Credential (必填) | Credential | A HubSpot Private App token (Settings → Integrations → Private Apps). It is account-wide but scope-limited — grant only the scopes you need: crm.objects.contacts.read/write, crm.objects.companies.read/write, and crm.objects.deals.read. Keep it secret. |
7 个选项 · 选择“Resource and Operation”以查看其设置
Contact · Create or update 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Email (必填) | Text | The contact’s email — the unique key used to find an existing contact. |
| First name | Text | |
| Last name | Text | |
| Phone | Text | |
| Company | Text | |
| Job title | Text | |
| Website | Text |
Contact · Update 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Contact ID (必填) | Text | The HubSpot contact ID to update. |
Text | The contact’s email — the unique key used to find an existing contact. | |
| First name | Text | |
| Last name | Text | |
| Phone | Text | |
| Company | Text | |
| Job title | Text | |
| Website | Text |
Contact · Search 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Query (必填) | Text | Full-text search across the object’s default properties. |
| Limit | Number | Maximum number of results. |
Company · Create or update 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Domain (必填) | Text | The company domain — the unique key used to find an existing company. |
| Name | Text | |
| Phone | Text | |
| Website | Text | |
| City | Text | |
| Country | Text |
Company · Search 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Query (必填) | Text | Full-text search across the object’s default properties. |
| Limit | Number | Maximum number of results. |
Note · Create 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Note (必填) | Text | The note text. |
| Source URL | Text | The page URL to attach — appended to the note when present. |
| Selection | Text | Selected text to quote in the note (optional). |
| Associate with | Choice | Attach the note to a contact, company, or deal (optional). Options: Contact, Company, Deal. |
| Associated record ID | Text | The ID of the contact/company/deal to attach the note to. |
Deal · List 的设置
| 设置项 | 类型 | 作用 |
|---|---|---|
| Limit | Number | Maximum number of results. |
正在显示 Contact · Create or update 的设置
- Domain is the bare domain, for example
acme.com, not a full URL. - Search looks for Query in the record’s main fields (name, email, domain and so on). Search and Deal → List return 10 results unless you set Limit.
- Associated record ID is the id of the contact, company or deal, for example
{{ $('HubSpot').id }}after a Create or update. Set Associate with too, or the note is created without a link to any record.
Outputs
Section titled “Outputs”-
Output
- Create or update returns the record with its
id,propertiesandcreated, which istruefor a new record andfalsefor an update. Branch on it with IF. - Update and Note → Create return the record with its
idandproperties. - Search and Deal → List return the matches in
results. Contacts come withemail,firstname,lastnameandcompany; companies withname,domainandcity; deals withdealname,dealstage,amountandpipeline.
Dependencies and credentials
Section titled “Dependencies and credentials”- Credential (connection, Bearer Token): required. See Connect HubSpot.
Use a HubSpot private app token. In HubSpot, open Settings → Integrations → Private Apps, create an app, and give it only the scopes you need: crm.objects.contacts.read and crm.objects.contacts.write, crm.objects.companies.read and crm.objects.companies.write, and crm.objects.deals.read. Copy its access token and save it as a Bearer Token credential: see Create a credential. Keep it secret: it opens your CRM within those scopes.
Example workflow
Section titled “Example workflow”- A Context Menu trigger runs when you right-click a profile page.
- Get All Text reads the page.
- Information Extractor pulls out
email,firstName,lastNameandcompany. - HubSpot, Contact → Create or update, Email
{{ $input.email }}, First name{{ $input.firstName }}, and so on. - HubSpot, Note → Create, Note
Seen on the web, Source URL{{ $('Context Menu').pageUrl }}, Associate withContact, Associated record ID{{ $input.id }}.
Common issues
Section titled “Common issues”- “HubSpot API Error: 403 Forbidden — the private app token is missing a required scope”. Add the scope this operation needs to the private app in HubSpot, then run again.
- “HubSpot API Error: 401 Unauthorized”. The token is wrong or was rotated. Copy the current token from the private app and update the credential.
- A duplicate contact was created. Two Create or update steps for the same email ran back to back, before HubSpot could find the first one. Space them out, or run them one at a time.
- The run is blocked in the web app. HubSpot runs through the browser extension. Install the extension and allow HubSpot for this workflow when asked, or run the workflow from the extension.
Related nodes
Section titled “Related nodes”- Information Extractor: turn page text into contact fields.
- Attio and Pipedrive: other CRMs.
- Http Request: call HubSpot API endpoints this node does not cover.