mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
✨ Make it possible that Webhook-Node can send custom response
This commit is contained in:
@@ -250,6 +250,21 @@ export class Webhook implements INodeType {
|
|||||||
the received file. If the data gets received via "Form-Data Multipart"<br />
|
the received file. If the data gets received via "Form-Data Multipart"<br />
|
||||||
it will be the prefix and a number starting with 0 will be attached to it.`,
|
it will be the prefix and a number starting with 0 will be attached to it.`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Response Data',
|
||||||
|
name: 'responseData',
|
||||||
|
type: 'string',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
'/responseMode': [
|
||||||
|
'onReceived',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default: '',
|
||||||
|
placeholder: 'success',
|
||||||
|
description: 'Custom response data to send.',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Response Content-Type',
|
displayName: 'Response Content-Type',
|
||||||
name: 'responseContentType',
|
name: 'responseContentType',
|
||||||
@@ -480,7 +495,13 @@ export class Webhook implements INodeType {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let webhookResponse: string | undefined;
|
||||||
|
if (options.responseData) {
|
||||||
|
webhookResponse = options.responseData as string;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
webhookResponse,
|
||||||
workflowData: [
|
workflowData: [
|
||||||
[
|
[
|
||||||
response,
|
response,
|
||||||
|
|||||||
Reference in New Issue
Block a user