Error node: pick first node in the flow

Anyone have a sample handy on how to pick the first node’s content if a node fails? (webhook or flow trigger)

Hi @ericsonmartin, are you talking about the error trigger here? This node does not receive data from nodes other than the one that has failed.

If you want to customize error-handling beyond that you’d first need to make sure your execution doesn’t stop in case of an error. This can be configured for each node on the settings tab:

image

You can then use an IF node to check if an error occurred and take action as needed. Depending on how you execute your workflow this could be a custom webhook response or even a custom error message (which could then be processed by an error trigger node and which could also include information from the first node in a workflow).

Here is an example workflow:

When the HTTP Request in this example runs into an error, the error path is executed and a custom error message is generated including data from your first node:

When the HTTP Request node doesn’t encounter an error, execution continues on the success path. To test this, simply use any working URL such as https://mock.codes/200:

Hope this helps!

Thanks! Will test that out.

Was more thinking of the Error trigger where you can input the following to also pick up on the first node content (webhook json in my case):

Your workflow with ID: {{$node["Error Trigger"].json["workflow"]["id"]}} and name: {{$node["Error Trigger"].json["workflow"]["name"]}} failed to execute.

1 Like

Yeah, I am afraid that would require adding custom error handling as suggested above in the first place.

That’s completely fine. Just wanted to avoid adding to all flows and just to the error flow.

Your solution will work fine for me. Thanks for the help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.