Updated 2026-11-23

Build a Telegram bot with AI: alerts, AI chat and more (2026)

Telegram bots are one of the easiest first bots: you create one by messaging @BotFather, the Bot API is free, and an AI coding tool can write the whole bot in Python (python-telegram-bot) or TypeScript (grammY). Your main costs are hosting and any AI or data API you call.

Crypto price-alert bot (Python)

Example idea: โ€œA Telegram bot that sends me crypto price alertsโ€ ยท Share this stack โ†’ ยท Remix it in the matchmaker โ†’

RolePickWhyPriceAlternatives
AI coding toolCursorAI-first code editor. Best all-round pick for writing and fixing real code with AI.Free tier; Plus $8/mo (Grok models only); Premium $30/mo (third-party models billed at API list price)Replit, Claude Code
Bot librarypython-telegram-botThe most popular Python library for Telegram bots: async, well documented, handles commands and alerts.Free, open source; the Telegram Bot API itself is freegrammY
Backend / bot hostingRailwayDeploy any backend, bot, worker or database from GitHub in minutes. Ideal for always-on Discord bots and APIs.Free $0 plan for small apps; Hobby $5/mo minimum (includes $5 usage); Pro $20/mo minimumReplit, DigitalOcean
Data source / APICoinGecko APICrypto prices and market data for 20,000+ coins. The free Demo plan covers a personal price-alert bot.Free Demo plan: 10,000 calls/mo, 100 calls/min, attribution required (plus a keyless public API); Basic $35/mo ($29 billed yearly)โ€“

Estimated cost: about $5/mo to start, about $85/mo as you grow.

  1. Message @BotFather on Telegram to create the bot and copy its token.
  2. In Cursor, ask for a minimal python-telegram-bot bot with one slash command (e.g. /ping), run it locally.
  3. Add an /alert command (e.g. /alert btc below 60000) and poll CoinGecko's free Demo API every few minutes; the 10,000 calls/month cap covers about one call every 5 minutes, so batch all coins into one request (the free plan asks you to credit CoinGecko).
  4. Deploy to Railway from GitHub, keeping the token in environment variables.
  5. Share it with a few friends or a Telegram group and collect feedback before adding features.

AI chat bot (TypeScript)

Example idea: โ€œA Telegram bot in TypeScript that answers questions with AIโ€ ยท Share this stack โ†’ ยท Remix it in the matchmaker โ†’

RolePickWhyPriceAlternatives
AI coding toolCursorAI-first code editor. Best all-round pick for writing and fixing real code with AI.Free tier; Plus $8/mo (Grok models only); Premium $30/mo (third-party models billed at API list price)Claude Code, Replit
Bot librarygrammYModern TypeScript/JavaScript framework for Telegram bots with a big plugin ecosystem (menus, conversations, rate limits).Free, open source (MIT); the Telegram Bot API itself is freepython-telegram-bot
Backend / bot hostingRailwayDeploy any backend, bot, worker or database from GitHub in minutes. Ideal for always-on Discord bots and APIs.Free $0 plan for small apps; Hobby $5/mo minimum (includes $5 usage); Pro $20/mo minimumReplit, DigitalOcean
AI model APIOpenAI APIGPT models for chat, tool-calling agents, embeddings and vision.Pay per use: GPT-6 Luna $0.10/$0.50, GPT-6.2 Sol $2/$10, GPT-6.2 Astra $8/$40 per 1M input/output tokens; small apps often cost a few $/moClaude API (Anthropic), OpenRouter

Estimated cost: about $6/mo to start, about $70/mo as you grow.

  1. Message @BotFather on Telegram to create the bot and copy its token.
  2. In Cursor, ask for a minimal grammY bot with one slash command (e.g. /ping), run it locally.
  3. Wire the bot's command to OpenAI API so it can answer or summarise.
  4. Deploy to Railway from GitHub, keeping the token in environment variables.
  5. Share it with a few friends or a Telegram group and collect feedback before adding features.

FAQ

Is it free to make a Telegram bot?

Yes. Creating a bot with @BotFather and using the Telegram Bot API is free, and python-telegram-bot and grammY are free, open-source libraries. You pay for hosting and any paid APIs.

python-telegram-bot or grammY?

python-telegram-bot if you (or your AI tool) work in Python; grammY if you prefer TypeScript/JavaScript (it runs on Node.js and Deno). Both handle commands, keyboards and webhooks.

Where do I get crypto prices for a bot?

CoinGecko's API: Free Demo plan: 10,000 calls/mo, 100 calls/min, attribution required (plus a keyless public API); Basic $35/mo ($29 billed yearly). Batch all your coins into one request so a free plan lasts the month.

How do I keep the bot token safe?

Treat it like a password: keep it in an environment variable on your host, never in code you share, and revoke it with @BotFather if it leaks.

Sources

Checked 2026-11-23. Features in beta can change; confirm on the official page.

Email me this stack + starter plan

Email isn't live yet. Signing up here only saves to this browser; nothing is sent.

Have a different idea?

Describe it in one sentence and BuildLobby will build a custom stack and starter plan. Free, no signup.

More guides: Best AI tools for making a game ยท Best tools to build an AI agent ยท Best AI stack for building a SaaS ยท Best AI tools to build a mobile app ยท Best AI website builders and tools ยท The free AI stack: build and launch for $0 ยท Build an AI phone receptionist or voice agent ยท Set up an AI code review bot for GitHub pull requests ยท What should I build first with AI? 3 beginner projects ยท Build a Chrome extension with AI: tools, plan and store pitfalls ยท Add an AI chatbot to a small-business website ยท Build a Shopify app (or theme) with AI ยท Build a small-business website with online booking

Other guides: How to make a Roblox game with AI ยท The AI game jam stack: ship a game in a weekend ยท Build a Fortnite island in UEFN with AI ยท Make an indie game in Godot with AI ยท AI tools for game art and sound effects ยท Build a Discord bot for your gaming community with AI ยท Godot vs Unity vs GDevelop: which game engine to use with AI? ยท Vibe code a browser game with AI: Base44, Rosebud or Spawn? ยท Make a VR game for Meta Quest with AI ยท Compare AI coding tools