Is it possible to return the execution ID and the error of the last execution node?

Hi Teams,
Is it possible to return the execution ID and the error of wherever the last execution node?

Hey @galihsatriawan,

Yeah that should be possible, You can find a quick guide on making error workflows here: Creating error workflows in n8n – n8n Blog

We also document the data available here: Error workflows | n8n Docs

Hopefully this helps, Let me know if you have any other questions on this :slight_smile:

Hi @galihsatriawan

  1. Create new workflow, named ERROR, or any other name of your choice.
    In that workflow with Error node you can get this parameters as it’s output:
    Link on the workflow: {{ $node["Error Trigger"].json["execution"]["url"] }}
    Name of the workflow: {{ $node["Error Trigger"].json["workflow"]["name"] }}
    Name of the node: {{ $node["Error Trigger"].json["execution"]["error"]["node"]["name"] }}
    Then you can pass it to n8n node with {{ $node["Error Trigger"].json["execution"]["id"] }} and get all the data, that was on that node in the time of the error. You have to create api token in your n8n instance for that to work.

  2. Go to your own workflow, where you want to catch errors and in the workflow settings select the ERROR workflow as Error workflow

Next time on your workflow error, all the info would be in the ERROR workflow. You can pass this data further, in a messenger/database/spreadsheet or what ever. I am sending my errors to myself with a telegram bot, for example.

I got it, I has tried, but if I have webhook node, could I return the error or execution id to the webhook node directly to be the response of a request in webhook node ?

Hey @galihsatriawan,

Not if you are using an error trigger, You would need to always continue on errors and use a respond to webhook node.

okay thank a lot

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