Hello! Not sure if you have already solved this, if you haven’t I literally encountered this yesterday and managed to solve it with help from Lovable. I am building a RAG chatbot with Lovable as front-end and n8n as back-end. Same construct as what you described: Lovable sends a POST request to n8n’s webhook node –> Lovable receives a response back from n8n –> Response is shown on Lovable’s front-end UI. However where I got stuck was exactly the browser time-out issue which couldn’t be solved no matter how much Lovable codes the timeout window to be (e.g. 5mins, or some Edge function that has 3 mins window).
What Lovable did for me was this:
Webhook callback pattern (recommended for long operations):
-
-
(After POST request is sent to n8n) n8n immediately responds with “processing started”
-
When done, n8n calls a separate webhook (callback URL end point) with the result
-
Requires implementing a callback endpoint and updating the UI to poll/listen for results
-
Lovable understood the back-end things it needed to change:
Changes Needed on Lovable Side
-
Create chat-callback edge function to receive n8n’s result
-
Create database table to store processing status & results
-
Update frontend to poll/subscribe for results
-
Update chat-proxy to pass callbackUrl and handle 202 responses
Below were the changes I had to implent on n8n to make the above solution work:
- Instead of the typical webhook in –> AI Agent/ whatever back-end processing work –> Response to Webhook node, you need to immediately provide a ‘Respond to Webhook’ response back to the source (in my case, Lovable), and separately send another POST request whenever your processing is done (see mine comes out of the AI agent)
This is what the ‘Respond to Webhook’ configuration looks like:
Here’s the JSON
{
“status”: “Processing”,
“conversationId”: “{{ $json.body.conversationId }}” ,
“message”: “Your request is being processed. You’ll receive a response shortly.”
}
As for the ‘POST AI Response to Lovable’, that’s just a HTTP request node:
JSON body I used:
{
“conversationId”: “{{ $(‘Webhook’).item.json.body.conversationId }}”,
“message”: “{{ $json.output.replace(/\n/g, ‘\n’) }}”
}
Hope this helps?


