🔹 Context

The client managed social media content for a small business and needed to switch between multiple apps to generate platform-sized images (Instagram, Facebook) while also handling day-to-day messaging with an AI assistant. Image requests and conversations were handled manually, with no single tool covering both. Image generation relied on separate design tools, resized manually for each platform.

🔹 Problem

🔹 Solution

Built a single Telegram bot that routes each message based on intent instead of requiring separate tools:

A single-bot, intent-routed approach was chosen over separate bots per platform to keep the user experience in one chat window and avoid duplicating logic across multiple bots.

🔹 Process

  1. Discovery — reviewed the required image formats/sizes per platform and the existing manual workflow
  2. Design — planned the routing logic to separate chat, Instagram, and Facebook image requests within one bot
  3. Build — Telegram Trigger + message preprocessing; Switch node for routing (start / insta / fb / fallback); OpenAI integration for both text responses and sized image generation; dedicated Telegram output nodes (text, photo, error handling)
  4. Testing — verified correct routing per keyword, correct image dimensions per platform, and error handling on failed generation
  5. Launch & optimization — deployed the bot and refined error messaging and fallback behavior based on real usage