Skip to main content

AI text-to-image for Telegram (Gemini + Hugging Face FLUX)

Workflow preview

Workflow preview
100%
AI text-to-image for Telegram (Gemini + Hugging Face FLUX) preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Turn text prompts into stunning AI generated images—automatically! What it does? This workflow lets your Telegram bot: 1. Receive a user’s image description (e.g., "a cyberpunk cat wearing sunglass...

Best for

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

Tools used

n8n-nodes-base.telegramtrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.telegram, n8n-nodes-base.stickynote, n8n-nodes-base.httprequest

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
AI text-to-image for Telegram (Gemini + Hugging Face FLUX)
Workflow name
AI text-to-image for Telegram (Gemini + Hugging Face FLUX)

Turn text prompts into stunning AI-generated images—automatically!

What it does?

This workflow lets your Telegram bot:

  1. Receive a user’s image description (e.g., "a cyberpunk cat wearing sunglasses").
  2. Refine the prompt using AI (Gemini/OpenAI) for better results.
  3. Generate the image via Hugging Face’s free API (no costs!).
  4. Send the final image back to the user—all in seconds!

How It Works?

  • Telegram Trigger Listens for user messages (e.g., “/image a futuristic cityscape”).

  • AI Prompt Refinement Uses Google Gemini (or OpenAI) to optimize the input for the image model.

  • AI Image Generation Calls Hugging Face’s Together API (free tier) to create the image. Supports models like black-forest-labs/FLUX.1-schnell.

  • Auto-Delivery Downloads the image and sends it in the Telegram chat.

Setup Guide (3 Minutes!)

1. Prerequisites

  • An n8n instance (cloud/self-hosted).
  • A Telegram bot token (get it from @BotFather).
  • A Hugging Face API token (free: https://huggingface.co/).

2. Installation

  • Import the JSON template into n8n.
  • Replace placeholders:
  • Telegram API token (in the Telegram nodes).
  • Hugging Face API token (in the HTTP Request node).

(Optional) Swap Gemini for OpenAI if preferred.

3. Done!

Activate the workflow—your bot is now ready to create stunning images! Simply send a command like: “Hey, generate an image of a warrior standing on top of a mountain.”

You can keep your prompt casual or get as detailed as you like. The AI will interpret your request and craft a full, descriptive prompt for image generation. For example: “Generate an image of a warrior wearing tattered clothes, chest out, standing on a snowy mountain.”

Why Use This Template?

  1. 100% Free – Uses Hugging Face’s free tier (no OpenAI costs).
  2. No Coding – Fully visual n8n workflow.
  3. Customizable – Swap AI models (Gemini/OpenAI) or image APIs.
  4. Instant Results – Users get images in seconds.

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 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 3 - Google Gemini Chat Model

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

Block 4 - Telegram

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

Block 5 - Sticky Note

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

Block 6 - Sticky Note1

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

Block 7 - Sticky Note2

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

Block 8 - HTTP Request (Huggingface)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - HTTP Request(download_image)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

3. Summary Table

Workflow AI text-to-image for Telegram (Gemini + Hugging Face FLUX)
Complexity intermediate
Nodes 9
Categories Content Creation, Multimodal AI
Author Malik Hashir
Published 18 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5031/5031.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 AI text-to-image for Telegram (Gemini + Hugging Face FLUX) do?

Turn text prompts into stunning AI generated images—automatically! What it does? This workflow lets your Telegram bot: 1. Receive a user’s image description (e.g., "a cyberpunk cat wearing sunglass...

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.