Chatbot AI
This workflow integrates the principles of cognitive behavioral therapy to create an intelligent psychological counseling robot based on the Line platform. It can understand user text input in real time, providing emotional support and psychological guidance, addressing the issue of users struggling to obtain immediate assistance in mental health consultations. Through the Azure OpenAI language model, users can engage in intelligent conversations at any time, receiving professional guidance and enhancing the accessibility and efficiency of mental health services.

Workflow Name
Chatbot AI
Key Features and Highlights
This workflow implements an intelligent psychological counseling chatbot based on the Line messaging platform. It integrates Cognitive Behavioral Therapy (CBT) principles to intelligently understand user text inputs, providing psychological guidance and problem facilitation. Key highlights include:
- Real-time loading animation prompts to enhance user experience and reduce anxiety during wait times
- Integration with Azure OpenAI’s powerful language models, utilizing an AI Agent node to conduct in-depth CBT-based conversations
- Automatic message type detection, supporting text input only; non-text messages receive automatic unsupported content replies
- Flexible use of the Line Messaging API for message replies, ensuring efficient and stable message delivery
Core Problems Addressed
This workflow addresses the challenge of users having difficulty accessing immediate, convenient, and professional psychological support. Through automated AI conversations, users can receive CBT-based psychological guidance anytime, helping them identify and adjust negative thought patterns, which aids in emotional regulation and behavioral improvement.
Application Scenarios
- Online psychological counseling services providing intelligent mental health support
- Personal emotion management and cognitive behavioral practice assistant
- Auxiliary tool for psychological therapy institutions to alleviate counselor workload
- Intelligent interaction module for corporate employee mental health care platforms
Main Process Steps
- Line Chatbot (Webhook) receives user messages and triggers the workflow
- Sends a Loading Animation response to inform users of ongoing processing
- Uses the Check Message Type IsText? node to determine message type; proceeds if text, otherwise replies with an unsupported message notification
- Passes text messages to the AI Agent node, which, based on preset CBT system prompts, calls the Azure OpenAI model to generate intelligent conversational responses
- Cleans and formats the AI-generated text via the Format Reply node to ensure message compliance
- Uses the ReplyMessage - Line node to call the Line Messaging API and send the AI-generated reply back to the user
Involved Systems or Services
- Line Messaging API: For receiving messages, sending loading animations, and replying to users
- Azure OpenAI: Provides advanced natural language processing and generation capabilities
- n8n Automation Platform: Enables automated workflow orchestration and node integration
Target Users and Value
- General users seeking psychological counseling or emotional support with on-demand CBT guidance
- Mental health service providers looking to expand online service capabilities and improve efficiency
- Corporate HR and employee care programs aiming to build intelligent psychological support systems
- Developers and product managers who want to leverage automated conversations to help users improve mental well-being
By combining cutting-edge AI technology with psychological theory, this workflow creates an intelligent, professional, and user-friendly psychological counseling assistant, significantly enhancing the accessibility and efficiency of mental health services.