This is a base template for anyone trying to develop a telegram AI Agent. This base allows for multiple inputs (Voice, Picture, Video, and Text inputs) to be processed by an AI model of their choosing to a get a User started. From here, the User may connect any tools that they see fit to the AI Agent for their n8n workflows.
Input: Telegram message to a bot chat
n8n Processing: Switch node determines the type:
(Currently uses OpenAI and Gemini to analyze Voice/Photo/Video content but feel free to change these nodes with other models)
AI Agent Proccessing: LLM of your choosing examines message and based on system prompt, generates an output
Output: AI Output is sent back in telegram Message
Create your chat bot and generate access token
-> Search Bot father in telegram
-> Type "/newbot"
-> follow instructions and create access token
-> Copy access token
Create Credentials in n8n
-> Open telegram trigger node
-> Click create credential
-> Paste access token
-> Save
Create LLM access token
(Different per LLM but search your LLM + API in google)
-> (will have to create an account with the LLM platform)
-> buy credits to use LLM API
-> Generate Access token
-> Paste token in LLM node