Skip to content

Commit b3a71f7

Browse files
committed
Wait node notices implemented
1 parent 06ae2ca commit b3a71f7

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

nodes/LinkedApi/LinkedApi.node.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,18 @@ export class LinkedApi implements INodeType {
9595
inputs: [NodeConnectionType.Main],
9696
outputs: [NodeConnectionType.Main],
9797
usableAsTool: true,
98+
hints: [
99+
{
100+
message:
101+
'This action delivers results asynchronously. Add a <b>Wait</b> node ' +
102+
'(set to "On Webhook Call") right after this node to receive the results.',
103+
type: 'warning',
104+
location: 'outputPane',
105+
whenToDisplay: 'beforeExecution',
106+
displayCondition:
107+
'={{ !["getWorkflowResult", "cancelWorkflow", "pollConversations", "actionsUsageStatistics"].includes($parameter["operation"]) }}',
108+
},
109+
],
98110
credentials: [
99111
{
100112
name: 'linkedApi',

nodes/LinkedApi/shared/LinkedApiOperation.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,27 @@ export abstract class LinkedApiWebhookOperation extends LinkedApiOperation {
8888
'result-retrieval': 'webhook',
8989
};
9090

91+
protected override get defaultFields(): INodeProperties[] {
92+
return [
93+
{
94+
displayName:
95+
'<b>Important:</b> This action delivers results asynchronously. ' +
96+
'You must add a <b>Wait</b> node right after this node and set its ' +
97+
'"Resume" field to <b>"On Webhook Call"</b>. Without the Wait node, ' +
98+
'your workflow will not receive results. ' +
99+
'<a href="https://linkedapi.io/integrations/n8n/building-workflows-0" target="_blank">See setup guide</a>',
100+
name: 'waitNodeRequiredNotice',
101+
type: 'notice',
102+
default: '',
103+
displayOptions: {
104+
show: this.show,
105+
},
106+
},
107+
];
108+
}
109+
91110
override requestBody(context: IExecuteFunctions): Record<string, any> {
92111
const resumeUrl = context.evaluateExpression('{{$execution.resumeUrl}}', 0) as string;
93-
if (!resumeUrl) {
94-
throw new Error("Wait node wasn't found. Please check your workflow.");
95-
}
96112
if (resumeUrl && resumeUrl.includes('//localhost')) {
97113
throw new Error('Localhost running is not allowed. Please use a public n8n instance.');
98114
}

0 commit comments

Comments
 (0)