Generate AI images via Telegram with WaveSpeed, credit system, PIX and S3
UnknownUnknown. This template uses community nodes we can't verify statically. Uses community nodes that can't be verified statically (unverified community packages are off by default in 3.0). Static check, last run 2026-10-19.
Community nodes
These come from third-party npm packages. In n8n 3.0 unverified community packages are off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
n8n-nodes-wavespeed(WaveSpeed text-to-image submit, editImageOnReply)n8n-nodes-wavespeed(checkTaskGenerate)
Nodes used (14)
- Wave Speed Task Submit
n8n-nodes-wavespeed.waveSpeedTaskSubmit - Telegram
n8n-nodes-base.telegram - Data table
n8n-nodes-base.dataTable - Switch
n8n-nodes-base.switch - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - S3
n8n-nodes-base.s3 - If
n8n-nodes-base.if - Webhook
n8n-nodes-base.webhook - Convert to File
n8n-nodes-base.convertToFile - Wait
n8n-nodes-base.wait - Wavespeed Task Status
n8n-nodes-wavespeed.wavespeedTaskStatus - Edit Image
n8n-nodes-base.editImage - Telegram Trigger
n8n-nodes-base.telegramTrigger
What it does
π€ Generate images via Telegram using an AI bot with a credit system and S3 storage A complete, production-ready Telegram bot for AI-powered image generation and editing, featuring a built-in credit system, payment integration, and cloud storage. --- β¨ Features π¨ AI Image Generation - Text-to-Image: Generate stunning images from text prompts using the Nano Banana Pro Ultra model via WaveSpeed API - Image-to-Image Editing: Edit existing images by sending a photo with a caption describing the desired changes - Multiple Resolutions: Support for both 4K and 8K output quality - Flexible Aspect Ratios: Choose from 10 different aspect ratios (1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9) π³ Credit Management System - Per-generation billing: Different costs for 4K vs 8K resolution - Balance tracking: Real-time credit balance displayed to users - Initial credits: New users receive starter credits automatically - Insufficient balance handling: Graceful messages when credits run out Here's the adjusted payment section: --- π° Payment Integration (Mercado Pago PIX) > About PIX: PIX is Brazil's instant payment system, launched by the Central Bank of Brazil in 2020. It allows instant money transfers 24/7, 365 days a year, using QR codes or copy-paste codes. It has become the most popular payment method in Brazil due to its speed and zero fees for individuals. This workflow includes a fully integrated PIX payment flow as a reference implementation. You can adapt it to your local payment provider. Features: - Multiple deposit options: Pre-configured credit packages (R$ 3, R$ 6, R$ 10) - QR Code generation: Automatic PIX QR code sent directly to users via Telegram - Copy-paste code: PIX code provided for manual payment - Webhook confirmation: Real-time payment status updates via Mercado Pago webhooks - Auto credit top-up: Credits added automatically upon payment approval - Payment status handling: Supports approved, pending, and rejected states > π‘ Tip: To adapt this for other regions, replace the Mercado Pago nodes with your preferred payment gateway (Stripe, PayPal, etc.) while keeping the same credit update logic. --- βοΈ User Configuration - Resolution settings: Users can set their preferred default resolution - Aspect ratio preferences: Save preferred aspect ratio for future generations - Custom default prompts: Set a default prompt that's automatically appended to all generations - Persistent settings: All preferences stored in n8n Data Tables π¦ Cloud Storage (S3/MinIO) - Automatic upload: Generated images are automatically uploaded to S3-compatible storage - Persistent URLs: Images remain accessible via permanent links - Edit from storage: Reference previously uploaded images for editing --- π οΈ Tech Stack | Component | Technology | |-----------|------------| | Bot Platform | Telegram Bot API | | AI Generation | WaveSpeed API (Nano Banana Pro) | | Storage | S3-compatible (MinIO/AWS S3) | | Database | n8n Data Tables | | Payments | Mercado Pago PIX | | Automation | n8n | --- π Prerequisites Before using this workflow, you'll need: 1. Telegram Bot Token - Create a bot via @BotFather 2. WaveSpeed API Key - Sign up at WaveSpeed 3. S3-compatible Storage - MinIO, AWS S3, or any S3-compatible service 4. Mercado Pago Account (optional) - For payment integration 5. n8n Data Table - Create a table with the required schema --- π Data Table Schema Create a Data Table with the following columns: | Column | Type | Description | |--------|------|-------------| | chatid | String | Telegram chat ID (primary key) | | username | String | Telegram username | | status | String | Current user state in the flow | | credits | String | User's credit balance | | resolution | String | Preferred resolution (4k/8k) | | aspectratio | String | Preferred aspect ratio | | userdefaultprompt | String | Custom default prompt | | numberimages | Number | Total images generated | | numbervideos | Number | Total videos generated | | demosended | Boolean | Wel