{
  "name": "Build a Telegram mental health support bot with GPT-4o",
  "nodes": [
    {
      "id": "0111b076-35d5-4bd1-b608-ec1bf479592b",
      "name": "Start: Receive Message on Telegram",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        1008,
        752
      ]
    },
    {
      "id": "c7f4bbc1-d12b-4f41-b430-aff228a795c9",
      "name": "Route by Input Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        1456,
        720
      ]
    },
    {
      "id": "329aeb7a-9473-4893-b288-0a9db699d090",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -144
      ],
      "parameters": {
        "width": 540,
        "height": 468,
        "content": "## 🚀 Quick Start Guide\n\n1. 🔐 **Connect Your Credentials**  \n   - **Telegram**: Link your bot token in the **Telegram Trigger** and **Telegram** nodes (use BotFather).  \n   - **AI/ML API**: Add your AP"
      }
    },
    {
      "id": "3afdea7a-997f-4593-b5f3-f0ae4592dae4",
      "name": "Vent prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1856,
        464
      ]
    },
    {
      "id": "bdf9d3e9-6430-4a13-b7fc-2fe570720c1f",
      "name": "Insight prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1856,
        656
      ]
    },
    {
      "id": "dd67ab30-9837-4e25-bee4-7011c49485ea",
      "name": "Cope prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1856,
        848
      ]
    },
    {
      "id": "da096c11-0b37-40e7-ba94-4ab65f3cb890",
      "name": "Main prompt for all other messages",
      "type": "n8n-nodes-base.set",
      "position": [
        1856,
        1040
      ]
    },
    {
      "id": "98cf523a-aaf9-4e73-968c-15fe3fa4d0ef",
      "name": "Generate personalised answer",
      "type": "n8n-nodes-aimlapi.aimlApi",
      "position": [
        2304,
        752
      ]
    },
    {
      "id": "292e839f-2843-486f-9a83-3624f0e8fdc0",
      "name": "Send message to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2528,
        752
      ]
    },
    {
      "id": "21b81566-ae81-483b-8430-71766e380426",
      "name": "Show Typing Indicator",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1232,
        752
      ]
    },
    {
      "id": "4d5093cf-bd4b-4435-b1bb-87d3befd4cf7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        640
      ],
      "parameters": {
        "width": null,
        "height": 288,
        "content": "### Checks message.text for #vent, #insight, #cope, or falls back"
      }
    },
    {
      "id": "9f5bc824-0d97-4009-83fe-781cfc4892a6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1552,
        -80
      ],
      "parameters": {
        "width": 368,
        "height": 320,
        "content": "## 🔍 Node Overview\n\n- **Telegram Trigger**: Listens for incoming messages.  \n- **Show Typing Indicator**: Immediately shows “typing…” in chat.  \n- **Route by Input Type (Switch)**: Detects your tag an"
      }
    },
    {
      "id": "42a676f1-815f-4fc7-b537-4550f4ca8852",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1792,
        320
      ],
      "parameters": {
        "width": 224,
        "height": 896,
        "content": "## Chooses from given prompts"
      }
    },
    {
      "id": "09df03c2-96dc-4872-bb52-213506ac8a72",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2272,
        656
      ],
      "parameters": {
        "width": 384,
        "height": 272,
        "content": "## Generates and sends answer to Telegram"
      }
    },
    {
      "id": "e0c4e11c-ce6b-4c39-ad13-9108bfcaeda1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1952,
        -80
      ],
      "parameters": {
        "width": 368,
        "height": 320,
        "content": "## **Example:**\n\n## ```#vent I’m feeling anxious about my presentation```\n\n## → ```“I hear that you’re worried… can you tell me more about what’s on your mind?”```\n"
      }
    }
  ],
  "connections": {
    "Cope prompt": {
      "main": [
        [
          {
            "node": "Generate personalised answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Vent prompt": {
      "main": [
        [
          {
            "node": "Generate personalised answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insight prompt": {
      "main": [
        [
          {
            "node": "Generate personalised answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Input Type": {
      "main": [
        [
          {
            "node": "Vent prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Insight prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Cope prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Main prompt for all other messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Show Typing Indicator": {
      "main": [
        [
          {
            "node": "Route by Input Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate personalised answer": {
      "main": [
        [
          {
            "node": "Send message to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Main prompt for all other messages": {
      "main": [
        [
          {
            "node": "Generate personalised answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start: Receive Message on Telegram": {
      "main": [
        [
          {
            "node": "Show Typing Indicator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}