runline 0.2.1 → 0.2.2
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/dist/plugins/actionNetwork/src/index.js +118 -25
- package/dist/plugins/activeCampaign/src/index.js +184 -38
- package/dist/plugins/adalo/src/index.js +40 -8
- package/dist/plugins/affinity/src/index.js +100 -20
- package/dist/plugins/agileCrm/src/index.js +115 -27
- package/dist/plugins/airtable/src/index.js +94 -19
- package/dist/plugins/airtop/src/index.js +266 -62
- package/dist/plugins/apiTemplateIo/src/index.js +25 -5
- package/dist/plugins/asana/src/index.js +195 -41
- package/dist/plugins/autopilot/src/index.js +39 -8
- package/dist/plugins/bambooHr/src/index.js +109 -22
- package/dist/plugins/bannerbear/src/index.js +36 -8
- package/dist/plugins/baserow/src/index.js +35 -7
- package/dist/plugins/beeminder/src/index.js +198 -40
- package/dist/plugins/bitly/src/index.js +46 -10
- package/dist/plugins/bitwarden/src/index.js +167 -36
- package/dist/plugins/box/src/index.js +172 -37
- package/dist/plugins/brandfetch/src/index.js +5 -1
- package/dist/plugins/brevo/src/index.js +136 -29
- package/dist/plugins/bubble/src/index.js +76 -17
- package/dist/plugins/chargebee/src/index.js +35 -7
- package/dist/plugins/circleci/src/index.js +50 -10
- package/dist/plugins/ciscoWebex/src/index.js +131 -27
- package/dist/plugins/clearbit/src/index.js +76 -17
- package/dist/plugins/clickup/src/index.js +500 -107
- package/dist/plugins/clockify/src/index.js +229 -47
- package/dist/plugins/cloudflare/src/index.js +28 -6
- package/dist/plugins/cockpit/src/index.js +54 -12
- package/dist/plugins/coda/src/index.js +81 -19
- package/dist/plugins/coingecko/src/index.js +157 -33
- package/dist/plugins/contentful/src/index.js +85 -17
- package/dist/plugins/convertkit/src/index.js +74 -18
- package/dist/plugins/copper/src/index.js +59 -11
- package/dist/plugins/cortex/src/index.js +55 -13
- package/dist/plugins/currents/src/index.js +310 -71
- package/dist/plugins/customerIo/src/index.js +112 -23
- package/dist/plugins/databricks/src/index.js +549 -115
- package/dist/plugins/deepl/src/index.js +26 -6
- package/dist/plugins/demio/src/index.js +56 -11
- package/dist/plugins/dhl/src/index.js +16 -3
- package/dist/plugins/discord/src/index.js +141 -31
- package/dist/plugins/discourse/src/index.js +136 -31
- package/dist/plugins/disqus/src/index.js +96 -20
- package/dist/plugins/docker/src/index.js +20 -4
- package/dist/plugins/drift/src/index.js +19 -5
- package/dist/plugins/dropbox/src/index.js +139 -30
- package/dist/plugins/dropcontact/src/index.js +21 -4
- package/dist/plugins/egoi/src/index.js +61 -15
- package/dist/plugins/elasticsearch/src/index.js +59 -13
- package/dist/plugins/emelia/src/index.js +95 -19
- package/dist/plugins/erpnext/src/index.js +74 -15
- package/dist/plugins/facebookGraph/src/index.js +52 -11
- package/dist/plugins/freshdesk/src/index.js +220 -48
- package/dist/plugins/freshservice/src/index.js +39 -9
- package/dist/plugins/freshworksCrm/src/index.js +58 -12
- package/dist/plugins/getresponse/src/index.js +87 -18
- package/dist/plugins/ghost/src/index.js +114 -26
- package/dist/plugins/github/src/index.js +483 -109
- package/dist/plugins/gitlab/src/index.js +193 -45
- package/dist/plugins/gong/src/index.js +68 -14
- package/dist/plugins/gotify/src/index.js +43 -9
- package/dist/plugins/gotowebinar/src/index.js +233 -47
- package/dist/plugins/grafana/src/index.js +92 -21
- package/dist/plugins/graphql/src/index.js +38 -8
- package/dist/plugins/grist/src/index.js +52 -10
- package/dist/plugins/hackernews/src/index.js +32 -6
- package/dist/plugins/halopsa/src/index.js +131 -26
- package/dist/plugins/harvest/src/index.js +182 -42
- package/dist/plugins/helpscout/src/index.js +153 -31
- package/dist/plugins/highlevel/src/index.js +291 -58
- package/dist/plugins/homeAssistant/src/index.js +124 -26
- package/dist/plugins/hubspot/src/index.js +163 -29
- package/dist/plugins/humanticAi/src/index.js +54 -5
- package/dist/plugins/hunter/src/index.js +21 -4
- package/dist/plugins/intercom/src/index.js +95 -20
- package/dist/plugins/iterable/src/index.js +96 -20
- package/dist/plugins/jenkins/src/index.js +75 -17
- package/dist/plugins/jira/src/index.js +193 -43
- package/dist/plugins/keap/src/index.js +222 -56
- package/dist/plugins/kobotoolbox/src/index.js +113 -25
- package/dist/plugins/lemlist/src/index.js +79 -18
- package/dist/plugins/linear/src/index.js +86 -19
- package/dist/plugins/lingvanex/src/index.js +38 -8
- package/dist/plugins/linkedin/src/index.js +37 -8
- package/dist/plugins/lonescale/src/index.js +41 -9
- package/dist/plugins/magento/src/index.js +98 -27
- package/dist/plugins/mailcheck/src/index.js +11 -2
- package/dist/plugins/mailchimp/src/index.js +193 -42
- package/dist/plugins/mailerlite/src/index.js +61 -12
- package/dist/plugins/mailgun/src/index.js +39 -7
- package/dist/plugins/mailjet/src/index.js +141 -30
- package/dist/plugins/mandrill/src/index.js +67 -14
- package/dist/plugins/marketstack/src/index.js +56 -10
- package/dist/plugins/matrix/src/index.js +97 -20
- package/dist/plugins/mattermost/src/index.js +124 -26
- package/dist/plugins/mautic/src/index.js +129 -26
- package/dist/plugins/medium/src/index.js +64 -13
- package/dist/plugins/messagebird/src/index.js +80 -15
- package/dist/plugins/metabase/src/index.js +57 -12
- package/dist/plugins/misp/src/index.js +135 -33
- package/dist/plugins/mocean/src/index.js +33 -7
- package/dist/plugins/monday/src/index.js +97 -23
- package/dist/plugins/monicaCrm/src/index.js +112 -23
- package/dist/plugins/msg91/src/index.js +11 -2
- package/dist/plugins/nasa/src/index.js +108 -21
- package/dist/plugins/netlify/src/index.js +28 -6
- package/dist/plugins/netscalerAdc/src/index.js +144 -29
- package/dist/plugins/nextcloud/src/index.js +103 -20
- package/dist/plugins/nocodb/src/index.js +57 -11
- package/dist/plugins/notion/src/index.js +148 -37
- package/dist/plugins/npm/src/index.js +59 -12
- package/dist/plugins/odoo/src/index.js +102 -20
- package/dist/plugins/okta/src/index.js +50 -10
- package/dist/plugins/oneSimpleApi/src/index.js +84 -17
- package/dist/plugins/onfleet/src/index.js +139 -32
- package/dist/plugins/openThesaurus/src/index.js +46 -9
- package/dist/plugins/openweathermap/src/index.js +31 -6
- package/dist/plugins/oura/src/index.js +36 -7
- package/dist/plugins/paddle/src/index.js +80 -17
- package/dist/plugins/pagerduty/src/index.js +53 -12
- package/dist/plugins/paypal/src/index.js +51 -11
- package/dist/plugins/peekalink/src/index.js +12 -3
- package/dist/plugins/phantombuster/src/index.js +39 -8
- package/dist/plugins/philipsHue/src/index.js +64 -13
- package/dist/plugins/pipedrive/src/index.js +167 -45
- package/dist/plugins/plivo/src/index.js +43 -8
- package/dist/plugins/postbin/src/index.js +9 -2
- package/dist/plugins/posthog/src/index.js +50 -13
- package/dist/plugins/profitwell/src/index.js +24 -5
- package/dist/plugins/pushbullet/src/index.js +45 -9
- package/dist/plugins/pushcut/src/index.js +31 -6
- package/dist/plugins/pushover/src/index.js +51 -10
- package/dist/plugins/quickbase/src/index.js +66 -13
- package/dist/plugins/quickbooks/src/index.js +86 -19
- package/dist/plugins/quickchart/src/index.js +35 -7
- package/dist/plugins/raindrop/src/index.js +54 -13
- package/dist/plugins/reddit/src/index.js +73 -18
- package/dist/plugins/rocketchat/src/index.js +47 -9
- package/dist/plugins/rundeck/src/index.js +26 -5
- package/dist/plugins/salesforce/src/index.js +161 -31
- package/dist/plugins/salesmate/src/index.js +75 -16
- package/dist/plugins/securityScorecard/src/index.js +73 -15
- package/dist/plugins/segment/src/index.js +21 -4
- package/dist/plugins/sendgrid/src/index.js +102 -24
- package/dist/plugins/sendy/src/index.js +54 -11
- package/dist/plugins/sentry/src/index.js +174 -34
- package/dist/plugins/servicenow/src/index.js +120 -27
- package/dist/plugins/shopify/src/index.js +53 -12
- package/dist/plugins/signl4/src/index.js +16 -3
- package/dist/plugins/slack/src/index.js +407 -105
- package/dist/plugins/sms77/src/index.js +26 -5
- package/dist/plugins/splunk/src/index.js +186 -45
- package/dist/plugins/spotify/src/index.js +265 -66
- package/dist/plugins/stackby/src/index.js +18 -6
- package/dist/plugins/storyblok/src/index.js +57 -11
- package/dist/plugins/strapi/src/index.js +63 -12
- package/dist/plugins/strava/src/index.js +58 -13
- package/dist/plugins/stripe/src/index.js +143 -30
- package/dist/plugins/supabase/src/index.js +49 -10
- package/dist/plugins/syncromsp/src/index.js +245 -67
- package/dist/plugins/tapfiliate/src/index.js +57 -14
- package/dist/plugins/telegram/src/index.js +202 -39
- package/dist/plugins/thehive/src/index.js +271 -66
- package/dist/plugins/thehiveProject/src/index.js +457 -89
- package/dist/plugins/todoist/src/index.js +326 -77
- package/dist/plugins/travisci/src/index.js +35 -8
- package/dist/plugins/trello/src/index.js +204 -46
- package/dist/plugins/twake/src/index.js +10 -2
- package/dist/plugins/twilio/src/index.js +56 -11
- package/dist/plugins/twist/src/index.js +241 -48
- package/dist/plugins/twitter/src/index.js +128 -30
- package/dist/plugins/unleashedSoftware/src/index.js +30 -6
- package/dist/plugins/uplead/src/index.js +9 -2
- package/dist/plugins/uproc/src/index.js +31 -6
- package/dist/plugins/uptimerobot/src/index.js +119 -25
- package/dist/plugins/urlscanio/src/index.js +25 -6
- package/dist/plugins/vero/src/index.js +68 -13
- package/dist/plugins/vonage/src/index.js +32 -6
- package/dist/plugins/wekan/src/index.js +297 -52
- package/dist/plugins/woocommerce/src/index.js +57 -12
- package/dist/plugins/wordpress/src/index.js +94 -18
- package/dist/plugins/xero/src/index.js +79 -13
- package/dist/plugins/yourls/src/index.js +33 -6
- package/dist/plugins/zammad/src/index.js +139 -36
- package/dist/plugins/zendesk/src/index.js +201 -48
- package/dist/plugins/zoho/src/index.js +88 -21
- package/dist/plugins/zoom/src/index.js +41 -7
- package/dist/plugins/zulip/src/index.js +101 -20
- package/package.json +1 -1
|
@@ -7,8 +7,17 @@ async function apiRequest(token, method, endpoint, body, qs) {
|
|
|
7
7
|
url.searchParams.set(k, String(v));
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
const opts = {
|
|
11
|
-
|
|
10
|
+
const opts = {
|
|
11
|
+
method,
|
|
12
|
+
headers: {
|
|
13
|
+
Authorization: `Bearer ${token}`,
|
|
14
|
+
"Content-Type": "application/json",
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
if (body &&
|
|
18
|
+
Object.keys(body).length > 0 &&
|
|
19
|
+
method !== "GET" &&
|
|
20
|
+
method !== "DELETE")
|
|
12
21
|
opts.body = JSON.stringify(body);
|
|
13
22
|
const res = await fetch(url.toString(), opts);
|
|
14
23
|
if (!res.ok)
|
|
@@ -21,17 +30,42 @@ export default function hubspot(rl) {
|
|
|
21
30
|
rl.setName("hubspot");
|
|
22
31
|
rl.setVersion("0.1.0");
|
|
23
32
|
rl.setConnectionSchema({
|
|
24
|
-
accessToken: {
|
|
33
|
+
accessToken: {
|
|
34
|
+
type: "string",
|
|
35
|
+
required: true,
|
|
36
|
+
description: "HubSpot private app access token",
|
|
37
|
+
env: "HUBSPOT_ACCESS_TOKEN",
|
|
38
|
+
},
|
|
25
39
|
});
|
|
26
40
|
const tok = (ctx) => ctx.connection.config.accessToken;
|
|
27
41
|
// Helper for CRM objects (contacts, companies, deals, tickets)
|
|
28
42
|
function registerCrmObject(resource, objectType) {
|
|
29
43
|
rl.registerAction(`${resource}.create`, {
|
|
30
|
-
description: `Create a ${resource}`,
|
|
31
|
-
|
|
44
|
+
description: `Create a ${resource}`,
|
|
45
|
+
inputSchema: {
|
|
46
|
+
properties: {
|
|
47
|
+
type: "object",
|
|
48
|
+
required: true,
|
|
49
|
+
description: "Properties as key-value pairs",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
async execute(input, ctx) {
|
|
53
|
+
return apiRequest(tok(ctx), "POST", `/crm/v3/objects/${objectType}`, {
|
|
54
|
+
properties: input
|
|
55
|
+
.properties,
|
|
56
|
+
});
|
|
57
|
+
},
|
|
32
58
|
});
|
|
33
59
|
rl.registerAction(`${resource}.get`, {
|
|
34
|
-
description: `Get a ${resource}`,
|
|
60
|
+
description: `Get a ${resource}`,
|
|
61
|
+
inputSchema: {
|
|
62
|
+
id: { type: "string", required: true, description: `${resource} ID` },
|
|
63
|
+
properties: {
|
|
64
|
+
type: "array",
|
|
65
|
+
required: false,
|
|
66
|
+
description: "Properties to return",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
35
69
|
async execute(input, ctx) {
|
|
36
70
|
const { id, properties } = input;
|
|
37
71
|
const qs = {};
|
|
@@ -41,7 +75,24 @@ export default function hubspot(rl) {
|
|
|
41
75
|
},
|
|
42
76
|
});
|
|
43
77
|
rl.registerAction(`${resource}.list`, {
|
|
44
|
-
description: `List ${resource}s`,
|
|
78
|
+
description: `List ${resource}s`,
|
|
79
|
+
inputSchema: {
|
|
80
|
+
limit: {
|
|
81
|
+
type: "number",
|
|
82
|
+
required: false,
|
|
83
|
+
description: "Max results (max 100)",
|
|
84
|
+
},
|
|
85
|
+
after: {
|
|
86
|
+
type: "string",
|
|
87
|
+
required: false,
|
|
88
|
+
description: "Pagination cursor",
|
|
89
|
+
},
|
|
90
|
+
properties: {
|
|
91
|
+
type: "array",
|
|
92
|
+
required: false,
|
|
93
|
+
description: "Properties to return",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
45
96
|
async execute(input, ctx) {
|
|
46
97
|
const { limit, after, properties } = (input ?? {});
|
|
47
98
|
const qs = {};
|
|
@@ -55,18 +106,43 @@ export default function hubspot(rl) {
|
|
|
55
106
|
},
|
|
56
107
|
});
|
|
57
108
|
rl.registerAction(`${resource}.update`, {
|
|
58
|
-
description: `Update a ${resource}`,
|
|
59
|
-
|
|
109
|
+
description: `Update a ${resource}`,
|
|
110
|
+
inputSchema: {
|
|
111
|
+
id: { type: "string", required: true, description: `${resource} ID` },
|
|
112
|
+
properties: {
|
|
113
|
+
type: "object",
|
|
114
|
+
required: true,
|
|
115
|
+
description: "Properties to update",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
async execute(input, ctx) {
|
|
119
|
+
const { id, properties } = input;
|
|
120
|
+
return apiRequest(tok(ctx), "PATCH", `/crm/v3/objects/${objectType}/${id}`, { properties });
|
|
121
|
+
},
|
|
60
122
|
});
|
|
61
123
|
rl.registerAction(`${resource}.delete`, {
|
|
62
|
-
description: `Delete a ${resource}`,
|
|
63
|
-
|
|
124
|
+
description: `Delete a ${resource}`,
|
|
125
|
+
inputSchema: {
|
|
126
|
+
id: { type: "string", required: true, description: `${resource} ID` },
|
|
127
|
+
},
|
|
128
|
+
async execute(input, ctx) {
|
|
129
|
+
await apiRequest(tok(ctx), "DELETE", `/crm/v3/objects/${objectType}/${input.id}`);
|
|
130
|
+
return { success: true };
|
|
131
|
+
},
|
|
64
132
|
});
|
|
65
133
|
rl.registerAction(`${resource}.search`, {
|
|
66
134
|
description: `Search ${resource}s`,
|
|
67
135
|
inputSchema: {
|
|
68
|
-
filterGroups: {
|
|
69
|
-
|
|
136
|
+
filterGroups: {
|
|
137
|
+
type: "array",
|
|
138
|
+
required: true,
|
|
139
|
+
description: "Filter groups [{filters: [{propertyName, operator, value}]}]",
|
|
140
|
+
},
|
|
141
|
+
properties: {
|
|
142
|
+
type: "array",
|
|
143
|
+
required: false,
|
|
144
|
+
description: "Properties to return",
|
|
145
|
+
},
|
|
70
146
|
limit: { type: "number", required: false, description: "Max results" },
|
|
71
147
|
after: { type: "string", required: false, description: "Pagination" },
|
|
72
148
|
},
|
|
@@ -92,18 +168,28 @@ export default function hubspot(rl) {
|
|
|
92
168
|
description: "Add contacts to a list",
|
|
93
169
|
inputSchema: {
|
|
94
170
|
listId: { type: "string", required: true, description: "List ID" },
|
|
95
|
-
contactIds: {
|
|
171
|
+
contactIds: {
|
|
172
|
+
type: "array",
|
|
173
|
+
required: true,
|
|
174
|
+
description: "Array of contact IDs",
|
|
175
|
+
},
|
|
96
176
|
},
|
|
97
177
|
async execute(input, ctx) {
|
|
98
178
|
const { listId, contactIds } = input;
|
|
99
|
-
return apiRequest(tok(ctx), "POST", `/contacts/v1/lists/${listId}/add`, {
|
|
179
|
+
return apiRequest(tok(ctx), "POST", `/contacts/v1/lists/${listId}/add`, {
|
|
180
|
+
vids: contactIds,
|
|
181
|
+
});
|
|
100
182
|
},
|
|
101
183
|
});
|
|
102
184
|
rl.registerAction("contactList.removeContacts", {
|
|
103
185
|
description: "Remove contacts from a list",
|
|
104
186
|
inputSchema: {
|
|
105
187
|
listId: { type: "string", required: true, description: "List ID" },
|
|
106
|
-
contactIds: {
|
|
188
|
+
contactIds: {
|
|
189
|
+
type: "array",
|
|
190
|
+
required: true,
|
|
191
|
+
description: "Array of contact IDs",
|
|
192
|
+
},
|
|
107
193
|
},
|
|
108
194
|
async execute(input, ctx) {
|
|
109
195
|
const { listId, contactIds } = input;
|
|
@@ -114,9 +200,21 @@ export default function hubspot(rl) {
|
|
|
114
200
|
rl.registerAction("engagement.create", {
|
|
115
201
|
description: "Create an engagement (note, email, task, meeting, call)",
|
|
116
202
|
inputSchema: {
|
|
117
|
-
type: {
|
|
118
|
-
|
|
119
|
-
|
|
203
|
+
type: {
|
|
204
|
+
type: "string",
|
|
205
|
+
required: true,
|
|
206
|
+
description: "NOTE, EMAIL, TASK, MEETING, CALL",
|
|
207
|
+
},
|
|
208
|
+
properties: {
|
|
209
|
+
type: "object",
|
|
210
|
+
required: true,
|
|
211
|
+
description: "Engagement metadata",
|
|
212
|
+
},
|
|
213
|
+
associations: {
|
|
214
|
+
type: "object",
|
|
215
|
+
required: false,
|
|
216
|
+
description: "{contactIds, companyIds, dealIds, ticketIds}",
|
|
217
|
+
},
|
|
120
218
|
},
|
|
121
219
|
async execute(input, ctx) {
|
|
122
220
|
const { type, properties, associations } = input;
|
|
@@ -130,12 +228,23 @@ export default function hubspot(rl) {
|
|
|
130
228
|
});
|
|
131
229
|
rl.registerAction("engagement.get", {
|
|
132
230
|
description: "Get an engagement",
|
|
133
|
-
inputSchema: {
|
|
134
|
-
|
|
231
|
+
inputSchema: {
|
|
232
|
+
engagementId: {
|
|
233
|
+
type: "string",
|
|
234
|
+
required: true,
|
|
235
|
+
description: "Engagement ID",
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
async execute(input, ctx) {
|
|
239
|
+
return apiRequest(tok(ctx), "GET", `/engagements/v1/engagements/${input.engagementId}`);
|
|
240
|
+
},
|
|
135
241
|
});
|
|
136
242
|
rl.registerAction("engagement.list", {
|
|
137
243
|
description: "List engagements",
|
|
138
|
-
inputSchema: {
|
|
244
|
+
inputSchema: {
|
|
245
|
+
limit: { type: "number", required: false, description: "Max results" },
|
|
246
|
+
offset: { type: "number", required: false, description: "Offset" },
|
|
247
|
+
},
|
|
139
248
|
async execute(input, ctx) {
|
|
140
249
|
const { limit, offset } = (input ?? {});
|
|
141
250
|
const qs = {};
|
|
@@ -148,17 +257,38 @@ export default function hubspot(rl) {
|
|
|
148
257
|
});
|
|
149
258
|
rl.registerAction("engagement.delete", {
|
|
150
259
|
description: "Delete an engagement",
|
|
151
|
-
inputSchema: {
|
|
152
|
-
|
|
260
|
+
inputSchema: {
|
|
261
|
+
engagementId: {
|
|
262
|
+
type: "string",
|
|
263
|
+
required: true,
|
|
264
|
+
description: "Engagement ID",
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
async execute(input, ctx) {
|
|
268
|
+
await apiRequest(tok(ctx), "DELETE", `/engagements/v1/engagements/${input.engagementId}`);
|
|
269
|
+
return { success: true };
|
|
270
|
+
},
|
|
153
271
|
});
|
|
154
272
|
// ── Form ────────────────────────────────────────────
|
|
155
273
|
rl.registerAction("form.submit", {
|
|
156
274
|
description: "Submit a HubSpot form",
|
|
157
275
|
inputSchema: {
|
|
158
|
-
portalId: {
|
|
276
|
+
portalId: {
|
|
277
|
+
type: "string",
|
|
278
|
+
required: true,
|
|
279
|
+
description: "Portal (Hub) ID",
|
|
280
|
+
},
|
|
159
281
|
formId: { type: "string", required: true, description: "Form GUID" },
|
|
160
|
-
fields: {
|
|
161
|
-
|
|
282
|
+
fields: {
|
|
283
|
+
type: "array",
|
|
284
|
+
required: true,
|
|
285
|
+
description: "Array of {name, value} objects",
|
|
286
|
+
},
|
|
287
|
+
context: {
|
|
288
|
+
type: "object",
|
|
289
|
+
required: false,
|
|
290
|
+
description: "Submission context (hutk, pageUri, pageName)",
|
|
291
|
+
},
|
|
162
292
|
},
|
|
163
293
|
async execute(input, ctx) {
|
|
164
294
|
const { portalId, formId, fields, context } = input;
|
|
@@ -170,7 +300,11 @@ export default function hubspot(rl) {
|
|
|
170
300
|
});
|
|
171
301
|
rl.registerAction("form.getFields", {
|
|
172
302
|
description: "Get form fields",
|
|
173
|
-
inputSchema: {
|
|
174
|
-
|
|
303
|
+
inputSchema: {
|
|
304
|
+
formId: { type: "string", required: true, description: "Form GUID" },
|
|
305
|
+
},
|
|
306
|
+
async execute(input, ctx) {
|
|
307
|
+
return apiRequest(tok(ctx), "GET", `/forms/v2/fields/${input.formId}`);
|
|
308
|
+
},
|
|
175
309
|
});
|
|
176
310
|
}
|
|
@@ -8,7 +8,10 @@ async function apiRequest(apiKey, method, endpoint, body, qs) {
|
|
|
8
8
|
url.searchParams.set(k, String(v));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
const opts = {
|
|
11
|
+
const opts = {
|
|
12
|
+
method,
|
|
13
|
+
headers: { "Content-Type": "application/json" },
|
|
14
|
+
};
|
|
12
15
|
if (body && Object.keys(body).length > 0 && method !== "GET")
|
|
13
16
|
opts.body = JSON.stringify(body);
|
|
14
17
|
const res = await fetch(url.toString(), opts);
|
|
@@ -19,10 +22,33 @@ async function apiRequest(apiKey, method, endpoint, body, qs) {
|
|
|
19
22
|
export default function humanticAi(rl) {
|
|
20
23
|
rl.setName("humanticAi");
|
|
21
24
|
rl.setVersion("0.1.0");
|
|
22
|
-
rl.setConnectionSchema({
|
|
25
|
+
rl.setConnectionSchema({
|
|
26
|
+
apiKey: {
|
|
27
|
+
type: "string",
|
|
28
|
+
required: true,
|
|
29
|
+
description: "Humantic AI API key",
|
|
30
|
+
env: "HUMANTIC_AI_API_KEY",
|
|
31
|
+
},
|
|
32
|
+
});
|
|
23
33
|
rl.registerAction("profile.create", {
|
|
24
34
|
description: "Create a user profile from LinkedIn URL or text",
|
|
25
|
-
inputSchema: {
|
|
35
|
+
inputSchema: {
|
|
36
|
+
userId: {
|
|
37
|
+
type: "string",
|
|
38
|
+
required: true,
|
|
39
|
+
description: "Unique user identifier",
|
|
40
|
+
},
|
|
41
|
+
linkedinUrl: {
|
|
42
|
+
type: "string",
|
|
43
|
+
required: false,
|
|
44
|
+
description: "LinkedIn profile URL",
|
|
45
|
+
},
|
|
46
|
+
text: {
|
|
47
|
+
type: "string",
|
|
48
|
+
required: false,
|
|
49
|
+
description: "Text content to analyze",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
26
52
|
async execute(input, ctx) {
|
|
27
53
|
const { userId, linkedinUrl, text } = input;
|
|
28
54
|
const body = { userid: userId };
|
|
@@ -35,7 +61,18 @@ export default function humanticAi(rl) {
|
|
|
35
61
|
});
|
|
36
62
|
rl.registerAction("profile.get", {
|
|
37
63
|
description: "Get a user profile/personality analysis",
|
|
38
|
-
inputSchema: {
|
|
64
|
+
inputSchema: {
|
|
65
|
+
userId: {
|
|
66
|
+
type: "string",
|
|
67
|
+
required: true,
|
|
68
|
+
description: "User identifier",
|
|
69
|
+
},
|
|
70
|
+
persona: {
|
|
71
|
+
type: "string",
|
|
72
|
+
required: false,
|
|
73
|
+
description: "Persona type: sales, hiring, default",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
39
76
|
async execute(input, ctx) {
|
|
40
77
|
const { userId, persona } = input;
|
|
41
78
|
const qs = { userid: userId };
|
|
@@ -46,7 +83,19 @@ export default function humanticAi(rl) {
|
|
|
46
83
|
});
|
|
47
84
|
rl.registerAction("profile.update", {
|
|
48
85
|
description: "Update a user profile with new data",
|
|
49
|
-
inputSchema: {
|
|
86
|
+
inputSchema: {
|
|
87
|
+
userId: {
|
|
88
|
+
type: "string",
|
|
89
|
+
required: true,
|
|
90
|
+
description: "User identifier",
|
|
91
|
+
},
|
|
92
|
+
text: { type: "string", required: false, description: "Additional text" },
|
|
93
|
+
linkedinUrl: {
|
|
94
|
+
type: "string",
|
|
95
|
+
required: false,
|
|
96
|
+
description: "LinkedIn URL",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
50
99
|
async execute(input, ctx) {
|
|
51
100
|
const { userId, text, linkedinUrl } = input;
|
|
52
101
|
const body = { userid: userId };
|
|
@@ -16,12 +16,27 @@ async function apiRequest(apiKey, endpoint, qs) {
|
|
|
16
16
|
export default function hunter(rl) {
|
|
17
17
|
rl.setName("hunter");
|
|
18
18
|
rl.setVersion("0.1.0");
|
|
19
|
-
rl.setConnectionSchema({
|
|
19
|
+
rl.setConnectionSchema({
|
|
20
|
+
apiKey: {
|
|
21
|
+
type: "string",
|
|
22
|
+
required: true,
|
|
23
|
+
description: "Hunter.io API key",
|
|
24
|
+
env: "HUNTER_API_KEY",
|
|
25
|
+
},
|
|
26
|
+
});
|
|
20
27
|
rl.registerAction("domainSearch", {
|
|
21
28
|
description: "Search for email addresses associated with a domain",
|
|
22
29
|
inputSchema: {
|
|
23
|
-
domain: {
|
|
24
|
-
|
|
30
|
+
domain: {
|
|
31
|
+
type: "string",
|
|
32
|
+
required: true,
|
|
33
|
+
description: "Domain name (e.g. example.com)",
|
|
34
|
+
},
|
|
35
|
+
type: {
|
|
36
|
+
type: "string",
|
|
37
|
+
required: false,
|
|
38
|
+
description: "personal or generic",
|
|
39
|
+
},
|
|
25
40
|
limit: { type: "number", required: false, description: "Max results" },
|
|
26
41
|
},
|
|
27
42
|
async execute(input, ctx) {
|
|
@@ -50,7 +65,9 @@ export default function hunter(rl) {
|
|
|
50
65
|
});
|
|
51
66
|
rl.registerAction("emailVerifier", {
|
|
52
67
|
description: "Verify an email address",
|
|
53
|
-
inputSchema: {
|
|
68
|
+
inputSchema: {
|
|
69
|
+
email: { type: "string", required: true, description: "Email to verify" },
|
|
70
|
+
},
|
|
54
71
|
async execute(input, ctx) {
|
|
55
72
|
const data = (await apiRequest(ctx.connection.config.apiKey, "/email-verifier", { email: input.email }));
|
|
56
73
|
return data.data;
|
|
@@ -7,8 +7,18 @@ async function apiRequest(token, method, endpoint, body, qs) {
|
|
|
7
7
|
url.searchParams.set(k, String(v));
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
const opts = {
|
|
11
|
-
|
|
10
|
+
const opts = {
|
|
11
|
+
method,
|
|
12
|
+
headers: {
|
|
13
|
+
Authorization: `Bearer ${token}`,
|
|
14
|
+
"Content-Type": "application/json",
|
|
15
|
+
Accept: "application/json",
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
if (body &&
|
|
19
|
+
Object.keys(body).length > 0 &&
|
|
20
|
+
method !== "GET" &&
|
|
21
|
+
method !== "DELETE")
|
|
12
22
|
opts.body = JSON.stringify(body);
|
|
13
23
|
const res = await fetch(url.toString(), opts);
|
|
14
24
|
if (!res.ok)
|
|
@@ -20,7 +30,14 @@ async function apiRequest(token, method, endpoint, body, qs) {
|
|
|
20
30
|
export default function intercom(rl) {
|
|
21
31
|
rl.setName("intercom");
|
|
22
32
|
rl.setVersion("0.1.0");
|
|
23
|
-
rl.setConnectionSchema({
|
|
33
|
+
rl.setConnectionSchema({
|
|
34
|
+
accessToken: {
|
|
35
|
+
type: "string",
|
|
36
|
+
required: true,
|
|
37
|
+
description: "Intercom access token",
|
|
38
|
+
env: "INTERCOM_ACCESS_TOKEN",
|
|
39
|
+
},
|
|
40
|
+
});
|
|
24
41
|
const tok = (ctx) => ctx.connection.config.accessToken;
|
|
25
42
|
// ── Contact (unified leads + users in v2) ───────────
|
|
26
43
|
rl.registerAction("contact.create", {
|
|
@@ -30,8 +47,16 @@ export default function intercom(rl) {
|
|
|
30
47
|
email: { type: "string", required: false, description: "Email" },
|
|
31
48
|
name: { type: "string", required: false, description: "Full name" },
|
|
32
49
|
phone: { type: "string", required: false, description: "Phone" },
|
|
33
|
-
externalId: {
|
|
34
|
-
|
|
50
|
+
externalId: {
|
|
51
|
+
type: "string",
|
|
52
|
+
required: false,
|
|
53
|
+
description: "External ID (for users)",
|
|
54
|
+
},
|
|
55
|
+
customAttributes: {
|
|
56
|
+
type: "object",
|
|
57
|
+
required: false,
|
|
58
|
+
description: "Custom attributes",
|
|
59
|
+
},
|
|
35
60
|
},
|
|
36
61
|
async execute(input, ctx) {
|
|
37
62
|
const { role, email, name, phone, externalId, customAttributes } = input;
|
|
@@ -51,12 +76,23 @@ export default function intercom(rl) {
|
|
|
51
76
|
});
|
|
52
77
|
rl.registerAction("contact.get", {
|
|
53
78
|
description: "Get a contact by ID",
|
|
54
|
-
inputSchema: {
|
|
55
|
-
|
|
79
|
+
inputSchema: {
|
|
80
|
+
contactId: { type: "string", required: true, description: "Contact ID" },
|
|
81
|
+
},
|
|
82
|
+
async execute(input, ctx) {
|
|
83
|
+
return apiRequest(tok(ctx), "GET", `/contacts/${input.contactId}`);
|
|
84
|
+
},
|
|
56
85
|
});
|
|
57
86
|
rl.registerAction("contact.list", {
|
|
58
87
|
description: "List contacts",
|
|
59
|
-
inputSchema: {
|
|
88
|
+
inputSchema: {
|
|
89
|
+
limit: { type: "number", required: false, description: "Max results" },
|
|
90
|
+
startingAfter: {
|
|
91
|
+
type: "string",
|
|
92
|
+
required: false,
|
|
93
|
+
description: "Pagination cursor",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
60
96
|
async execute(input, ctx) {
|
|
61
97
|
const { limit, startingAfter } = (input ?? {});
|
|
62
98
|
const qs = {};
|
|
@@ -74,7 +110,11 @@ export default function intercom(rl) {
|
|
|
74
110
|
email: { type: "string", required: false, description: "Email" },
|
|
75
111
|
name: { type: "string", required: false, description: "Name" },
|
|
76
112
|
phone: { type: "string", required: false, description: "Phone" },
|
|
77
|
-
customAttributes: {
|
|
113
|
+
customAttributes: {
|
|
114
|
+
type: "object",
|
|
115
|
+
required: false,
|
|
116
|
+
description: "Custom attributes",
|
|
117
|
+
},
|
|
78
118
|
},
|
|
79
119
|
async execute(input, ctx) {
|
|
80
120
|
const { contactId, email, name, phone, customAttributes } = input;
|
|
@@ -92,14 +132,26 @@ export default function intercom(rl) {
|
|
|
92
132
|
});
|
|
93
133
|
rl.registerAction("contact.delete", {
|
|
94
134
|
description: "Delete a contact",
|
|
95
|
-
inputSchema: {
|
|
96
|
-
|
|
135
|
+
inputSchema: {
|
|
136
|
+
contactId: { type: "string", required: true, description: "Contact ID" },
|
|
137
|
+
},
|
|
138
|
+
async execute(input, ctx) {
|
|
139
|
+
return apiRequest(tok(ctx), "DELETE", `/contacts/${input.contactId}`);
|
|
140
|
+
},
|
|
97
141
|
});
|
|
98
142
|
rl.registerAction("contact.search", {
|
|
99
143
|
description: "Search contacts",
|
|
100
144
|
inputSchema: {
|
|
101
|
-
query: {
|
|
102
|
-
|
|
145
|
+
query: {
|
|
146
|
+
type: "object",
|
|
147
|
+
required: true,
|
|
148
|
+
description: "Search query object (Intercom search format)",
|
|
149
|
+
},
|
|
150
|
+
limit: {
|
|
151
|
+
type: "number",
|
|
152
|
+
required: false,
|
|
153
|
+
description: "Max results per page",
|
|
154
|
+
},
|
|
103
155
|
},
|
|
104
156
|
async execute(input, ctx) {
|
|
105
157
|
const { query, limit } = input;
|
|
@@ -113,10 +165,18 @@ export default function intercom(rl) {
|
|
|
113
165
|
rl.registerAction("company.create", {
|
|
114
166
|
description: "Create or update a company",
|
|
115
167
|
inputSchema: {
|
|
116
|
-
companyId: {
|
|
168
|
+
companyId: {
|
|
169
|
+
type: "string",
|
|
170
|
+
required: true,
|
|
171
|
+
description: "Company ID (your identifier)",
|
|
172
|
+
},
|
|
117
173
|
name: { type: "string", required: false, description: "Company name" },
|
|
118
174
|
plan: { type: "string", required: false, description: "Plan name" },
|
|
119
|
-
customAttributes: {
|
|
175
|
+
customAttributes: {
|
|
176
|
+
type: "object",
|
|
177
|
+
required: false,
|
|
178
|
+
description: "Custom attributes",
|
|
179
|
+
},
|
|
120
180
|
},
|
|
121
181
|
async execute(input, ctx) {
|
|
122
182
|
const { companyId, name, plan, customAttributes } = input;
|
|
@@ -132,12 +192,23 @@ export default function intercom(rl) {
|
|
|
132
192
|
});
|
|
133
193
|
rl.registerAction("company.get", {
|
|
134
194
|
description: "Get a company",
|
|
135
|
-
inputSchema: {
|
|
136
|
-
|
|
195
|
+
inputSchema: {
|
|
196
|
+
companyId: {
|
|
197
|
+
type: "string",
|
|
198
|
+
required: true,
|
|
199
|
+
description: "Intercom company ID",
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
async execute(input, ctx) {
|
|
203
|
+
return apiRequest(tok(ctx), "GET", `/companies/${input.companyId}`);
|
|
204
|
+
},
|
|
137
205
|
});
|
|
138
206
|
rl.registerAction("company.list", {
|
|
139
207
|
description: "List companies",
|
|
140
|
-
inputSchema: {
|
|
208
|
+
inputSchema: {
|
|
209
|
+
limit: { type: "number", required: false, description: "Max results" },
|
|
210
|
+
page: { type: "number", required: false, description: "Page" },
|
|
211
|
+
},
|
|
141
212
|
async execute(input, ctx) {
|
|
142
213
|
const { limit, page } = (input ?? {});
|
|
143
214
|
const qs = {};
|
|
@@ -150,7 +221,11 @@ export default function intercom(rl) {
|
|
|
150
221
|
});
|
|
151
222
|
rl.registerAction("company.listUsers", {
|
|
152
223
|
description: "List users of a company",
|
|
153
|
-
inputSchema: {
|
|
154
|
-
|
|
224
|
+
inputSchema: {
|
|
225
|
+
companyId: { type: "string", required: true, description: "Company ID" },
|
|
226
|
+
},
|
|
227
|
+
async execute(input, ctx) {
|
|
228
|
+
return apiRequest(tok(ctx), "GET", `/companies/${input.companyId}/contacts`);
|
|
229
|
+
},
|
|
155
230
|
});
|
|
156
231
|
}
|