Skip to main content

Edit images with text prompts using Gemini AI and Telegram Bot

Workflow preview

Workflow preview
100%
Edit images with text prompts using Gemini AI and Telegram Bot preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Transform your Telegram chats into a creative powerhouse with this AI driven image editing bot. Send an image document with a descriptive caption, and watch it get intelligently edited in seconds—n...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.filter, n8n-nodes-base.stickynote, n8n-nodes-base.telegram, @n8n/n8n-nodes-langchain.googlegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Daniel Nkencho.

Original n8n.io source

1.1 Workflow description

Title
Edit images with text prompts using Gemini AI and Telegram Bot
Workflow name
Edit images with text prompts using Gemini AI and Telegram Bot

Transform your Telegram chats into a creative powerhouse with this AI-driven image editing bot. Send an image document with a descriptive caption, and watch it get intelligently edited in seconds—no design skills required!

📋 What This Template Does

This workflow powers a Telegram bot that automatically processes incoming image documents with text prompts. It downloads the file, uses Google Gemini AI to edit the image based on your caption, and instantly replies with the enhanced version.

  • Triggers on new messages containing documents and captions
  • Securely downloads and validates files before AI processing
  • Leverages Gemini for precise, prompt-based image edits
  • Sends the polished result back to the chat seamlessly

🔧 Prerequisites

  • A Telegram bot created via @BotFather
  • Google AI Studio account for Gemini API access
  • n8n instance with Telegram and Google Gemini nodes enabled

🔑 Required Credentials

Telegram API Setup

  1. Open Telegram and message @BotFather
  2. Use /newbot to create your bot and note the token
  3. In n8n, go to Credentials → Add Credential → Search "Telegram API"
  4. Paste the token and save as "Telegram Bot"

Google Gemini API Setup

  1. Visit aistudio.google.com and sign in with Google
  2. Click "Get API key" → Create API key in a new project
  3. In n8n, go to Credentials → Add Credential → Search "Google Gemini API"
  4. Enter the API key and save as "Gemini API"

⚙️ Configuration Steps

  1. Import the provided JSON into your n8n workflows
  2. Assign the Telegram Bot credential to the trigger and Telegram nodes
  3. Assign the Gemini API credential to the Edit Image node
  4. Activate the workflow and note your bot's username
  5. Test by sending an image document with a caption like "add a sunset background" to your bot

🎯 Use Cases

  • Personal creativity boost: Send a selfie with "make me a superhero" for fun edits during downtime
  • Social media content: Upload product photos with "enhance lighting and add text overlay" for quick marketing visuals
  • Educational sketches: Share drawings with "colorize and detail" to turn student ideas into professional illustrations
  • Team collaboration: In group chats, prompt "remove background" for instant design feedback loops

⚠️ Troubleshooting

  • Bot not responding: Verify token in credentials and ensure "message" updates are enabled in the trigger
  • File download fails: Check if the sent file is a document/image; Telegram expires links after 1 hour—resend if needed
  • AI edit errors: Confirm Gemini API key quotas; shorten prompts if over 100 words for better results
  • No edited image sent: Inspect execution log for binary data flow; ensure "binaryData" is toggled on in send node

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 2 - Filter: Has Caption and File

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 3 - Note: Filter

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Download Image

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 5 - Note: Download Image

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Edit Image with AI

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

Block 7 - Note: Edit AI

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Send Edited Image

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 9 - Overview Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Note: Trigger1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Edit images with text prompts using Gemini AI and Telegram Bot
Complexity intermediate
Nodes 10
Categories Content Creation, Multimodal AI
Author Daniel Nkencho
Published 26 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8998/8998.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Edit images with text prompts using Gemini AI and Telegram Bot do?

Transform your Telegram chats into a creative powerhouse with this AI driven image editing bot. Send an image document with a descriptive caption, and watch it get intelligently edited in seconds—n...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.