Get data after an Error

Describe the problem/error/question

I have a flow with lot of nodes, and for known reasons, an error occured and the flow stopped. It is normal
Now, I would to do some action after the error occured. For that, I would to set an error trigger and to be able to access to data stored in a particular node of the executed flow.

I saw this topic in the forum

But it doesn’t answer to the need

Please share your workflow

Here is an example, I would to get data for the node “The right node” in the error trigger

Information on your n8n setup

  • **n8n version:1.5.1

Thanks for your help

That is sadly not possible like that. On Error, the workflow exectuion always stops and the execution that gets started via the Error Trigger is a totally new one. So it is not possible to access the data of the other nodes (except by using the n8n API and you then extract the data from the JSON).

What you probably want to do instead, is to activate the setting “Continue On Fail” on the node that is expected to fail, then have an IF-Node after it to check if the node succeeded or not and then do whatever you need to do for any of the cases.

Screenshot from 2023-09-08 23-34-43

@jan Thanks for the answer
I saw the workaround in a previous post, and it should work. But, in my case, I have to put a lot of tests in the flow to be sure that everything is OK, it will be painful :slight_smile:

You told about a n8n API to access to an executed flow, I didn’t find any official documentation for that. Do you have a starting point?
Thanks a lot

You can simply use the n8n node to access the API. Regarding docs you an find information about it in n8n in the settings where you get your API key.

Thanks

I made some tests, but I can only get information if an execution succeed or not


[
{
"id": 
"4310",
"finished": 
false,
"mode": 
"trigger",
"retryOf": 
null,
"retrySuccessId": 
null,
"status": 
"failed",
"startedAt": 
"2023-09-11T08:55:24.449Z",
"stoppedAt": 
"2023-09-11T08:55:24.901Z",
"workflowId": 
"0birONeJyThRpnAU",
"waitTill": 
null
}
]

I would to access to data of a particular node in the execution
Is there a way to do that?

Thanks a lot

I guess there is no solution for that request?