Business Outcome
<aside>
💡
- Problem: CBT techniques help with anxiety when people practice them regularly between sessions. Anxious thoughts usually show up in the evening, when the therapist isn't available and nobody around knows the method.
- Before: Techniques in notes or in your head, support from loved ones who keep reassuring in circles, and general AI chats that don't stick to the CBT frame and can give harmful advice.
- What was built: A private Telegram bot on n8n. It checks in every evening, guides you through a CBT technique step by step in a friendly tone, and has quick /sos and /hug commands, a crisis protocol and invite-only access.
Result: A personal project, live and tested. Conversation texts aren't stored anywhere, and the bot runs for free on the Groq free tier with a fallback model.
</aside>
Personal project: two n8n workflows, an AI Agent on Groq, conversation memory in RAM only, and an n8n Data Table for settings only. No paid APIs.
Project Details
Context:
- Who it's for: me and people close to me who get an invite link.
- Format: personal project, the bot is live.
- Requirements: privacy (conversation texts are never stored), Ukrainian or Russian by user choice, a friendly tone, safe handling of crisis messages.
Problem:
- Anxiety shows up in the evening, and the therapist is available once a week.
- Loved ones want to help, but reassurance in circles brings short relief and feeds the anxiety.
- General AI chats can give harmful advice, like telling someone who beats themselves up about food to count calories.
Solution
<aside>
🧠
Two n8n workflows. CBT Bot: Dialog receives every message: a Code node picks the route (commands, buttons, crisis phrases), a Data Table checks access and language, and a 12-output Switch routes the event. Fixed replies go out without AI, conversations go to an AI Agent with a library of about 20 CBT techniques. CBT Bot: Daily Question sends a question with yes/no buttons every evening at 8 pm.
Tools: n8n (self-hosted on PikaPods), Telegram Bot API (reply keyboards, typing status), Groq (gpt-oss-120b with gpt-oss-20b as fallback), Simple Memory, n8n Data Tables, JavaScript.
</aside>
Solution logic: