Cloudflare sits in front of all n8n Cloud webhooks and enforces a ~100-second timeout. If your workflow takes longer than that, the connection will be dropped with a 524/504, and this can’t be changed on n8n Cloud.
The workaround is to respond quickly and let the heavy lifting happen in the background:
Use a Response to Webhook node to return 200 OK right away.
Keep processing your workflow asynchronously, and if you need to deliver results later, either trigger a second webhook or let the client poll for completion.
The only other option would be self-hosting n8n, where you can control the timeout yourself.
Hope that helps! Let me know if you need an example setup and I can share more details.
another options outside @AlvLeoAI answer is considering selfhost. This way, you can configure your own timeout settings and aren’t limited by Cloudflare’s restrictions.