mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
✨ Make it possible that Webhook-Node can send custom response
This commit is contained in:
parent
0918106328
commit
f9911c65fe
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue