Quick Start

Create your first automation in 5 minutes. By the end you'll have a Telegram bot that replies to every message.


Step 1: Create a Telegram Bot

You need a bot first. It takes 30 seconds:

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Choose a name (e.g. "My Fainflow Bot")
  4. Choose a username (e.g. "my_fainflow_bot")
  5. BotFather gives you a token — copy it

The token looks like this: 7845632109:AAH3kf8Jd9_xKmP2nQ7rT5wYz1uV0bCdE


Step 2: Add Connection in Fainflow

  1. Go to your Fainflow dashboard
  2. Click Connections in the menu
  3. Click + New Connection
  4. Select Telegram Bot
  5. Paste the token from BotFather
  6. Click Save

New Connection


Step 3: Create a Flow

  1. Click Flows in the menu — you'll see your flows list:

Flows

4 flows

NameStatusActionsConnection
Echo BotOn
My Bot
AI AssistantOn
My Bot
Webhook HandlerOff
API Trigger
Auto ForwarderOn
Assistant
  1. Click + New Flow
  2. You're now in the Flow Editor

Step 4: Set Up the Event

The event is what triggers your flow.

  1. Click the event area (left side of the editor)
  2. Select Telegram Bot → Bot Update
  3. This means: "run this flow when someone sends a message to my bot"

Step 5: Add a Reply Action

Now add what happens when someone messages your bot.

  1. Click Add app action
  2. Select Telegram Bot → Send Message
  3. You'll see the Send Message card with input fields

Now connect the data:

  • Drag the green userID badge from the Event → drop it on the chatId field
  • Drag the green message badge → drop it on the text field

The flow editor will look like this:

AI Assistant
Flow isON

Event

Bot Update

message
userID
date
RAW

Action

Send Prompt

model: gpt-4
input: ← message

Action

Send Message

chatId: ← userID
text: ← responseText
Add action
or function

Step 6: Save and Enable

  1. Click Save (top right)
  2. Toggle the switch from OFF to ON

Step 7: Test It!

  1. Open Telegram
  2. Find your bot (search for the username you chose)
  3. Send any message
  4. The bot replies with your message!

What Just Happened?

  1. You sent "Hello" to the bot
  2. Telegram sent the message to Fainflow (via webhook)
  3. The Bot Update event fired with message = "Hello" and userID = your_id
  4. The Send Message action sent "Hello" back to your_id
  5. You see the reply in Telegram

Next: Add AI

Want your bot to reply with AI? Just add one more block:

AI Chat Bot

Bot responds using OpenAI GPT

Telegram Bot

Bot Update

message
userID

OpenAI

Send Prompt

model
gpt-4
instructions
You are a helpful assistant
input
message
responseText

Telegram Bot

Send Message

chatId
userID
text
responseText

The OpenAI block takes the user's message, sends it to GPT, and the response goes back to the user.


Next Steps