Hi team,
I’m using n8n self-hosted (v1.89.2) to build an AI chatbot workflow. The flow is working perfectly until I add the Google Sheets node to log the conversation. Here’s the setup and the issue:
Working Setup (no Google Sheets):
- Webhook node (receives user message from HTML chat UI)
- LangChain Q&A node (calls Ollama, returns response)
- Respond to Webhook node — sends AI response back to chat UI
When I run this, everything works. The chat UI receives the AI response without issue.
Failing Setup (with Google Sheets):
Same as above, but after Q&A node I added:
- Code node (formats User Question, AI Response, Timestamp)
- Google Sheets node (logs the values to a sheet)
- Respond to Webhook node
Now the frontend chat UI shows:
"I apologize, but I'm having trouble connecting to the server. Please try again in a few moments."
However, I verified that the Google Sheet does get updated, and the workflow succeeds without any error in the n8n UI.
Observations:
- Disabling the Google Sheets node makes the chat UI response work again.
- So it seems like the webhook is not responding fast enough when Sheets is in the path.
- Tried using Respond to Webhook with “First incoming item” and correct field — no difference.
I want to:
- Return the AI response quickly to the chat UI
- Log the full conversation (User question, AI response, Timestamp) in Google Sheets
- Avoid timeouts/errors on the chat UI
My Question:
- What is the best practice for this setup in n8n?
- Should I split the workflow into two — one for fast webhook response, another for async logging to Google Sheets? Or is there a way to ensure the webhook responds quickly even with Sheets in the same flow?
If possible, please guide with a proper structure or share example JSON workflows.
Thanks in advance!
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- **n8n version:1.89.2 Self Hosted
- **Database (default: SQLite):Qdrant Vector Store
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- **Running n8n via (Docker, npm, n8n cloud, desktop app):npm
- **Operating system:Ubuntu 24.04