n8n-nodes-custom-webhook-wait 1.0.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/README.md ADDED
@@ -0,0 +1,128 @@
1
+ # n8n-nodes-webhook-wait
2
+
3
+ A custom n8n node that pauses workflow execution and waits for a webhook call before continuing.
4
+
5
+ ## Features
6
+
7
+ - **Customizable Webhook URL**: Set any custom path for your webhook
8
+ - **Multiple HTTP Methods**: Support for GET, POST, PUT, PATCH, DELETE, HEAD
9
+ - **Authentication Options**:
10
+ - None
11
+ - Basic Auth
12
+ - Header Auth
13
+ - **Dynamic Path Generation**:
14
+ - Include execution ID in path
15
+ - Include workflow ID in path
16
+ - **Flexible Response Configuration**:
17
+ - Custom response codes
18
+ - Custom response headers
19
+ - Custom response body/message
20
+ - **Data Handling**:
21
+ - Pass through input data
22
+ - Merge webhook data with existing data
23
+
24
+ ## Installation
25
+
26
+ ### Local Development
27
+
28
+ 1. Clone this repository to your n8n custom nodes directory:
29
+ ```bash
30
+ cd ~/.n8n/custom
31
+ git clone <this-repo> n8n-nodes-webhook-wait
32
+ cd n8n-nodes-webhook-wait
33
+ ```
34
+
35
+ 2. Install dependencies:
36
+ ```bash
37
+ npm install
38
+ ```
39
+
40
+ 3. Build the node:
41
+ ```bash
42
+ npm run build
43
+ ```
44
+
45
+ 4. Restart n8n
46
+
47
+ ### Using npm link (for development)
48
+
49
+ 1. In this project directory:
50
+ ```bash
51
+ npm link
52
+ ```
53
+
54
+ 2. In your n8n installation directory:
55
+ ```bash
56
+ npm link n8n-nodes-webhook-wait
57
+ ```
58
+
59
+ 3. Restart n8n
60
+
61
+ ## Usage
62
+
63
+ ### Basic Usage
64
+
65
+ 1. Add the **Webhook Wait** node to your workflow
66
+ 2. Configure the custom webhook path (e.g., `my-custom-webhook`)
67
+ 3. Set the HTTP method (default: POST)
68
+ 4. Run the workflow - it will pause at this node
69
+ 5. Send a request to the webhook URL to continue the workflow
70
+
71
+ ### Example Workflow
72
+
73
+ ```
74
+ Trigger → Some Processing → Webhook Wait → Continue Processing → End
75
+ ```
76
+
77
+ The workflow will:
78
+ 1. Start from the trigger
79
+ 2. Process initial nodes
80
+ 3. Pause at Webhook Wait and expose a webhook URL
81
+ 4. Wait for an external call to the webhook
82
+ 5. Continue with the remaining nodes
83
+
84
+ ### Webhook URL Format
85
+
86
+ The webhook URL will be:
87
+ ```
88
+ https://your-n8n-instance.com/webhook/your-custom-path
89
+ ```
90
+
91
+ Or with execution ID:
92
+ ```
93
+ https://your-n8n-instance.com/webhook/your-custom-path/execution-id
94
+ ```
95
+
96
+ ### Authentication
97
+
98
+ #### Header Auth
99
+ Set a custom header name and expected value. The webhook will only accept calls that include this header with the correct value.
100
+
101
+ #### Basic Auth
102
+ Configure username and password. The webhook will require HTTP Basic Authentication.
103
+
104
+ ## Configuration Options
105
+
106
+ | Option | Description | Default |
107
+ |--------|-------------|---------|
108
+ | Custom Webhook Path | The path segment of the webhook URL | `webhook-wait` |
109
+ | Use Full Path | Use path as full path instead of appending to base | `false` |
110
+ | HTTP Method | HTTP method to listen for | `POST` |
111
+ | Response Code | HTTP status code to return | `200` |
112
+ | Response Data | What data to return in response | `No Response Body` |
113
+ | Include Execution ID | Append execution ID to path | `false` |
114
+ | Include Workflow ID | Append workflow ID to path | `false` |
115
+ | Pass Through Input Data | Merge input with webhook data | `false` |
116
+ | Timeout (Minutes) | Max wait time (0 = infinite) | `0` |
117
+
118
+ ## Response Data Options
119
+
120
+ - **All Entries**: Return all webhook data (headers, body, query, params)
121
+ - **First Entry JSON**: Return only the request body
122
+ - **First Entry Binary**: Return binary data if present
123
+ - **No Response Body**: Return empty response
124
+ - **Custom Response**: Return a custom JSON message
125
+
126
+ ## License
127
+
128
+ MIT
@@ -0,0 +1,6 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, IWebhookFunctions, IWebhookResponseData } from 'n8n-workflow';
2
+ export declare class WebhookWait implements INodeType {
3
+ description: INodeTypeDescription;
4
+ webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
5
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
6
+ }
@@ -0,0 +1,383 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookWait = void 0;
4
+ class WebhookWait {
5
+ constructor() {
6
+ this.description = {
7
+ displayName: 'Webhook Wait',
8
+ name: 'webhookWait',
9
+ icon: 'fa:pause-circle',
10
+ group: ['trigger'],
11
+ version: 1,
12
+ subtitle: '={{$parameter["customPath"] ? "Path: " + $parameter["customPath"] : "Waiting for webhook..."}}',
13
+ description: 'Pauses workflow execution and waits for a webhook call to continue',
14
+ defaults: {
15
+ name: 'Webhook Wait',
16
+ },
17
+ inputs: ['main'],
18
+ outputs: ['main'],
19
+ webhooks: [
20
+ {
21
+ name: 'default',
22
+ httpMethod: '={{$parameter["httpMethod"]}}',
23
+ responseMode: 'onReceived',
24
+ path: '={{$parameter["customPath"]}}',
25
+ restartWebhook: true,
26
+ },
27
+ ],
28
+ properties: [
29
+ {
30
+ displayName: 'Custom Webhook Path',
31
+ name: 'customPath',
32
+ type: 'string',
33
+ default: 'webhook-wait',
34
+ required: true,
35
+ placeholder: 'my-custom-webhook-path',
36
+ description: 'The path segment of the webhook URL. Can include dynamic values like {{$execution.id}} or {{$workflow.id}}.',
37
+ },
38
+ {
39
+ displayName: 'Use Full Path',
40
+ name: 'useFullPath',
41
+ type: 'boolean',
42
+ default: false,
43
+ description: 'Whether the path should be used as the full path (not appended to the base webhook path)',
44
+ },
45
+ {
46
+ displayName: 'HTTP Method',
47
+ name: 'httpMethod',
48
+ type: 'options',
49
+ options: [
50
+ { name: 'DELETE', value: 'DELETE' },
51
+ { name: 'GET', value: 'GET' },
52
+ { name: 'HEAD', value: 'HEAD' },
53
+ { name: 'PATCH', value: 'PATCH' },
54
+ { name: 'POST', value: 'POST' },
55
+ { name: 'PUT', value: 'PUT' },
56
+ ],
57
+ default: 'POST',
58
+ description: 'The HTTP method to listen to',
59
+ },
60
+ {
61
+ displayName: 'Response Code',
62
+ name: 'responseCode',
63
+ type: 'number',
64
+ default: 200,
65
+ description: 'The HTTP response code to return when webhook is called',
66
+ },
67
+ {
68
+ displayName: 'Response Data',
69
+ name: 'responseData',
70
+ type: 'options',
71
+ options: [
72
+ {
73
+ name: 'All Entries',
74
+ value: 'allEntries',
75
+ description: 'Return all entries from the webhook data',
76
+ },
77
+ {
78
+ name: 'First Entry JSON',
79
+ value: 'firstEntryJson',
80
+ description: 'Return the first entry as JSON',
81
+ },
82
+ {
83
+ name: 'First Entry Binary',
84
+ value: 'firstEntryBinary',
85
+ description: 'Return the first entry binary data',
86
+ },
87
+ {
88
+ name: 'No Response Body',
89
+ value: 'noData',
90
+ description: 'Return no response body',
91
+ },
92
+ {
93
+ name: 'Custom Response',
94
+ value: 'customResponse',
95
+ description: 'Return a custom response message',
96
+ },
97
+ ],
98
+ default: 'noData',
99
+ description: 'What data to return in the webhook response',
100
+ },
101
+ {
102
+ displayName: 'Custom Response Message',
103
+ name: 'customResponseMessage',
104
+ type: 'string',
105
+ displayOptions: {
106
+ show: {
107
+ responseData: ['customResponse'],
108
+ },
109
+ },
110
+ default: '{"status": "received", "message": "Webhook received successfully"}',
111
+ description: 'Custom JSON response message',
112
+ },
113
+ {
114
+ displayName: 'Options',
115
+ name: 'options',
116
+ type: 'collection',
117
+ placeholder: 'Add Option',
118
+ default: {},
119
+ options: [
120
+ {
121
+ displayName: 'Include Execution ID in Path',
122
+ name: 'includeExecutionId',
123
+ type: 'boolean',
124
+ default: false,
125
+ description: 'Whether to automatically append the execution ID to the webhook path',
126
+ },
127
+ {
128
+ displayName: 'Include Workflow ID in Path',
129
+ name: 'includeWorkflowId',
130
+ type: 'boolean',
131
+ default: false,
132
+ description: 'Whether to automatically append the workflow ID to the webhook path',
133
+ },
134
+ {
135
+ displayName: 'Pass Through Input Data',
136
+ name: 'passThroughInputData',
137
+ type: 'boolean',
138
+ default: false,
139
+ description: 'Whether to merge input data with webhook data when continuing',
140
+ },
141
+ {
142
+ displayName: 'Timeout (Minutes)',
143
+ name: 'timeout',
144
+ type: 'number',
145
+ default: 0,
146
+ description: 'Maximum time to wait for webhook call (0 = no timeout)',
147
+ },
148
+ {
149
+ displayName: 'Response Content-Type',
150
+ name: 'responseContentType',
151
+ type: 'string',
152
+ default: 'application/json',
153
+ description: 'The content type of the response',
154
+ },
155
+ {
156
+ displayName: 'Response Headers',
157
+ name: 'responseHeaders',
158
+ type: 'fixedCollection',
159
+ typeOptions: {
160
+ multipleValues: true,
161
+ },
162
+ default: {},
163
+ options: [
164
+ {
165
+ name: 'entries',
166
+ displayName: 'Header',
167
+ values: [
168
+ {
169
+ displayName: 'Name',
170
+ name: 'name',
171
+ type: 'string',
172
+ default: '',
173
+ },
174
+ {
175
+ displayName: 'Value',
176
+ name: 'value',
177
+ type: 'string',
178
+ default: '',
179
+ },
180
+ ],
181
+ },
182
+ ],
183
+ description: 'Custom response headers',
184
+ },
185
+ {
186
+ displayName: 'Authentication',
187
+ name: 'authentication',
188
+ type: 'options',
189
+ options: [
190
+ { name: 'None', value: 'none' },
191
+ { name: 'Basic Auth', value: 'basicAuth' },
192
+ { name: 'Header Auth', value: 'headerAuth' },
193
+ ],
194
+ default: 'none',
195
+ description: 'Authentication method for the webhook',
196
+ },
197
+ {
198
+ displayName: 'Auth Header Name',
199
+ name: 'authHeaderName',
200
+ type: 'string',
201
+ default: 'Authorization',
202
+ displayOptions: {
203
+ show: {
204
+ authentication: ['headerAuth'],
205
+ },
206
+ },
207
+ description: 'Name of the header to check for authentication',
208
+ },
209
+ {
210
+ displayName: 'Auth Header Value',
211
+ name: 'authHeaderValue',
212
+ type: 'string',
213
+ typeOptions: {
214
+ password: true,
215
+ },
216
+ default: '',
217
+ displayOptions: {
218
+ show: {
219
+ authentication: ['headerAuth'],
220
+ },
221
+ },
222
+ description: 'Expected value of the authentication header',
223
+ },
224
+ {
225
+ displayName: 'Basic Auth Username',
226
+ name: 'basicAuthUsername',
227
+ type: 'string',
228
+ default: '',
229
+ displayOptions: {
230
+ show: {
231
+ authentication: ['basicAuth'],
232
+ },
233
+ },
234
+ },
235
+ {
236
+ displayName: 'Basic Auth Password',
237
+ name: 'basicAuthPassword',
238
+ type: 'string',
239
+ typeOptions: {
240
+ password: true,
241
+ },
242
+ default: '',
243
+ displayOptions: {
244
+ show: {
245
+ authentication: ['basicAuth'],
246
+ },
247
+ },
248
+ },
249
+ ],
250
+ },
251
+ ],
252
+ };
253
+ }
254
+ async webhook() {
255
+ var _a;
256
+ const req = this.getRequestObject();
257
+ const res = this.getResponseObject();
258
+ const responseCode = this.getNodeParameter('responseCode', 200);
259
+ const responseData = this.getNodeParameter('responseData', 'noData');
260
+ const options = this.getNodeParameter('options', {});
261
+ // Handle authentication
262
+ if (options.authentication === 'headerAuth') {
263
+ const headerName = options.authHeaderName || 'Authorization';
264
+ const expectedValue = options.authHeaderValue || '';
265
+ const actualValue = req.headers[headerName.toLowerCase()];
266
+ if (actualValue !== expectedValue) {
267
+ res.status(401).json({ error: 'Unauthorized' });
268
+ return { noWebhookResponse: true };
269
+ }
270
+ }
271
+ if (options.authentication === 'basicAuth') {
272
+ const authHeader = req.headers.authorization;
273
+ if (!authHeader || !authHeader.startsWith('Basic ')) {
274
+ res.status(401).json({ error: 'Unauthorized' });
275
+ return { noWebhookResponse: true };
276
+ }
277
+ const base64Credentials = authHeader.split(' ')[1];
278
+ const credentials = Buffer.from(base64Credentials, 'base64').toString('utf-8');
279
+ const [username, password] = credentials.split(':');
280
+ if (username !== options.basicAuthUsername || password !== options.basicAuthPassword) {
281
+ res.status(401).json({ error: 'Unauthorized' });
282
+ return { noWebhookResponse: true };
283
+ }
284
+ }
285
+ // Set custom headers
286
+ if ((_a = options.responseHeaders) === null || _a === void 0 ? void 0 : _a.entries) {
287
+ for (const header of options.responseHeaders.entries) {
288
+ res.setHeader(header.name, header.value);
289
+ }
290
+ }
291
+ // Set content type
292
+ if (options.responseContentType) {
293
+ res.setHeader('Content-Type', options.responseContentType);
294
+ }
295
+ // Prepare webhook data
296
+ const webhookData = {
297
+ json: {
298
+ headers: req.headers,
299
+ params: req.params,
300
+ query: req.query,
301
+ body: req.body,
302
+ webhookUrl: req.url,
303
+ method: req.method,
304
+ timestamp: new Date().toISOString(),
305
+ },
306
+ };
307
+ // Handle binary data if present
308
+ if (req.body && Buffer.isBuffer(req.body)) {
309
+ webhookData.binary = {
310
+ data: await this.helpers.prepareBinaryData(req.body, 'data'),
311
+ };
312
+ }
313
+ // Prepare response based on settings
314
+ let responseBody;
315
+ switch (responseData) {
316
+ case 'allEntries':
317
+ responseBody = webhookData.json;
318
+ break;
319
+ case 'firstEntryJson':
320
+ responseBody = webhookData.json.body;
321
+ break;
322
+ case 'customResponse':
323
+ const customMessage = this.getNodeParameter('customResponseMessage', '{}');
324
+ try {
325
+ responseBody = JSON.parse(customMessage);
326
+ }
327
+ catch {
328
+ responseBody = { message: customMessage };
329
+ }
330
+ break;
331
+ case 'noData':
332
+ default:
333
+ responseBody = undefined;
334
+ break;
335
+ }
336
+ return {
337
+ webhookResponse: {
338
+ status: responseCode,
339
+ body: responseBody,
340
+ },
341
+ workflowData: [[webhookData]],
342
+ };
343
+ }
344
+ async execute() {
345
+ const items = this.getInputData();
346
+ const customPath = this.getNodeParameter('customPath', 0);
347
+ const options = this.getNodeParameter('options', 0, {});
348
+ // Build the actual webhook path
349
+ let webhookPath = customPath;
350
+ if (options.includeWorkflowId) {
351
+ const workflowId = this.getWorkflow().id;
352
+ webhookPath = `${webhookPath}/${workflowId}`;
353
+ }
354
+ if (options.includeExecutionId) {
355
+ const executionId = this.getExecutionId();
356
+ webhookPath = `${webhookPath}/${executionId}`;
357
+ }
358
+ // Add webhook URL info to input items for reference
359
+ const outputItems = items.map((item) => ({
360
+ json: {
361
+ ...item.json,
362
+ _webhookWait: {
363
+ webhookPath,
364
+ waitingForWebhook: true,
365
+ timestamp: new Date().toISOString(),
366
+ },
367
+ },
368
+ binary: item.binary,
369
+ }));
370
+ // The actual waiting is handled by n8n's webhook infrastructure
371
+ // This node will pause here and resume when the webhook is called
372
+ // Calculate timeout date (0 means wait indefinitely - set far future date)
373
+ const timeoutMinutes = options.timeout || 0;
374
+ const waitUntil = timeoutMinutes > 0
375
+ ? new Date(Date.now() + timeoutMinutes * 60 * 1000)
376
+ : new Date(Date.now() + 365 * 24 * 60 * 60 * 1000); // 1 year if no timeout
377
+ await this.putExecutionToWait(waitUntil);
378
+ // Return input data - execution will resume when webhook is called
379
+ return [outputItems];
380
+ }
381
+ }
382
+ exports.WebhookWait = WebhookWait;
383
+ //# sourceMappingURL=WebhookWait.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebhookWait.node.js","sourceRoot":"","sources":["../../../nodes/WebhookWait/WebhookWait.node.ts"],"names":[],"mappings":";;;AAUA,MAAa,WAAW;IAAxB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,gGAAgG;YAC1G,WAAW,EAAE,oEAAoE;YACjF,QAAQ,EAAE;gBACT,IAAI,EAAE,cAAc;aACpB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,QAAQ,EAAE;gBACT;oBACC,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,+BAA+B;oBAC3C,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE,+BAA+B;oBACrC,cAAc,EAAE,IAAI;iBACpB;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,qBAAqB;oBAClC,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,cAAc;oBACvB,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,wBAA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O,CAAC,kBAAkB,EAAE,CAAC;YAChC,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;YAC1C,WAAW,GAAG,GAAG,WAAW,IAAI,WAAW,EAAE,CAAC;QAC/C,CAAC;QAED,oDAAoD;QACpD,MAAM,WAAW,GAAyB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC9D,IAAI,EAAE;gBACL,GAAG,IAAI,CAAC,IAAI;gBACZ,YAAY,EAAE;oBACb,WAAW;oBACX,iBAAiB,EAAE,IAAI;oBACvB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;iBACnC;aACD;YACD,MAAM,EAAE,IAAI,CAAC,MAAM;SACnB,CAAC,CAAC,CAAC;QAEJ,gEAAgE;QAChE,kEAAkE;QAClE,2EAA2E;QAC3E,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC;QAC5C,MAAM,SAAS,GAAG,cAAc,GAAG,CAAC;YACnC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,cAAc,GAAG,EAAE,GAAG,IAAI,CAAC;YACnD,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,uBAAuB;QAE5E,MAAM,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAEzC,mEAAmE;QACnE,OAAO,CAAC,WAAW,CAAC,CAAC;IACtB,CAAC;CACD;AAvZD,kCAuZC"}
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <circle cx="12" cy="12" r="10"/>
3
+ <polyline points="12 6 12 12 16 14"/>
4
+ <path d="M4 12h2"/>
5
+ <path d="M18 12h2"/>
6
+ </svg>
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // This file is intentionally left empty
2
+ // n8n loads nodes from the paths specified in package.json
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "n8n-nodes-custom-webhook-wait",
3
+ "version": "1.0.0",
4
+ "description": "Custom n8n node that waits for a webhook call before continuing workflow execution",
5
+ "keywords": [
6
+ "n8n-community-node-package",
7
+ "n8n",
8
+ "webhook",
9
+ "wait"
10
+ ],
11
+ "license": "MIT",
12
+ "homepage": "",
13
+ "author": {
14
+ "name": "Custom Developer"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": ""
19
+ },
20
+ "main": "index.js",
21
+ "scripts": {
22
+ "build": "tsc && gulp build:icons",
23
+ "dev": "tsc --watch",
24
+ "format": "prettier nodes --write",
25
+ "lint": "eslint nodes --ext .ts --fix",
26
+ "lintcheck": "eslint nodes --ext .ts",
27
+ "prepublishOnly": "npm run build"
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "n8n": {
33
+ "n8nNodesApiVersion": 1,
34
+ "nodes": [
35
+ "dist/nodes/WebhookWait/WebhookWait.node.js"
36
+ ]
37
+ },
38
+ "devDependencies": {
39
+ "@types/node": "^20.10.0",
40
+ "gulp": "^4.0.2",
41
+ "n8n-workflow": "^1.20.0",
42
+ "prettier": "^3.1.0",
43
+ "typescript": "^5.3.2"
44
+ },
45
+ "peerDependencies": {
46
+ "n8n-workflow": "*"
47
+ }
48
+ }