Published 10 days ago
This template provides a structured way to build Telegram bots that respond to specific commands and handle user input. It allows users to interact with your bot by selecting options from a Telegram bot menu, without needing to type out full instructions or rely on conversational AI. This approach offers precise control and predictable behavior for command-driven interactions.
Key Features:
/command1
, /command2
, /command3
), and easily extensible to support additional commands.Switch
nodes to efficiently route execution based on both the initial command and the current conversation state.Telegram
nodes.No Operation, do nothing
) nodes where you can easily insert your own custom processing logic for each command.Why This Template is Unique:
n8n currently lacks a native, built-in mechanism for handling individual Telegram commands in a structured, non-conversational way. Many users resort to "AI Agent" nodes, which are designed for open-ended conversations. This template fills that gap by providing a framework for:
How to Use:
telegramStates
object in the workflow's static data. This is crucial for state management.NoOp
nodes (Command1 processing
, Command2 processing
, Command3 processing
) with your own nodes to handle the content received for each command. It is highly recommended to add input validation within your processing logic.Telegram Trigger
and Telegram
nodes with your bot's API token.Example Use Case:
This template is ideal for creating bots that require a command followed by specific input, such as: