Error Workflow in n8n Not Triggering Despite Being Set Up Correctly

I’m working with n8n and have created two separate workflows:

Screenshot 2024-08-14 194714



  1. Main Workflow: This workflow fetches emails, parses them, and stores the data in a MySQL database.

  2. Error Handling Workflow: This workflow is supposed to send an email notification when an error occurs in the main workflow.

I’ve linked the Error Handling Workflow to the Main Workflow using the “Error Workflow” setting in the workflow settings. When I manually trigger the Error Handling Workflow, the email notification is sent correctly, which confirms that the Error Handling Workflow itself is functioning.

However, when an error actually occurs in the Main Workflow, the Error Handling Workflow is not triggered as expected. I can see the error in the execution history of the Main Workflow, but it does not seem to activate the Error Handling Workflow.

Steps I’ve Taken:

  • Double-checked that the Error Handling Workflow is correctly set as the Error Workflow in the Main Workflow’s settings.

  • Verified that the Main Workflow is indeed failing (e.g., by forcing an error).

  • Manually tested the Error Handling Workflow to ensure it sends emails correctly.

What could be causing the Error Handling Workflow to not trigger automatically when an error occurs in the Main Workflow? How can I fix this issue?

Any help or guidance would be greatly appreciated!

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 @sasanka_deshapriya

Thanks for posting here and welcome to the community! :cupcake:

That’s because the If node’s false output is not evaluated as an error.

You can activate a specific error output for each node in the settings:
image

However, in your case you probably want to throw an error directly in the code node and then use the error output there instead of the IF node.

So, something like this:

Feel free to share your workflow here by pasting the JSON between two ``` block quotes, if you want us to have a look.

:raised_hands:

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