mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Respond to Webhook Node): Setting to configure outputs (#15619)
Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
This commit is contained in:
@@ -81,13 +81,13 @@ export class RespondToWebhook implements INodeType {
|
||||
icon: { light: 'file:webhook.svg', dark: 'file:webhook.dark.svg' },
|
||||
name: 'respondToWebhook',
|
||||
group: ['transform'],
|
||||
version: [1, 1.1, 1.2, 1.3],
|
||||
version: [1, 1.1, 1.2, 1.3, 1.4],
|
||||
description: 'Returns data for Webhook',
|
||||
defaults: {
|
||||
name: 'Respond to Webhook',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: `={{(${configuredOutputs})($nodeVersion)}}`,
|
||||
outputs: `={{(${configuredOutputs})($nodeVersion, $parameter)}}`,
|
||||
credentials: [
|
||||
{
|
||||
name: 'jwtAuth',
|
||||
@@ -100,6 +100,16 @@ export class RespondToWebhook implements INodeType {
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Enable Response Output Branch',
|
||||
name: 'enableResponseOutput',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description:
|
||||
'Whether to provide an additional output branch with the response sent to the webhook',
|
||||
isNodeSetting: true,
|
||||
displayOptions: { show: { '@version': [{ _cnd: { gte: 1.4 } }] } },
|
||||
},
|
||||
{
|
||||
displayName:
|
||||
'Verify that the "Webhook" node\'s "Respond" parameter is set to "Using Respond to Webhook Node". <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/" target="_blank">More details',
|
||||
@@ -468,7 +478,9 @@ export class RespondToWebhook implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
|
||||
if (nodeVersion >= 1.3) {
|
||||
if (nodeVersion === 1.3) {
|
||||
return [items, [{ json: { response } }]];
|
||||
} else if (nodeVersion >= 1.4 && this.getNodeParameter('enableResponseOutput', 0, false)) {
|
||||
return [items, [{ json: { response } }]];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user