Make it possible that Webhook-Node can send custom response

This commit is contained in:
Jan Oberhauser 2020-12-14 17:19:20 +01:00
parent 0918106328
commit f9911c65fe

View file

@ -250,6 +250,21 @@ export class Webhook implements INodeType {
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.`,
},
{
displayName: 'Response Data',
name: 'responseData',
type: 'string',
displayOptions: {
show: {
'/responseMode': [
'onReceived',
],
},
},
default: '',
placeholder: 'success',
description: 'Custom response data to send.',
},
{
displayName: 'Response Content-Type',
name: 'responseContentType',
@ -480,7 +495,13 @@ export class Webhook implements INodeType {
};
}
let webhookResponse: string | undefined;
if (options.responseData) {
webhookResponse = options.responseData as string;
}
return {
webhookResponse,
workflowData: [
[
response,