@zerodot/hubspot 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +62 -2
- package/dist/index.cjs +4659 -0
- package/hubspot.svg +1 -0
- package/package.json +46 -3
package/README.md
CHANGED
|
@@ -1,3 +1,63 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @zerodot/hubspot
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Manage HubSpot contacts, companies, deals, tickets, engagements, and contact lists, and start a workflow when a HubSpot app webhook event happens. Use it for CRM sync and sales automation.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
In zerodot, go to **System > Nodes** and install **HubSpot**.
|
|
8
|
+
|
|
9
|
+
Manual: install `@zerodot/hubspot` where the web app and the worker run, and add it to `ZERODOT_NODE_PACKAGES`.
|
|
10
|
+
|
|
11
|
+
## Nodes
|
|
12
|
+
|
|
13
|
+
### HubSpot (`hubspot.api`)
|
|
14
|
+
|
|
15
|
+
Set **Authentication** to **Service Key** or **OAuth2**.
|
|
16
|
+
|
|
17
|
+
- **Contact**: create or update (upsert), get, get many, get recently created/updated, search, delete
|
|
18
|
+
- **Contact List**: add a contact, remove a contact
|
|
19
|
+
- **Company**: create, update, get, get many, get recently created/updated, search by domain, delete
|
|
20
|
+
- **Deal**: create, update, get, get many, get recently created/updated, search, delete
|
|
21
|
+
- **Engagement**: create (call, email, meeting, task), get, get many, delete
|
|
22
|
+
- **Ticket**: create, update, get, get many, delete
|
|
23
|
+
|
|
24
|
+
Notes:
|
|
25
|
+
|
|
26
|
+
- Lists have **Return All** (at most 5000 items) and **Limit**. The node reads the pages for you.
|
|
27
|
+
- The editor loads choices from HubSpot: owners, companies, contacts, deals, tickets, engagements, static contact lists, pipelines and stages, property names, and the values of properties such as lifecycle stage and lead status. You can still type an ID or an internal name, or use an expression. The trigger loads the property names for each event row. For that, connect the developer credential with OAuth2 (the client ID is optional and only for this sign-in). You can also type the name.
|
|
28
|
+
- **Custom Properties** take the internal name of the property as the name.
|
|
29
|
+
- **Dates** are ISO 8601 text, such as `2025-01-31T10:00:00Z`. The node changes them to the form that HubSpot wants.
|
|
30
|
+
- **Contact > Create or Update** can link a company with **Associated Company ID**. When **Simplify Output** is off, the node gets the full profile of the contact and adds `isNew`.
|
|
31
|
+
- **Contact > Search** and **Deal > Search** use the CRM search API: up to 3 filter groups (OR), and the filters of a group use AND.
|
|
32
|
+
- **Deal > Create** needs a **Deal Stage** ID. **Associated Company IDs** and **Associated Contact IDs** have IDs with commas between.
|
|
33
|
+
- **Ticket > Create** and **Update** link companies and contacts with the HubSpot defined associations.
|
|
34
|
+
- **Engagement** uses the CRM v3 objects for calls, emails, meetings, and tasks, so every operation has a **Type** field. Create needs at least one metadata field. The task type has **Due Date**. Linked companies, contacts, deals, and tickets use the default association (CRM v4).
|
|
35
|
+
- The node uses the current CRM v3 and v4 APIs. **Get Recently Created/Updated** is a CRM search that sorts by the last change (contacts, companies) or the create date (deals). **Contact List** works with static lists (`PUT /crm/v3/lists/{id}/memberships/add|remove`); a contact added by email is found first.
|
|
36
|
+
- **Contact > Create or Update** uses the batch upsert with the email as ID property.
|
|
37
|
+
- A delete gives `{ "vid": "<id>", "deleted": true }`.
|
|
38
|
+
|
|
39
|
+
### HubSpot Trigger (`trigger.hubspot`)
|
|
40
|
+
|
|
41
|
+
Starts a run on an event of a HubSpot app. Choose one or more **Events**:
|
|
42
|
+
|
|
43
|
+
Company Created, Company Deleted, Company Property Changed, Contact Created, Contact Deleted, Contact Privacy Deleted, Contact Property Changed, Conversation Creation, Conversation Deletion, Conversation New Message, Conversation Privacy Deletion, Conversation Property Change, Deal Created, Deal Deleted, Deal Property Changed, Ticket Created, Ticket Deleted, Ticket Property Changed.
|
|
44
|
+
|
|
45
|
+
A property change event needs a **Property Name**. For a conversation use `assignedTo`, `isArchived`, or `status`. **Max Concurrent Requests** is at least 5.
|
|
46
|
+
|
|
47
|
+
When the workflow is published, the trigger removes the old subscriptions and settings of the app, then sets the target address and one subscription for each event. One HubSpot app allows one webhook address, so one app can have only one trigger. A second trigger for the same app replaces the first. If the setup fails, the trigger removes what it made. When the workflow stops, the trigger removes the subscriptions and the settings.
|
|
48
|
+
|
|
49
|
+
Each request has a signature. When a request has `X-HubSpot-Signature-v3`, only the v3 check counts (HMAC-SHA256 with a timestamp that is at most 5 minutes old). With no v3 header, the trigger checks `X-HubSpot-Signature` (v1: SHA-256 of the client secret and the body). Other requests get status 401.
|
|
50
|
+
|
|
51
|
+
The output is a list of events. HubSpot gives `objectId`. The trigger renames it to `contactId`, `companyId`, `dealId`, `ticketId`, or `conversationId`.
|
|
52
|
+
|
|
53
|
+
## Credentials
|
|
54
|
+
|
|
55
|
+
- **HubSpot service key** (`hubspot.appToken`): `appToken`, the token of a service key (private app) of your account. The **Test** button reads one contact (`GET /crm/v3/objects/contacts?limit=1`). The **Test** button reads one contact (`GET /crm/v3/objects/contacts?limit=1`).
|
|
56
|
+
- **HubSpot OAuth2** (`hubspot.oauth2`): `clientId` and `clientSecret` of your public app. The scopes are `crm.lists.write`, `crm.objects.contacts.read/write`, `crm.objects.companies.read/write`, `crm.objects.deals.read/write`, `crm.objects.owners.read`, `crm.schemas.contacts/companies/deals.read`, `forms`, and `tickets`.
|
|
57
|
+
- **HubSpot developer API** (`hubspot.developerApi`): `apiKey` (developer API key), `appId`, `clientSecret`, and `clientId`. Only the trigger uses it. Sign in with OAuth2 to load property names in the editor.
|
|
58
|
+
|
|
59
|
+
The legacy HubSpot API key is not supported. HubSpot ended it.
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
AGPL-3.0-only
|