leash-integration-hubspot 0.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.
- checksums.yaml +7 -0
- data/lib/leash/integration/hubspot.rb +360 -0
- metadata +57 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1f1f22f1000519781f257486fe1a1b6198bc443e7f3b61b877876159d564b82f
|
|
4
|
+
data.tar.gz: 225bb97d657016df47867e326df62cc0932bd15daeec2f831b8cdc3122684f14
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b4c14120669cf8c82a98f08f1e3341f735e69ab3556d58a76ff2733be2c650e2ce5ecbd117d7a3d386060e560c330d36e0a5c98a3e439fcb933eb1d77609b57c
|
|
7
|
+
data.tar.gz: f737b07c1a85875159d9afa2ab74bede268e9eb93b0c3e3dd9d7a71e5a7dbad4ba87ef0acd09ffdcd1b6e704db5aea0e16db3c0e7c8755702fbea06094aa54e2
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Auto-generated by leash-codegen — do not edit manually
|
|
4
|
+
|
|
5
|
+
module Leash
|
|
6
|
+
module Integration
|
|
7
|
+
class HubspotClient
|
|
8
|
+
# Create a new HubSpot integration client.
|
|
9
|
+
#
|
|
10
|
+
# @param leash [Leash::Client] the Leash SDK client
|
|
11
|
+
def initialize(leash)
|
|
12
|
+
@leash = leash
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# 🎯 Purpose 1. Authenticates and analyzes the current HubSpot access token, providing context about the user's permissions and account details. 🧭 Usage Guidance: 1. This tool must be used before pe...
|
|
16
|
+
#
|
|
17
|
+
# @return [Object]
|
|
18
|
+
def hubspot_get_user_details
|
|
19
|
+
params = {}
|
|
20
|
+
@leash.call('hubspot', 'hubspot-get-user-details', params)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# 🎯 Purpose: 1. Retrieves a paginated list of objects of a specified type from HubSpot. 📦 Returns: 1. Collection of objects with their properties and metadata, plus pagination information. 🧭 Usage...
|
|
24
|
+
#
|
|
25
|
+
# @param objecttype [String] The type of HubSpot object to list. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
26
|
+
# @param limit [Integer, nil] The maximum number of results to display per page (max: 500).
|
|
27
|
+
# @param after [String, nil] The paging cursor token of the last successfully read resource.
|
|
28
|
+
# @param properties [Array, nil] A list of the properties to be returned in the response.
|
|
29
|
+
# @param associations [Array, nil] A list of object types to retrieve associated IDs for (e.g., appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users).
|
|
30
|
+
# @param archived [Boolean, nil] Whether to return only results that have been archived.
|
|
31
|
+
# @return [Object]
|
|
32
|
+
def hubspot_list_objects(objecttype, limit: nil, after: nil, properties: nil, associations: nil, archived: nil)
|
|
33
|
+
params = {
|
|
34
|
+
'objectType' => objecttype,
|
|
35
|
+
'limit' => limit,
|
|
36
|
+
'after' => after,
|
|
37
|
+
'properties' => properties,
|
|
38
|
+
'associations' => associations,
|
|
39
|
+
'archived' => archived
|
|
40
|
+
}.compact
|
|
41
|
+
@leash.call('hubspot', 'hubspot-list-objects', params)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# 🎯 Purpose: 1. Performs advanced filtered searches across HubSpot object types using complex criteria. 📋 Prerequisites: 1. Use the hubspot-list-objects tool to sample existing objects for the obje...
|
|
45
|
+
#
|
|
46
|
+
# @param objecttype [String] The type of HubSpot object to search. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
47
|
+
# @param query [String, nil] Text to search across default searchable properties of the specified object type. Each object type has different searchable properties. For example: contacts (firstname, lastname, email, phone, company), companies (name, website, domain, phone), deals (dealname, pipeline, dealstage, description, dealtype), etc
|
|
48
|
+
# @param limit [Integer, nil] The maximum number of results to display per page (max: 100).
|
|
49
|
+
# @param after [String, nil] The paging cursor token of the last successfully read resource.
|
|
50
|
+
# @param properties [Array, nil] A list of the properties to be returned in the response.
|
|
51
|
+
# @param sorts [Array, nil] A list of sort criteria to apply to the results.
|
|
52
|
+
# @param filtergroups [Array, nil] Groups of filters to apply (combined with OR).
|
|
53
|
+
# @return [Object]
|
|
54
|
+
def hubspot_search_objects(objecttype, query: nil, limit: nil, after: nil, properties: nil, sorts: nil, filtergroups: nil)
|
|
55
|
+
params = {
|
|
56
|
+
'objectType' => objecttype,
|
|
57
|
+
'query' => query,
|
|
58
|
+
'limit' => limit,
|
|
59
|
+
'after' => after,
|
|
60
|
+
'properties' => properties,
|
|
61
|
+
'sorts' => sorts,
|
|
62
|
+
'filterGroups' => filtergroups
|
|
63
|
+
}.compact
|
|
64
|
+
@leash.call('hubspot', 'hubspot-search-objects', params)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# 🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Establishes relationships between...
|
|
68
|
+
#
|
|
69
|
+
# @param fromobjecttype [String] The type of HubSpot object to create association from. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
70
|
+
# @param toobjecttype [String] The type of HubSpot object to create association to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
71
|
+
# @param types [Array] The types of associations to create
|
|
72
|
+
# @param inputs [Array] List of association inputs defining the relationships to create. (max 100 associations per batch)
|
|
73
|
+
# @return [Object]
|
|
74
|
+
def hubspot_batch_create_associations(fromobjecttype, toobjecttype, types, inputs)
|
|
75
|
+
params = {
|
|
76
|
+
'fromObjectType' => fromobjecttype,
|
|
77
|
+
'toObjectType' => toobjecttype,
|
|
78
|
+
'types' => types,
|
|
79
|
+
'inputs' => inputs
|
|
80
|
+
}.compact
|
|
81
|
+
@leash.call('hubspot', 'hubspot-batch-create-associations', params)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# 🎯 Purpose: 1. Retrieves valid association types between specific HubSpot object types. 📦 Returns: 1. Array of valid association definitions with type IDs, labels, and categories. 🧭 Usage Guidanc...
|
|
85
|
+
#
|
|
86
|
+
# @param fromobjecttype [String] The type of HubSpot object to get association from. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
87
|
+
# @param toobjecttype [String] The type of HubSpot object to get association to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
88
|
+
# @return [Object]
|
|
89
|
+
def hubspot_get_association_definitions(fromobjecttype, toobjecttype)
|
|
90
|
+
params = {
|
|
91
|
+
'fromObjectType' => fromobjecttype,
|
|
92
|
+
'toObjectType' => toobjecttype
|
|
93
|
+
}.compact
|
|
94
|
+
@leash.call('hubspot', 'hubspot-get-association-definitions', params)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# 🎯 Purpose: 1. Retrieves existing relationships between a specific object and other objects of a particular type. 2. For example, you can find all companies that a contact is associated with, all d...
|
|
98
|
+
#
|
|
99
|
+
# @param objecttype [String] The type of HubSpot object to get associations from. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
100
|
+
# @param objectid [String] The ID of the HubSpot object to get associations from
|
|
101
|
+
# @param toobjecttype [String] The type of HubSpot object to get associations to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
102
|
+
# @param after [String, nil] Paging cursor token for retrieving the next page of results
|
|
103
|
+
# @return [Object]
|
|
104
|
+
def hubspot_list_associations(objecttype, objectid, toobjecttype, after: nil)
|
|
105
|
+
params = {
|
|
106
|
+
'objectType' => objecttype,
|
|
107
|
+
'objectId' => objectid,
|
|
108
|
+
'toObjectType' => toobjecttype,
|
|
109
|
+
'after' => after
|
|
110
|
+
}.compact
|
|
111
|
+
@leash.call('hubspot', 'hubspot-list-associations', params)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# 🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Creates multiple HubSpot objects o...
|
|
115
|
+
#
|
|
116
|
+
# @param objecttype [String] The type of HubSpot object to create. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
117
|
+
# @param inputs [Array] Array of objects to create (maximum 100 per batch)
|
|
118
|
+
# @return [Object]
|
|
119
|
+
def hubspot_batch_create_objects(objecttype, inputs)
|
|
120
|
+
params = {
|
|
121
|
+
'objectType' => objecttype,
|
|
122
|
+
'inputs' => inputs
|
|
123
|
+
}.compact
|
|
124
|
+
@leash.call('hubspot', 'hubspot-batch-create-objects', params)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# 🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Updates multiple existing HubSpot...
|
|
128
|
+
#
|
|
129
|
+
# @param objecttype [String] The type of HubSpot object to update. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
130
|
+
# @param inputs [Array] Array of objects to update (maximum 100 per batch)
|
|
131
|
+
# @return [Object]
|
|
132
|
+
def hubspot_batch_update_objects(objecttype, inputs)
|
|
133
|
+
params = {
|
|
134
|
+
'objectType' => objecttype,
|
|
135
|
+
'inputs' => inputs
|
|
136
|
+
}.compact
|
|
137
|
+
@leash.call('hubspot', 'hubspot-batch-update-objects', params)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# 🎯 Purpose: 1. Retrieves multiple HubSpot objects of the same object type by their IDs in a single batch operation. 🧭 Usage Guidance: 1. Use this tool to retrieve objects when the object IDs are k...
|
|
141
|
+
#
|
|
142
|
+
# @param objecttype [String] The type of HubSpot object to read. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
143
|
+
# @param inputs [Array] Array of object IDs to read (maximum 100 per batch)
|
|
144
|
+
# @param properties [Array, nil] Optional list of property names to include in the results
|
|
145
|
+
# @param propertieswithhistory [Array, nil] Optional list of property names to include with history
|
|
146
|
+
# @return [Object]
|
|
147
|
+
def hubspot_batch_read_objects(objecttype, inputs, properties: nil, propertieswithhistory: nil)
|
|
148
|
+
params = {
|
|
149
|
+
'objectType' => objecttype,
|
|
150
|
+
'inputs' => inputs,
|
|
151
|
+
'properties' => properties,
|
|
152
|
+
'propertiesWithHistory' => propertieswithhistory
|
|
153
|
+
}.compact
|
|
154
|
+
@leash.call('hubspot', 'hubspot-batch-read-objects', params)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# 🎯 Purpose: 1. This tool retrieves a complete catalog of properties for any HubSpot object type. 🧭 Usage Guidance: 1. This API has a large response that can consume a lot of tokens. Use the hubspo...
|
|
158
|
+
#
|
|
159
|
+
# @param objecttype [String] The type of HubSpot object to get properties for. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
160
|
+
# @param archived [Boolean, nil] Whether to return only properties that have been archived.
|
|
161
|
+
# @param includehidden [Boolean, nil] Whether to include hidden properties in the response.
|
|
162
|
+
# @return [Object]
|
|
163
|
+
def hubspot_list_properties(objecttype, archived: nil, includehidden: nil)
|
|
164
|
+
params = {
|
|
165
|
+
'objectType' => objecttype,
|
|
166
|
+
'archived' => archived,
|
|
167
|
+
'includeHidden' => includehidden
|
|
168
|
+
}.compact
|
|
169
|
+
@leash.call('hubspot', 'hubspot-list-properties', params)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# 🎯 Purpose: 1. This tool retrieves detailed information about a specific property for a HubSpot object type. 2. You can use this to get all metadata related to a property, including its type, optio...
|
|
173
|
+
#
|
|
174
|
+
# @param objecttype [String] The type of HubSpot object the property belongs to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
175
|
+
# @param propertyname [String] The name of the property to retrieve
|
|
176
|
+
# @return [Object]
|
|
177
|
+
def hubspot_get_property(objecttype, propertyname)
|
|
178
|
+
params = {
|
|
179
|
+
'objectType' => objecttype,
|
|
180
|
+
'propertyName' => propertyname
|
|
181
|
+
}.compact
|
|
182
|
+
@leash.call('hubspot', 'hubspot-get-property', params)
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# 🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Creates new custom properties for...
|
|
186
|
+
#
|
|
187
|
+
# @param objecttype [String] The type of HubSpot object to create the property for. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
188
|
+
# @param name [String] The internal property name, which must be used when referencing the property via the API
|
|
189
|
+
# @param label [String] A human-readable property label that will be shown in HubSpot
|
|
190
|
+
# @param description [String, nil] A description of the property that will be shown as help text
|
|
191
|
+
# @param groupname [String] The name of the property group the property belongs to
|
|
192
|
+
# @param type [String, nil] The data type of the property
|
|
193
|
+
# @param fieldtype [String, nil] Controls how the property appears in HubSpot
|
|
194
|
+
# @param options [Array, nil] A list of valid options for enumeration properties
|
|
195
|
+
# @param formfield [Boolean, nil] Whether the property can be used in forms
|
|
196
|
+
# @param hidden [Boolean, nil] Whether the property should be hidden in HubSpot
|
|
197
|
+
# @param displayorder [Integer, nil] The order for displaying the property (lower numbers displayed first)
|
|
198
|
+
# @param hasuniquevalue [Boolean, nil] Whether the property's value must be unique
|
|
199
|
+
# @param calculationformula [String, nil] A formula that is used to compute a calculated property
|
|
200
|
+
# @param externaloptions [Boolean, nil] Only for enumeration type properties. Should be set to true in conjunction with a referencedObjectType
|
|
201
|
+
# @return [Object]
|
|
202
|
+
def hubspot_create_property(objecttype, name, label, groupname, description: nil, type: nil, fieldtype: nil, options: nil, formfield: nil, hidden: nil, displayorder: nil, hasuniquevalue: nil, calculationformula: nil, externaloptions: nil)
|
|
203
|
+
params = {
|
|
204
|
+
'objectType' => objecttype,
|
|
205
|
+
'name' => name,
|
|
206
|
+
'label' => label,
|
|
207
|
+
'description' => description,
|
|
208
|
+
'groupName' => groupname,
|
|
209
|
+
'type' => type,
|
|
210
|
+
'fieldType' => fieldtype,
|
|
211
|
+
'options' => options,
|
|
212
|
+
'formField' => formfield,
|
|
213
|
+
'hidden' => hidden,
|
|
214
|
+
'displayOrder' => displayorder,
|
|
215
|
+
'hasUniqueValue' => hasuniquevalue,
|
|
216
|
+
'calculationFormula' => calculationformula,
|
|
217
|
+
'externalOptions' => externaloptions
|
|
218
|
+
}.compact
|
|
219
|
+
@leash.call('hubspot', 'hubspot-create-property', params)
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# 🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Updates existing custom properties...
|
|
223
|
+
#
|
|
224
|
+
# @param objecttype [String] The type of HubSpot object the property belongs to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
|
|
225
|
+
# @param propertyname [String] The name of the property to update
|
|
226
|
+
# @param label [String, nil] A human-readable property label that will be shown in HubSpot
|
|
227
|
+
# @param description [String, nil] A description of the property that will be shown as help text
|
|
228
|
+
# @param groupname [String, nil] The name of the property group the property belongs to
|
|
229
|
+
# @param type [String, nil] The data type of the property
|
|
230
|
+
# @param fieldtype [String, nil] Controls how the property appears in HubSpot
|
|
231
|
+
# @param options [Array, nil] A list of valid options for enumeration properties
|
|
232
|
+
# @param formfield [Boolean, nil] Whether the property can be used in forms
|
|
233
|
+
# @param hidden [Boolean, nil] Whether the property should be hidden in HubSpot
|
|
234
|
+
# @param displayorder [Integer, nil] The order for displaying the property (lower numbers displayed first)
|
|
235
|
+
# @param calculationformula [String, nil] A formula that is used to compute a calculated property
|
|
236
|
+
# @return [Object]
|
|
237
|
+
def hubspot_update_property(objecttype, propertyname, label: nil, description: nil, groupname: nil, type: nil, fieldtype: nil, options: nil, formfield: nil, hidden: nil, displayorder: nil, calculationformula: nil)
|
|
238
|
+
params = {
|
|
239
|
+
'objectType' => objecttype,
|
|
240
|
+
'propertyName' => propertyname,
|
|
241
|
+
'label' => label,
|
|
242
|
+
'description' => description,
|
|
243
|
+
'groupName' => groupname,
|
|
244
|
+
'type' => type,
|
|
245
|
+
'fieldType' => fieldtype,
|
|
246
|
+
'options' => options,
|
|
247
|
+
'formField' => formfield,
|
|
248
|
+
'hidden' => hidden,
|
|
249
|
+
'displayOrder' => displayorder,
|
|
250
|
+
'calculationFormula' => calculationformula
|
|
251
|
+
}.compact
|
|
252
|
+
@leash.call('hubspot', 'hubspot-update-property', params)
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# 🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Creates a HubSpot engagement (Note...
|
|
256
|
+
#
|
|
257
|
+
# @param type [String] The type of engagement to create (NOTE or TASK)
|
|
258
|
+
# @param ownerid [Integer] The ID of the owner of this engagement
|
|
259
|
+
# @param timestamp [Integer, nil] Timestamp for the engagement (milliseconds since epoch). Defaults to current time if not provided.
|
|
260
|
+
# @param associations [Hash] Associated records for this engagement
|
|
261
|
+
# @param metadata [Hash] Metadata specific to the engagement type
|
|
262
|
+
# @return [Object]
|
|
263
|
+
def hubspot_create_engagement(type, ownerid, associations, metadata, timestamp: nil)
|
|
264
|
+
params = {
|
|
265
|
+
'type' => type,
|
|
266
|
+
'ownerId' => ownerid,
|
|
267
|
+
'timestamp' => timestamp,
|
|
268
|
+
'associations' => associations,
|
|
269
|
+
'metadata' => metadata
|
|
270
|
+
}.compact
|
|
271
|
+
@leash.call('hubspot', 'hubspot-create-engagement', params)
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# 🎯 Purpose: 1. Retrieves a HubSpot engagement by ID.
|
|
275
|
+
#
|
|
276
|
+
# @param engagementid [Integer] The ID of the engagement to retrieve
|
|
277
|
+
# @return [Object]
|
|
278
|
+
def hubspot_get_engagement(engagementid)
|
|
279
|
+
params = {
|
|
280
|
+
'engagementId' => engagementid
|
|
281
|
+
}.compact
|
|
282
|
+
@leash.call('hubspot', 'hubspot-get-engagement', params)
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# 🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Updates an existing HubSpot engage...
|
|
286
|
+
#
|
|
287
|
+
# @param engagementid [Integer] The ID of the engagement to update
|
|
288
|
+
# @param ownerid [Integer, nil] The ID of the owner of this engagement
|
|
289
|
+
# @param timestamp [Integer, nil] Timestamp for the engagement (milliseconds since epoch).
|
|
290
|
+
# @param metadata [Hash] Metadata specific to the engagement type (Note or Task)
|
|
291
|
+
# @param associations [Hash] Associated records for this engagement
|
|
292
|
+
# @return [Object]
|
|
293
|
+
def hubspot_update_engagement(engagementid, metadata, associations, ownerid: nil, timestamp: nil)
|
|
294
|
+
params = {
|
|
295
|
+
'engagementId' => engagementid,
|
|
296
|
+
'ownerId' => ownerid,
|
|
297
|
+
'timestamp' => timestamp,
|
|
298
|
+
'metadata' => metadata,
|
|
299
|
+
'associations' => associations
|
|
300
|
+
}.compact
|
|
301
|
+
@leash.call('hubspot', 'hubspot-update-engagement', params)
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# 🎯 Purpose: 1. Use this tool when the user wants to submit feedback about HubSpot MCP tool. 2. Use this tool proactively when the other HubSpot MCP tools are unable to solve the user's tasks effect...
|
|
305
|
+
#
|
|
306
|
+
# @return [Object]
|
|
307
|
+
def hubspot_generate_feedback_link
|
|
308
|
+
params = {}
|
|
309
|
+
@leash.call('hubspot', 'hubspot-generate-feedback-link', params)
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# 🎯 Purpose: 1. Retrieves all custom object schemas defined in the HubSpot account. 🧭 Usage Guidance: 1. Before working with custom objects to understand available object types, their properties, a...
|
|
313
|
+
#
|
|
314
|
+
# @return [Object]
|
|
315
|
+
def hubspot_get_schemas
|
|
316
|
+
params = {}
|
|
317
|
+
@leash.call('hubspot', 'hubspot-get-schemas', params)
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# 🎯 Purpose: 1. Generates HubSpot UI links for different pages based on object types and IDs. 2. Supports both index pages (lists of objects) and record pages (specific object details). 📋 Prerequis...
|
|
321
|
+
#
|
|
322
|
+
# @param portalid [String] The HubSpot portal/account ID
|
|
323
|
+
# @param uidomain [String] The HubSpot UI domain(e.g., 'app.hubspot.com')
|
|
324
|
+
# @param pagerequests [Array] Array of page link requests to generate
|
|
325
|
+
# @return [Object]
|
|
326
|
+
def hubspot_get_link(portalid, uidomain, pagerequests)
|
|
327
|
+
params = {
|
|
328
|
+
'portalId' => portalid,
|
|
329
|
+
'uiDomain' => uidomain,
|
|
330
|
+
'pageRequests' => pagerequests
|
|
331
|
+
}.compact
|
|
332
|
+
@leash.call('hubspot', 'hubspot-get-link', params)
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# 🎯 Purpose: 1. This tool retrieves a paginated list of workflows from the HubSpot account. 🧭 Usage Guidance: 1. Use the "limit" parameter to control the number of results returned per page. 2. For...
|
|
336
|
+
#
|
|
337
|
+
# @param limit [Float, nil] The maximum number of workflows to return per page (1-100).
|
|
338
|
+
# @param after [String, nil] Cursor token to fetch the next page of results. Use the paging.next.after value from the previous response.
|
|
339
|
+
# @return [Object]
|
|
340
|
+
def hubspot_list_workflows(limit: nil, after: nil)
|
|
341
|
+
params = {
|
|
342
|
+
'limit' => limit,
|
|
343
|
+
'after' => after
|
|
344
|
+
}.compact
|
|
345
|
+
@leash.call('hubspot', 'hubspot-list-workflows', params)
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# 🎯 Purpose: 1. This tool retrieves detailed information about a specific workflow from the HubSpot account. 🧭 Usage Guidance: 1. Use the "flowId" parameter to specify which workflow to retrieve. 2...
|
|
349
|
+
#
|
|
350
|
+
# @param flowid [String] The ID of the workflow to retrieve
|
|
351
|
+
# @return [Object]
|
|
352
|
+
def hubspot_get_workflow(flowid)
|
|
353
|
+
params = {
|
|
354
|
+
'flowId' => flowid
|
|
355
|
+
}.compact
|
|
356
|
+
@leash.call('hubspot', 'hubspot-get-workflow', params)
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
end
|
|
360
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: leash-integration-hubspot
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Leash
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-04-14 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: leash-sdk
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 0.2.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 0.2.0
|
|
27
|
+
description: Auto-generated typed client for the HubSpot integration on Leash.
|
|
28
|
+
email:
|
|
29
|
+
executables: []
|
|
30
|
+
extensions: []
|
|
31
|
+
extra_rdoc_files: []
|
|
32
|
+
files:
|
|
33
|
+
- lib/leash/integration/hubspot.rb
|
|
34
|
+
homepage: https://github.com/leash-build/leash-codegen
|
|
35
|
+
licenses:
|
|
36
|
+
- Apache-2.0
|
|
37
|
+
metadata: {}
|
|
38
|
+
post_install_message:
|
|
39
|
+
rdoc_options: []
|
|
40
|
+
require_paths:
|
|
41
|
+
- lib
|
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 2.7.0
|
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
|
+
requirements:
|
|
49
|
+
- - ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '0'
|
|
52
|
+
requirements: []
|
|
53
|
+
rubygems_version: 3.0.3.1
|
|
54
|
+
signing_key:
|
|
55
|
+
specification_version: 4
|
|
56
|
+
summary: Typed HubSpot integration for Leash
|
|
57
|
+
test_files: []
|