Memory is a Sheet, not magic
There's no built-in "remember this conversation" switch — memory here is just the last several messages for that chat ID, pulled from a Sheet and formatted into the prompt before the model sees the new message. The two decisions that actually mattered: keying strictly by chat ID so conversations never bleed into each other, and clearing old history past a certain age so the context sent to the model doesn't grow indefinitely and slow every reply down. A typing-indicator step while all this happens turned out to matter more than I expected for how the bot feels to actually talk to — a silent multi-second pause before a Telegram reply reads as broken even when it isn't.
Teaching it to say "I don't know" on purpose
The harder design problem isn't the happy path, it's getting the model to admit uncertainty instead of confidently answering wrong. The fix that worked was structuring the prompt to explicitly separate "answer from known information" from "escalate" as two different outputs the model has to choose between, rather than just asking it to answer and hoping it hedges appropriately on its own. When it picks escalate, the workflow branches to a notification path instead of sending the model's guess to the user, and logs that case separately so I can see exactly what the bot couldn't handle.
The bug that made this fail with a "success" status
This one wasn't a design problem, it was a model-behavior problem I didn't see coming. Some of Groq's newer models spend part of their token budget on internal reasoning before producing the actual answer — invisible to you, but real, and it comes out of the same token limit as everything else. If that limit isn't sized with that hidden reasoning cost in mind, the actual JSON reply gets cut off mid-string, fails to parse, and a workflow with any kind of fallback-on-parse-error logic will silently return a blank or default response — execution shows success, nothing is actually wrong from n8n's point of view, and the bot just quietly stops working. I found this because a different bot went a full day without replying properly and nothing had errored. The fix was two settings, not a redesign: cap how much of the budget goes to reasoning, and size the token limit with enough headroom for both the hidden reasoning and the real answer.
Why I check every workflow after a model swap now
That bug didn't just hit one workflow — the same silent-failure pattern was sitting in five different automations that all happened to share the same model change, and only one of them was loud enough about it to get noticed immediately. The others kept reporting success while doing nothing useful. If you swap the underlying model on any LLM-calling workflow, that's the moment to go check every downstream JSON-parsing step, not just the one you were actually working on.
n8n Automation Hub