Skip to main content

Build a Telegram mental health support bot with GPT-4o

Workflow preview

Workflow preview
100%
Build a Telegram mental health support bot with GPT-4o preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow contains community nodes that are only compatible with the self hosted version of n8n. n8n Workflow Template: AI‑Powered Mental Health Support Bot Overview: This template enables you ...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.switch, n8n-nodes-base.stickynote, n8n-nodes-base.set, n8n-nodes-aimlapi.aimlapi, n8n-nodes-base.telegram

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by AI/ML API | D1m7asis.

Original n8n.io source

1.1 Workflow description

Title
Build a Telegram mental health support bot with GPT-4o
Workflow name
Build a Telegram mental health support bot with GPT-4o

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

n8n Workflow Template: AI‑Powered Mental Health Support Bot

Overview: This template enables you to build a Telegram bot that delivers real‑time, empathetic mental health support. Incoming messages tagged with #vent#insight, or #cope are routed to GPT‑4o via the AI/ML API, which returns tailored, compassionate responses.

How it works:

  1. Telegram Trigger listens for new chat messages or voice notes.
  2. Show Typing Indicator immediately signals “typing…” in the chat.
  3. Switch Node examines the text prefix and routes to one of four branches (VentInsightCope, or default).
  4. Set Prompt nodes build a JSON payload with a specific role‑play prompt for each branch.
  5. AI/ML API node (model gpt-4o) generates the response.
  6. Telegram node sends the AI’s answer back to the user.

Setup Steps:

  1. Connect your Telegram bot token in the Telegram credentials.
  2. Add your AI/ML API key (GPT‑4o) in n8n’s credential settings.
  3. Activate the workflow and deploy your n8n instance webhook URL to BotFather.
  4. Test by sending #vent I’m stressed, #insight Why do I feel…, or any tag in your Telegram chat.

This plug‑and‑play workflow brings AI‑driven emotional support directly into Telegram.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Start: Receive Message on Telegram

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.1

Block 2 - Route by Input Type

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Vent prompt

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Insight prompt

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 6 - Cope prompt

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Main prompt for all other messages

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Generate personalised answer

Type / Role
n8n-nodes-aimlapi.aimlApi - aimlApi
Config choices
Version 1

Block 9 - Send message to Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 10 - Show Typing Indicator

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 11 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Build a Telegram mental health support bot with GPT-4o
Complexity advanced
Nodes 15
Categories Support Chatbot, AI Chatbot
Author AI/ML API | D1m7asis
Published 28 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6556/6556.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build a Telegram mental health support bot with GPT-4o do?

This workflow contains community nodes that are only compatible with the self hosted version of n8n. n8n Workflow Template: AI‑Powered Mental Health Support Bot Overview: This template enables you ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.