header
login

How to Create an AI Chatbot

An AI chatbot answers arbitrary user questions using a neural network. No need to write every response manually — AI generates them automatically.

Scenario

User asks a question → AI analyzes → bot responds with generated answer

Building It

1. Prepare the Project

Create a project with a Telegram trigger.

2. Handle /start

Add a step with a condition:

"{=message=}" == "/start"

Welcome message:

Hello! I'm an AI assistant. Ask me any question and I'll try to help.

3. Connect AI

In the else branch (for all other messages), add:

  1. Queue AI — processes the user's message

    • save_as: ai_answer
  2. send_message — sends the response:

    {=ai_answer=}
    

4. Result

That's it. The user types any question — AI responds. Three blocks, zero code.

Cost Control

AI uses tokens from your pricing plan:

  • Start: 200,000 tokens
  • Business: 1,000,000 tokens
  • Pro: 3,000,000 tokens

Track usage in your account settings.

Improvements

  • Add buttons with common questions
  • Save conversation history in variables for context
  • Combine AI with a FAQ bot: exact answers for known questions, AI for everything else