AutomationFlowsAI & RAG › AI Text-to-image for Telegram (gemini + Hugging Face Flux)

AI Text-to-image for Telegram (gemini + Hugging Face Flux)

ByMalik Hashir @malikx on n8n.io

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

Event trigger★★★★☆ complexityAI-powered9 nodesTelegram TriggerAgentGoogle Gemini ChatTelegramHTTP Request
AI & RAG Trigger: Event Nodes: 9 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5031 — we link there as the canonical source.

This workflow follows the Agent → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c81aef50-92fc-461e-9dae-45fb936f1fb6",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -460,
        -220
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "c753e481-79f5-4171-a7db-895c423154a2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -180,
        -220
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "2fda98bd-bc78-45dd-ad82-047904965df1",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -80,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f69e1aee-4bce-4eaf-afce-0dcff517e779",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1060,
        -180
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f0fc7c0c-609b-4714-be3e-40423a1a5e9f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        -500
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6031ea65-9875-4c7c-ac8c-812546c0bd08",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "435da6ad-401f-4912-b943-4d93722e696e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        -700
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "fcccddcb-6af2-4a88-99c6-c43077527d2f",
      "name": "HTTP Request (Huggingface)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        540,
        -180
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "15aab548-038b-4349-9233-4c7ed03ea843",
      "name": "HTTP Request(download_image)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        840,
        -180
      ],
      "parameters": {},
      "typeVersion": 4.2
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "HTTP Request (Huggingface)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Huggingface)": {
      "main": [
        [
          {
            "node": "HTTP Request(download_image)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request(download_image)": {
      "main": [
        [
          {
            "node": "Send Image (back to the chat via telegram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

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

Source: https://n8n.io/workflows/5031/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow creates a multi-talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perform various tasks.

MongoDB, Chain Llm, Google Gemini Chat +11
AI & RAG

This project is a template for building a complete academic virtual assistant using n8n. It connects to Telegram, answers frequently asked questions by querying MongoDB, keeps the community informed a

Telegram, MongoDB, Telegram Trigger +6
AI & RAG

Creators, marketers, and brands that want to turn a single product photo into premium motion clips, then optionally publish to Instagram/TikTok/YouTube via LATE. No editing skills required.

Telegram, Agent Tool, Telegram Trigger +5
AI & RAG

Product to Social Video (xCodeWraith Edition). Uses telegram, agentTool, telegramTrigger, httpRequest. Event-driven trigger; 83 nodes.

Telegram, Agent Tool, Telegram Trigger +5
AI & RAG

Transform your salon/service business with this streamlined Telegram automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I

Redis, Agent Tool, Google Calendar +10