Save Error output

Hey Guys.
I am facing a challeng and I want help. Here it is.
I want to get the error output as json and store it on my database. on error output I get nothing to store it.

Node type

n8n-nodes-base.telegram

Node version

1.2 (Latest)

n8n version

1.47.1 (Self Hosted)

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Mohammadali_Mo

you can capture any error with the Error Trigger Node

You can make a new workflow for this. Then change the settings of your Telegram workflow to use the Error Handling Workflow

You can read more about Error Handling in n8n here:

2 Likes

Thanks for your answer. the problem is that error workflows don’t get data from errored workflow.
as you can see I cant get chat id:
node

resource:message

operation:sendMessage

chatId:={{ $('If9').item.json.id }}

text:❌

Anybodey can help me?

Hi @Mohammadali_Mo

very sorry for the late reply.

What you can do is to pass on the ChatId from the parameters property that the error output will produce. You can reference it in the error workflow as {{ $json.execution.error.node.parameters }}

Here is a simple workflow to demonstrate what I mean.

Instead of the DebugHelper Node your Telegram Node will be throwing an error and the Error Trigger workflow will capture it. You can then access the before mentioned parameters property to extract your chatId from the Telegram Node.

Let us know how that worked out!