Hi,
How do you handle your n8n timeouts gracefully?
Please share tips or lessons you have learnt using n8n!
Describe the problem/error/question
In workflow settings, one can set a timeout period for each workflow.
I find it good to set it for all my workflows, as I have no use case for a workflow to run indefinitely.
I figured out that when the timeout is reached, the Error workflow is triggered. Great!
And then, what do we do?
Please share your workflow
I am building a workflow starting with a webhook trigger, and containing an OpenAI node.
The OpenAI node takes anything between 5 and 25 seconds to return an answer. Above 30000 ms, the node itself times out. At the beginning and end of this workflow, I insert the query and the output into Airtable.
What I’d like to do is to reply to the webhook in case of a timeout. How can I do it?
What I have tried:
- On the workflow nodes that might error, the complex ones (i.e. not the IF or MERGE nodes), I select in the node settings “On Error (continue using error output)”, which creates another output and allows me to add a “Respond to webhook” node. However, I’m afraid that doesn’t address n8n terminating the workflow because the workflow timeout duration is reached.
- On the Error workflow triggered, the node “Error trigger” contains the name of the last node of the OW (original workflow) that timed out, which is good. But how can I access more OW data than the default “
message:Workflow has been canceled or timed out!”, allowing me to respond to the webhook and to update the correct row in Airtable with a failed status?
Information on your n8n setup
- n8n version: 1.29.1
- Database: default: SQLite
- Running n8n via self-hosted Docker
- Operating system: Ubuntu