Skip to content

avaluev/telegram_issue_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Telegram Issue Bot πŸ€–

A dead-simple Telegram bot to capture issues, feature requests, and feedback from your users, with automatic integration to Asana for issue tracking.


πŸ‘‹ New to Coding?

No technical experience? No problem!

πŸ“– Start here: GETTING_STARTED.md

This beginner's guide walks you through every single step with:

  • βœ… Plain English explanations (no jargon!)
  • βœ… Exactly what to click and type
  • βœ… Screenshots of what you'll see
  • βœ… Solutions to common problems
  • βœ… Complete in ~30 minutes

TL;DR: Just run ./setup.sh and answer the questions. That's it!


✨ Features

  • Chat-Only Interface: No complex web apps or forms - just chat naturally
  • Screenshot Support: Copy/paste screenshots directly in the chat (Ctrl+V / Cmd+V)
  • Smart Metadata Detection: Automatically extracts environment, version, page, A/B variant, and platform from messages
  • Asana Integration: Creates organized tasks in your Asana project
  • Reporter Tracking: Tracks who reported each issue with Telegram username
  • Message Links: Direct links to original Telegram messages for easy follow-up
  • Issue Type Detection: Automatically categorizes issues (bug, feature, question, etc.)

πŸš€ Quick Start

Automated Setup (Recommended - 5 minutes)

# Run the complete setup wizard
./setup.sh

This interactive wizard handles everything:

  • βœ… Checks prerequisites
  • βœ… Installs dependencies
  • βœ… Collects credentials
  • βœ… Deploys to Vercel
  • βœ… Configures webhook
  • βœ… Tests your bot

Manual Deploy (3 minutes)

# Install Vercel CLI
npm install -g vercel

# Deploy to Vercel (FREE)
vercel --prod

# Or use the automated deploy script
./deploy.sh

Local Development

# Run bot locally for testing
./local-dev.sh

Guides:

πŸ“ How It Works

Users can report issues naturally in Telegram:

"Bug on prod /checkout: payment button doesn't work"

The bot automatically:

  • Creates an Asana task
  • Extracts metadata (environment: production, page: /checkout)
  • Tracks the reporter (@username)
  • Includes a direct link to the Telegram message
  • Categorizes it as a bug

πŸ”§ Setup

1. Get Your Credentials

Telegram Bot Token:

  1. Message @BotFather on Telegram
  2. Send /newbot and follow instructions
  3. Save the bot token

Asana Credentials:

  1. Go to Asana Developer Console
  2. Create a Personal Access Token
  3. Note your Workspace ID and Project ID

2. Configure Environment Variables

In Vercel Dashboard β†’ Settings β†’ Environment Variables:

TELEGRAM_BOT_TOKEN=your_bot_token
ASANA_ACCESS_TOKEN=your_asana_token
ASANA_PROJECT_ID=your_project_id
ASANA_WORKSPACE_ID=your_workspace_id

3. Set Webhook

After deploying, set the Telegram webhook:

curl "https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook?url=<YOUR_VERCEL_URL>/api/webhook"

That's it! Your bot is live πŸŽ‰

πŸ“– Usage Examples

Report a Bug

Bug on staging v2.1.3: upload fails on iOS

β†’ Creates task with environment: staging, version: 2.1.3, platform: iOS

Request a Feature

Feature request: add dark mode for mobile app

β†’ Creates feature request task with platform: mobile

Send Screenshot

Just paste or send an image with a caption:

[Screenshot]
Login page broken on /auth

β†’ Creates task with screenshot and page: /auth

Ask a Question

How do I export data from the dashboard?

β†’ Creates question-type task

πŸ“ Project Structure

telegram_issue_bot/
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ webhook.ts           # Main bot logic (Vercel serverless)
β”‚   β”œβ”€β”€ health.ts            # Health check endpoint
β”‚   └── form-config.ts       # Form config endpoint (legacy)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ asana/
β”‚   β”‚   └── client.ts        # Asana API integration
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── env.ts           # Environment configuration
β”‚   β”œβ”€β”€ types/
β”‚   β”‚   └── index.ts         # TypeScript types
β”‚   └── utils/
β”‚       └── metadata-extractor.ts  # Smart metadata detection
β”œβ”€β”€ vercel.json              # Vercel configuration
β”œβ”€β”€ package.json
└── tsconfig.json

πŸ› οΈ Setup Scripts

Script Purpose
./setup.sh Complete setup wizard - runs everything automatically
./deploy.sh Deploy to Vercel with options (first-time, quick, production)
./local-dev.sh Run bot locally for development (with auto-reload)
./setup-telegram.sh Manage Telegram webhook (set, check, delete, test)
./deploy-simple.sh Ultra-quick Vercel deploy (already configured)

See QUICKSTART.md for detailed script documentation.

🎯 Bot Commands

  • /start - Welcome message
  • /help - Show help information

That's it! The bot works by simply sending messages - no commands needed.

πŸ” Metadata Auto-Detection

The bot intelligently extracts context from natural language:

  • Environment: prod, production, staging, stage, dev, development
  • Version: v1.2.3, version 2.0, etc.
  • Page/URL: /checkout, /dashboard, full URLs
  • A/B Variant: variant-A, control, exp-123
  • Platform: iOS, Android, mobile, desktop, mobile-web

πŸš€ Deployment

Vercel (Recommended - FREE)

  • Serverless architecture
  • Auto-scaling
  • Global CDN
  • Zero maintenance

See SIMPLE_DEPLOY.md for step-by-step instructions.

πŸ”’ Security

  • All credentials stored as environment variables
  • Never commit .env files
  • HTTPS enforced by Vercel
  • Input validation on all user data

πŸ“š Documentation

For Beginners πŸ‘Ά

For Developers πŸ‘¨β€πŸ’»

🀝 Support

For issues or questions, check:

  1. The deployment guides above
  2. Vercel deployment logs
  3. Telegram webhook status

πŸ“„ License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors