@steprotech/n8n-nodes-composio 0.0.0-stage → 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.
@@ -0,0 +1,266 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 180.00 180.00" width="128" height="128">
4
+ <g stroke-width="2.00" fill="none" stroke-linecap="butt">
5
+ <path stroke="#195580" vector-effect="non-scaling-stroke" d="
6
+ M 33.66 89.95
7
+ Q 33.66 100.13 33.67 101.11
8
+ Q 33.74 106.41 34.85 108.21
9
+ Q 36.84 111.43 40.50 112.71
10
+ A 2.89 2.77 52.2 0 0 41.52 112.86
11
+ L 59.07 112.07
12
+ A 0.36 0.35 87.7 0 1 59.44 112.42
13
+ Q 59.55 118.99 59.43 122.79
14
+ Q 59.27 127.73 60.74 130.55
15
+ Q 64.01 136.82 72.53 135.07
16
+ Q 78.63 133.82 87.12 132.09
17
+ A 0.35 0.35 0.0 0 1 87.54 132.43
18
+ L 87.58 146.91
19
+ A 1.13 1.08 -55.0 0 0 87.63 147.24
20
+ Q 89.84 155.56 98.35 155.24
21
+ A 4.44 4.07 33.5 0 0 99.36 155.08
22
+ Q 100.62 154.72 103.96 153.18
23
+ Q 130.98 140.65 139.13 136.95
24
+ C 143.08 135.16 145.93 132.81 146.21 128.71
25
+ Q 146.39 126.10 146.35 114.75
26
+ C 146.33 109.09 145.82 106.27 141.39 103.41
27
+ Q 139.29 102.05 132.32 102.57
28
+ Q 113.89 103.94 91.90 105.64
29
+ A 0.55 0.54 -1.8 0 1 91.31 105.09
30
+ Q 91.33 91.02 91.33 89.96
31
+ Q 91.33 88.90 91.31 74.82
32
+ A 0.55 0.54 1.8 0 1 91.90 74.28
33
+ Q 113.89 75.98 132.32 77.35
34
+ Q 139.29 77.87 141.39 76.51
35
+ C 145.82 73.65 146.33 70.83 146.35 65.17
36
+ Q 146.39 53.82 146.21 51.21
37
+ C 145.93 47.11 143.08 44.76 139.13 42.97
38
+ Q 130.99 39.27 103.97 26.74
39
+ Q 100.63 25.20 99.37 24.84
40
+ A 4.44 4.07 -33.5 0 0 98.36 24.68
41
+ Q 89.85 24.36 87.64 32.67
42
+ A 1.13 1.08 55.0 0 0 87.59 33.00
43
+ L 87.54 47.48
44
+ A 0.35 0.35 0.0 0 1 87.12 47.82
45
+ Q 78.63 46.09 72.53 44.84
46
+ Q 64.01 43.09 60.74 49.36
47
+ Q 59.27 52.18 59.43 57.12
48
+ Q 59.55 60.92 59.44 67.49
49
+ A 0.36 0.35 -87.7 0 1 59.07 67.84
50
+ L 41.52 67.05
51
+ A 2.89 2.77 -52.2 0 0 40.50 67.20
52
+ Q 36.84 68.48 34.85 71.70
53
+ Q 33.74 73.50 33.67 78.80
54
+ Q 33.66 79.78 33.66 89.95"
55
+ />
56
+ <path stroke="#195580" vector-effect="non-scaling-stroke" d="
57
+ M 92.09 52.71
58
+ A 0.62 0.62 0.0 0 0 91.35 53.32
59
+ L 91.32 69.91
60
+ A 0.72 0.72 0.0 0 0 91.99 70.63
61
+ Q 119.75 72.54 134.79 73.80
62
+ Q 137.89 74.06 139.12 73.41
63
+ C 142.93 71.39 143.23 67.45 142.59 63.55
64
+ A 0.78 0.77 1.8 0 0 141.98 62.90
65
+ L 92.09 52.71"
66
+ />
67
+ <path stroke="#195580" vector-effect="non-scaling-stroke" d="
68
+ M 63.95 72.35
69
+ A 0.61 0.61 0.0 0 0 63.30 72.96
70
+ L 63.30 106.95
71
+ A 0.61 0.61 0.0 0 0 63.95 107.56
72
+ L 86.97 106.00
73
+ A 0.61 0.61 0.0 0 0 87.54 105.39
74
+ L 87.54 74.47
75
+ A 0.61 0.61 0.0 0 0 86.97 73.86
76
+ L 63.95 72.35"
77
+ />
78
+ <path stroke="#195580" vector-effect="non-scaling-stroke" d="
79
+ M 92.11 127.16
80
+ L 141.95 117.07
81
+ A 0.78 0.77 -1.7 0 0 142.56 116.43
82
+ C 143.20 112.53 142.91 108.60 139.11 106.57
83
+ Q 137.88 105.92 134.78 106.18
84
+ Q 119.76 107.41 92.04 109.27
85
+ A 0.72 0.72 0.0 0 0 91.37 109.99
86
+ L 91.37 126.55
87
+ A 0.62 0.62 0.0 0 0 92.11 127.16"
88
+ />
89
+ </g>
90
+ <path fill="#000000" d="
91
+ M 180.00 0.00
92
+ L 180.00 180.00
93
+ L 0.00 180.00
94
+ L 0.00 0.00
95
+ L 180.00 0.00
96
+ Z
97
+ M 33.66 89.95
98
+ Q 33.66 100.13 33.67 101.11
99
+ Q 33.74 106.41 34.85 108.21
100
+ Q 36.84 111.43 40.50 112.71
101
+ A 2.89 2.77 52.2 0 0 41.52 112.86
102
+ L 59.07 112.07
103
+ A 0.36 0.35 87.7 0 1 59.44 112.42
104
+ Q 59.55 118.99 59.43 122.79
105
+ Q 59.27 127.73 60.74 130.55
106
+ Q 64.01 136.82 72.53 135.07
107
+ Q 78.63 133.82 87.12 132.09
108
+ A 0.35 0.35 0.0 0 1 87.54 132.43
109
+ L 87.58 146.91
110
+ A 1.13 1.08 -55.0 0 0 87.63 147.24
111
+ Q 89.84 155.56 98.35 155.24
112
+ A 4.44 4.07 33.5 0 0 99.36 155.08
113
+ Q 100.62 154.72 103.96 153.18
114
+ Q 130.98 140.65 139.13 136.95
115
+ C 143.08 135.16 145.93 132.81 146.21 128.71
116
+ Q 146.39 126.10 146.35 114.75
117
+ C 146.33 109.09 145.82 106.27 141.39 103.41
118
+ Q 139.29 102.05 132.32 102.57
119
+ Q 113.89 103.94 91.90 105.64
120
+ A 0.55 0.54 -1.8 0 1 91.31 105.09
121
+ Q 91.33 91.02 91.33 89.96
122
+ Q 91.33 88.90 91.31 74.82
123
+ A 0.55 0.54 1.8 0 1 91.90 74.28
124
+ Q 113.89 75.98 132.32 77.35
125
+ Q 139.29 77.87 141.39 76.51
126
+ C 145.82 73.65 146.33 70.83 146.35 65.17
127
+ Q 146.39 53.82 146.21 51.21
128
+ C 145.93 47.11 143.08 44.76 139.13 42.97
129
+ Q 130.99 39.27 103.97 26.74
130
+ Q 100.63 25.20 99.37 24.84
131
+ A 4.44 4.07 -33.5 0 0 98.36 24.68
132
+ Q 89.85 24.36 87.64 32.67
133
+ A 1.13 1.08 55.0 0 0 87.59 33.00
134
+ L 87.54 47.48
135
+ A 0.35 0.35 0.0 0 1 87.12 47.82
136
+ Q 78.63 46.09 72.53 44.84
137
+ Q 64.01 43.09 60.74 49.36
138
+ Q 59.27 52.18 59.43 57.12
139
+ Q 59.55 60.92 59.44 67.49
140
+ A 0.36 0.35 -87.7 0 1 59.07 67.84
141
+ L 41.52 67.05
142
+ A 2.89 2.77 -52.2 0 0 40.50 67.20
143
+ Q 36.84 68.48 34.85 71.70
144
+ Q 33.74 73.50 33.67 78.80
145
+ Q 33.66 79.78 33.66 89.95
146
+ Z"
147
+ />
148
+ <path fill="#31aaff" d="
149
+ M 91.33 89.96
150
+ Q 91.33 91.02 91.31 105.09
151
+ A 0.55 0.54 -1.8 0 0 91.90 105.64
152
+ Q 113.89 103.94 132.32 102.57
153
+ Q 139.29 102.05 141.39 103.41
154
+ C 145.82 106.27 146.33 109.09 146.35 114.75
155
+ Q 146.39 126.10 146.21 128.71
156
+ C 145.93 132.81 143.08 135.16 139.13 136.95
157
+ Q 130.98 140.65 103.96 153.18
158
+ Q 100.62 154.72 99.36 155.08
159
+ A 4.44 4.07 33.5 0 1 98.35 155.24
160
+ Q 89.84 155.56 87.63 147.24
161
+ A 1.13 1.08 -55.0 0 1 87.58 146.91
162
+ L 87.54 132.43
163
+ A 0.35 0.35 0.0 0 0 87.12 132.09
164
+ Q 78.63 133.82 72.53 135.07
165
+ Q 64.01 136.82 60.74 130.55
166
+ Q 59.27 127.73 59.43 122.79
167
+ Q 59.55 118.99 59.44 112.42
168
+ A 0.36 0.35 87.7 0 0 59.07 112.07
169
+ L 41.52 112.86
170
+ A 2.89 2.77 52.2 0 1 40.50 112.71
171
+ Q 36.84 111.43 34.85 108.21
172
+ Q 33.74 106.41 33.67 101.11
173
+ Q 33.66 100.13 33.66 89.95
174
+ Q 33.66 79.78 33.67 78.80
175
+ Q 33.74 73.50 34.85 71.70
176
+ Q 36.84 68.48 40.50 67.20
177
+ A 2.89 2.77 -52.2 0 1 41.52 67.05
178
+ L 59.07 67.84
179
+ A 0.36 0.35 -87.7 0 0 59.44 67.49
180
+ Q 59.55 60.92 59.43 57.12
181
+ Q 59.27 52.18 60.74 49.36
182
+ Q 64.01 43.09 72.53 44.84
183
+ Q 78.63 46.09 87.12 47.82
184
+ A 0.35 0.35 0.0 0 0 87.54 47.48
185
+ L 87.59 33.00
186
+ A 1.13 1.08 55.0 0 1 87.64 32.67
187
+ Q 89.85 24.36 98.36 24.68
188
+ A 4.44 4.07 -33.5 0 1 99.37 24.84
189
+ Q 100.63 25.20 103.97 26.74
190
+ Q 130.99 39.27 139.13 42.97
191
+ C 143.08 44.76 145.93 47.11 146.21 51.21
192
+ Q 146.39 53.82 146.35 65.17
193
+ C 146.33 70.83 145.82 73.65 141.39 76.51
194
+ Q 139.29 77.87 132.32 77.35
195
+ Q 113.89 75.98 91.90 74.28
196
+ A 0.55 0.54 1.8 0 0 91.31 74.82
197
+ Q 91.33 88.90 91.33 89.96
198
+ Z
199
+ M 92.09 52.71
200
+ A 0.62 0.62 0.0 0 0 91.35 53.32
201
+ L 91.32 69.91
202
+ A 0.72 0.72 0.0 0 0 91.99 70.63
203
+ Q 119.75 72.54 134.79 73.80
204
+ Q 137.89 74.06 139.12 73.41
205
+ C 142.93 71.39 143.23 67.45 142.59 63.55
206
+ A 0.78 0.77 1.8 0 0 141.98 62.90
207
+ L 92.09 52.71
208
+ Z
209
+ M 63.95 72.35
210
+ A 0.61 0.61 0.0 0 0 63.30 72.96
211
+ L 63.30 106.95
212
+ A 0.61 0.61 0.0 0 0 63.95 107.56
213
+ L 86.97 106.00
214
+ A 0.61 0.61 0.0 0 0 87.54 105.39
215
+ L 87.54 74.47
216
+ A 0.61 0.61 0.0 0 0 86.97 73.86
217
+ L 63.95 72.35
218
+ Z
219
+ M 92.11 127.16
220
+ L 141.95 117.07
221
+ A 0.78 0.77 -1.7 0 0 142.56 116.43
222
+ C 143.20 112.53 142.91 108.60 139.11 106.57
223
+ Q 137.88 105.92 134.78 106.18
224
+ Q 119.76 107.41 92.04 109.27
225
+ A 0.72 0.72 0.0 0 0 91.37 109.99
226
+ L 91.37 126.55
227
+ A 0.62 0.62 0.0 0 0 92.11 127.16
228
+ Z"
229
+ />
230
+ <path fill="#000000" d="
231
+ M 92.09 52.71
232
+ L 141.98 62.90
233
+ A 0.78 0.77 1.8 0 1 142.59 63.55
234
+ C 143.23 67.45 142.93 71.39 139.12 73.41
235
+ Q 137.89 74.06 134.79 73.80
236
+ Q 119.75 72.54 91.99 70.63
237
+ A 0.72 0.72 0.0 0 1 91.32 69.91
238
+ L 91.35 53.32
239
+ A 0.62 0.62 0.0 0 1 92.09 52.71
240
+ Z"
241
+ />
242
+ <path fill="#000000" d="
243
+ M 63.95 72.35
244
+ L 86.97 73.86
245
+ A 0.61 0.61 0.0 0 1 87.54 74.47
246
+ L 87.54 105.39
247
+ A 0.61 0.61 0.0 0 1 86.97 106.00
248
+ L 63.95 107.56
249
+ A 0.61 0.61 0.0 0 1 63.30 106.95
250
+ L 63.30 72.96
251
+ A 0.61 0.61 0.0 0 1 63.95 72.35
252
+ Z"
253
+ />
254
+ <path fill="#000000" d="
255
+ M 91.37 126.55
256
+ L 91.37 109.99
257
+ A 0.72 0.72 0.0 0 1 92.04 109.27
258
+ Q 119.76 107.41 134.78 106.18
259
+ Q 137.88 105.92 139.11 106.57
260
+ C 142.91 108.60 143.20 112.53 142.56 116.43
261
+ A 0.78 0.77 -1.7 0 1 141.95 117.07
262
+ L 92.11 127.16
263
+ A 0.62 0.62 0.0 0 1 91.37 126.55
264
+ Z"
265
+ />
266
+ </svg>
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Composio implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,333 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Composio = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const GenericFunctions_1 = require("./GenericFunctions");
6
+ const metatools_1 = require("./metatools");
7
+ const resourceOptions = {
8
+ displayName: 'Resource',
9
+ name: 'resource',
10
+ type: 'options',
11
+ noDataExpression: true,
12
+ options: [
13
+ {
14
+ name: 'Action',
15
+ value: 'action',
16
+ description: 'Find an app action and run it against a connected account',
17
+ },
18
+ {
19
+ name: 'Connection',
20
+ value: 'connection',
21
+ description: 'Connect an app, wait for it to finish, list connections or remove one',
22
+ },
23
+ {
24
+ name: 'Advanced',
25
+ value: 'advanced',
26
+ description: 'Call any Composio meta-tool directly with your own arguments',
27
+ },
28
+ ],
29
+ default: 'action',
30
+ };
31
+ const operationOptions = [
32
+ {
33
+ displayName: 'Operation',
34
+ name: 'operation',
35
+ type: 'options',
36
+ noDataExpression: true,
37
+ displayOptions: { show: { resource: ['action'] } },
38
+ options: [
39
+ {
40
+ name: 'Execute an Action',
41
+ value: 'execute',
42
+ description: 'Run a tool slug with arguments against the connected account',
43
+ action: 'Execute an action',
44
+ },
45
+ {
46
+ name: 'Get Action Schemas',
47
+ value: 'schemas',
48
+ description: 'Fetch the full input schemas for tool slugs',
49
+ action: 'Get action schemas',
50
+ },
51
+ {
52
+ name: 'Search Actions',
53
+ value: 'search',
54
+ description: 'Search the Composio catalog for actions matching a request',
55
+ action: 'Search actions',
56
+ },
57
+ ],
58
+ default: 'search',
59
+ },
60
+ {
61
+ displayName: 'Operation',
62
+ name: 'operation',
63
+ type: 'options',
64
+ noDataExpression: true,
65
+ displayOptions: { show: { resource: ['connection'] } },
66
+ options: [
67
+ {
68
+ name: 'Connect an App',
69
+ value: 'connect',
70
+ description: 'Start the authorization flow and return the link to open',
71
+ action: 'Connect an app',
72
+ },
73
+ {
74
+ name: 'Wait for Connection',
75
+ value: 'wait',
76
+ description: 'Wait until you finish authorizing the app in your browser',
77
+ action: 'Wait for a connection',
78
+ },
79
+ {
80
+ name: 'List Connections',
81
+ value: 'list',
82
+ description: 'List the apps already connected to this Composio account',
83
+ action: 'List connections',
84
+ },
85
+ {
86
+ name: 'Remove Connection',
87
+ value: 'remove',
88
+ description: 'Disconnect an app and delete its stored credentials',
89
+ action: 'Remove a connection',
90
+ },
91
+ ],
92
+ default: 'connect',
93
+ },
94
+ {
95
+ displayName: 'Operation',
96
+ name: 'operation',
97
+ type: 'options',
98
+ noDataExpression: true,
99
+ displayOptions: { show: { resource: ['advanced'] } },
100
+ options: [
101
+ {
102
+ name: 'Call a Meta-Tool',
103
+ value: 'call',
104
+ description: 'Send any Composio meta-tool with arguments you supply as JSON',
105
+ action: 'Call a meta tool',
106
+ },
107
+ ],
108
+ default: 'call',
109
+ },
110
+ ];
111
+ const toolkitField = (displayName, description) => ({
112
+ displayName,
113
+ name: 'toolkit',
114
+ type: 'string',
115
+ default: '',
116
+ required: true,
117
+ description,
118
+ placeholder: 'gmail',
119
+ });
120
+ const fields = [
121
+ {
122
+ ...toolkitField('App (Toolkit)', 'The app to connect, as a Composio toolkit slug such as gmail, slack, github or googlesheets. Use Action, Search Actions if you do not know the slug.'),
123
+ displayOptions: { show: { resource: ['connection'], operation: ['connect', 'remove'] } },
124
+ },
125
+ {
126
+ displayName: 'Wait Timeout (Seconds)',
127
+ name: 'timeout',
128
+ type: 'number',
129
+ default: 120,
130
+ description: 'How long to wait for you to finish authorizing in the browser',
131
+ displayOptions: { show: { resource: ['connection'], operation: ['wait'] } },
132
+ },
133
+ {
134
+ displayName: 'Search Query',
135
+ name: 'query',
136
+ type: 'string',
137
+ default: '',
138
+ required: true,
139
+ placeholder: 'send an email to a customer',
140
+ description: 'What you want to do, in plain words. Composio returns matching actions and a plan.',
141
+ displayOptions: { show: { resource: ['action'], operation: ['search'] } },
142
+ },
143
+ {
144
+ displayName: 'Tool Slugs',
145
+ name: 'toolSlugs',
146
+ type: 'string',
147
+ default: '',
148
+ required: true,
149
+ placeholder: 'GMAIL_SEND_EMAIL, GMAIL_FETCH_EMAILS',
150
+ description: 'One or more action slugs, separated by commas. Get them from Search Actions.',
151
+ displayOptions: { show: { resource: ['action'], operation: ['schemas'] } },
152
+ },
153
+ {
154
+ displayName: 'Action Slug',
155
+ name: 'toolSlug',
156
+ type: 'string',
157
+ default: '',
158
+ required: true,
159
+ placeholder: 'GMAIL_SEND_EMAIL',
160
+ description: 'The action to run, as Composio names it. Get it from Search Actions.',
161
+ displayOptions: { show: { resource: ['action'], operation: ['execute'] } },
162
+ },
163
+ {
164
+ displayName: 'Arguments (JSON)',
165
+ name: 'arguments',
166
+ type: 'json',
167
+ default: '{}',
168
+ description: 'The inputs for this action, as JSON. Run Get Action Schemas to see which fields it expects.',
169
+ displayOptions: { show: { resource: ['action'], operation: ['execute'] } },
170
+ },
171
+ {
172
+ displayName: 'App (Toolkit)',
173
+ name: 'toolkit',
174
+ type: 'string',
175
+ default: '',
176
+ description: 'Optional. Restrict the action to this toolkit, for example gmail.',
177
+ displayOptions: { show: { resource: ['action'], operation: ['execute'] } },
178
+ },
179
+ {
180
+ displayName: 'Meta-Tool',
181
+ name: 'metaTool',
182
+ type: 'options',
183
+ options: metatools_1.META_TOOL_OPTIONS,
184
+ default: 'COMPOSIO_SEARCH_TOOLS',
185
+ description: 'The Composio meta-tool to send',
186
+ displayOptions: { show: { resource: ['advanced'], operation: ['call'] } },
187
+ },
188
+ {
189
+ displayName: 'Arguments (JSON)',
190
+ name: 'metaArguments',
191
+ type: 'json',
192
+ default: '{}',
193
+ description: 'The meta-tool arguments, exactly as Composio documents them',
194
+ displayOptions: { show: { resource: ['advanced'], operation: ['call'] } },
195
+ },
196
+ {
197
+ displayName: 'User ID',
198
+ name: 'userId',
199
+ type: 'string',
200
+ default: '',
201
+ description: 'Optional. Override the user whose connections are used. Leave empty to use the credential default.',
202
+ },
203
+ ];
204
+ class Composio {
205
+ constructor() {
206
+ this.description = {
207
+ displayName: 'Composio',
208
+ name: 'composio',
209
+ icon: { light: 'file:composio.svg', dark: 'file:composio.dark.svg' },
210
+ group: ['transform'],
211
+ version: [1],
212
+ subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
213
+ description: 'Connect your own apps through Composio and run their actions in any workflow',
214
+ defaults: { name: 'Composio' },
215
+ usableAsTool: true,
216
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
217
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
218
+ credentials: [{ name: 'composioApi', required: true }],
219
+ properties: [resourceOptions, ...operationOptions, ...fields],
220
+ };
221
+ }
222
+ async execute() {
223
+ const items = this.getInputData();
224
+ const returnData = [];
225
+ const credentials = await this.getCredentials('composioApi');
226
+ for (let i = 0; i < items.length; i++) {
227
+ try {
228
+ const resource = this.getNodeParameter('resource', i);
229
+ const operation = this.getNodeParameter('operation', i);
230
+ const nodeUserId = this.getNodeParameter('userId', i, '') || undefined;
231
+ const userId = nodeUserId || (credentials.userId || undefined);
232
+ const resolvedUserId = userId || undefined;
233
+ let tool;
234
+ let args;
235
+ if (resource === 'connection') {
236
+ const toolkit = this.getNodeParameter('toolkit', i);
237
+ if (operation === 'connect') {
238
+ tool = metatools_1.META_TOOLS.manageConnections;
239
+ args = (0, GenericFunctions_1.buildToolArguments)({
240
+ action: metatools_1.CONNECTION_ACTIONS.create,
241
+ toolkit,
242
+ user_id: resolvedUserId,
243
+ });
244
+ }
245
+ else if (operation === 'wait') {
246
+ const timeout = this.getNodeParameter('timeout', i, 120);
247
+ tool = metatools_1.META_TOOLS.waitForConnections;
248
+ args = (0, GenericFunctions_1.buildToolArguments)({
249
+ timeout,
250
+ user_id: resolvedUserId,
251
+ });
252
+ }
253
+ else if (operation === 'remove') {
254
+ tool = metatools_1.META_TOOLS.manageConnections;
255
+ args = (0, GenericFunctions_1.buildToolArguments)({
256
+ action: metatools_1.CONNECTION_ACTIONS.remove,
257
+ toolkit,
258
+ user_id: resolvedUserId,
259
+ });
260
+ }
261
+ else {
262
+ tool = metatools_1.META_TOOLS.manageConnections;
263
+ args = (0, GenericFunctions_1.buildToolArguments)({
264
+ action: metatools_1.CONNECTION_ACTIONS.list,
265
+ user_id: resolvedUserId,
266
+ });
267
+ }
268
+ }
269
+ else if (resource === 'action') {
270
+ if (operation === 'search') {
271
+ const query = this.getNodeParameter('query', i);
272
+ tool = metatools_1.META_TOOLS.searchTools;
273
+ args = (0, GenericFunctions_1.buildToolArguments)({ query, user_id: resolvedUserId });
274
+ }
275
+ else if (operation === 'schemas') {
276
+ const raw = this.getNodeParameter('toolSlugs', i);
277
+ const toolSlugs = raw
278
+ .split(',')
279
+ .map((slug) => slug.trim())
280
+ .filter((slug) => slug !== '');
281
+ tool = metatools_1.META_TOOLS.getToolSchemas;
282
+ args = (0, GenericFunctions_1.buildToolArguments)({ tool_slugs: toolSlugs, user_id: resolvedUserId });
283
+ }
284
+ else {
285
+ const toolSlug = this.getNodeParameter('toolSlug', i);
286
+ const rawArguments = this.getNodeParameter('arguments', i, '{}');
287
+ const toolkit = this.getNodeParameter('toolkit', i, '') || undefined;
288
+ const parsedArguments = typeof rawArguments === 'string'
289
+ ? JSON.parse(rawArguments === '' ? '{}' : rawArguments)
290
+ : rawArguments;
291
+ tool = metatools_1.META_TOOLS.multiExecuteTool;
292
+ args = (0, GenericFunctions_1.buildToolArguments)({
293
+ tools: [{ tool_slug: toolSlug, arguments: parsedArguments }],
294
+ toolkits: toolkit === undefined ? undefined : [toolkit],
295
+ user_id: resolvedUserId,
296
+ });
297
+ }
298
+ }
299
+ else {
300
+ tool = this.getNodeParameter('metaTool', i);
301
+ const rawMetaArguments = this.getNodeParameter('metaArguments', i, '{}');
302
+ const parsedMetaArguments = typeof rawMetaArguments === 'string'
303
+ ? JSON.parse(rawMetaArguments === '' ? '{}' : rawMetaArguments)
304
+ : rawMetaArguments;
305
+ args = (0, GenericFunctions_1.buildToolArguments)({ ...parsedMetaArguments, user_id: resolvedUserId });
306
+ }
307
+ const outcome = await (0, GenericFunctions_1.callMetaTool)(this, tool, args);
308
+ returnData.push({
309
+ json: {
310
+ tool: outcome.tool,
311
+ data: outcome.data,
312
+ raw: outcome.text,
313
+ isError: outcome.isError,
314
+ },
315
+ pairedItem: { item: i },
316
+ });
317
+ }
318
+ catch (error) {
319
+ if (this.continueOnFail()) {
320
+ returnData.push({
321
+ json: { error: error.message },
322
+ pairedItem: { item: i },
323
+ });
324
+ continue;
325
+ }
326
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
327
+ }
328
+ }
329
+ return [returnData];
330
+ }
331
+ }
332
+ exports.Composio = Composio;
333
+ //# sourceMappingURL=Composio.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Composio.node.js","sourceRoot":"","sources":["../../../nodes/Composio/Composio.node.ts"],"names":[],"mappings":";;;AAQA,+CAAuE;AAEvE,yDAAsE;AACtE,2CAAgF;AAEhF,MAAM,eAAe,GAAoB;IACxC,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE;QACR;YACC,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,2DAA2D;SACxE;QACD;YACC,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,uEAAuE;SACpF;QACD;YACC,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,8DAA8D;SAC3E;KACD;IACD,OAAO,EAAE,QAAQ;CACjB,CAAC;AAEF,MAAM,gBAAgB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,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YAChF,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAnID,4BAmIC"}
@@ -0,0 +1,21 @@
1
+ import type { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-workflow';
2
+ type ComposioContext = IExecuteFunctions | ILoadOptionsFunctions;
3
+ interface JsonRpcError {
4
+ code?: number;
5
+ message?: string;
6
+ data?: unknown;
7
+ }
8
+ interface JsonRpcEnvelope {
9
+ result?: unknown;
10
+ error?: JsonRpcError;
11
+ }
12
+ export declare function buildToolArguments(pairs: Record<string, unknown>): Record<string, unknown>;
13
+ export declare function parseMcpPayload(body: unknown, expectedId: number): JsonRpcEnvelope;
14
+ export interface MetaToolOutcome {
15
+ tool: string;
16
+ text: string;
17
+ data: unknown;
18
+ isError: boolean;
19
+ }
20
+ export declare function callMetaTool(ctx: ComposioContext, tool: string, args: Record<string, unknown>): Promise<MetaToolOutcome>;
21
+ export {};