AutomationFlowsAI & RAG › Generate Custom Recipes and Restaurant-style Food Images with Telegram Bot

Generate Custom Recipes and Restaurant-style Food Images with Telegram Bot

ByMd Sabirul Islam @shishirislam80 on n8n.io

AI Chef Bot is a smart virtual chef built with n8n and Telegram. Users can ask for any dish, and the bot:

Event trigger★★★★☆ complexityAI-powered12 nodesOpenRouter ChatMemory Buffer WindowTelegram TriggerTelegramHTTP RequestAgent
AI & RAG Trigger: Event Nodes: 12 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #8221 — 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
{
  "id": "Qhd5ZE0WdsOiFQqj",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Chef",
  "tags": [],
  "nodes": [
    {
      "id": "525c226c-d024-4e37-8052-a2b3a0996bf1",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        48,
        240
      ],
      "parameters": {
        "model": "openai/gpt-4o-mini",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1bd83992-eb8c-4aea-8888-878cd67f8a50",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        208,
        240
      ],
      "parameters": {
        "sessionKey": "={{ $json.message.chat.id }}",
        "sessionIdType": "customKey",
        "contextWindowLength": 200
      },
      "typeVersion": 1.3
    },
    {
      "id": "77562a10-731c-4c6a-a938-5f61c8e74266",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "dfc79eec-88ac-4c6f-b189-4c07f782c0fa",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        512,
        0
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a09f687d-3943-4787-a19e-5163be6bdf75",
      "name": "Nano \ud83c\udf4c",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1056,
        0
      ],
      "parameters": {
        "url": "https://openrouter.ai/api/v1/chat/completions",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"google/gemini-2.5-flash-image-preview:free\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"Generate a photorealistic image of {{ $json.output }}\"\n        }\n      ]\n    }\n  ]\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer $OPENROUTER_API_KEY"
            }
          ]
        },
        "nodeCredentialType": "openRouterApi"
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a51cdb6b-d997-4f6a-a75a-12f6e249a680",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1248,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "6355ac9e-1f4c-42a3-8167-8bb8298cd369",
              "name": "data",
              "type": "string",
              "value": "={{ $json.choices[0].message.images[0].image_url.url }}"
            },
            {
              "id": "dc98bc1c-4048-4fcb-80c5-73dc99b78ddd",
              "name": "base",
              "type": "string",
              "value": "={{ $json.choices[0].message.images[0].image_url.url.split(',')[1] }}"
            },
            {
              "id": "8033a47e-f50c-43ae-b404-99d0fb5cf4eb",
              "name": "mime",
              "type": "string",
              "value": "={{ $json.choices[0].message.images[0].image_url.url.split(';')[0].split(':')[1] }}"
            },
            {
              "id": "0e516163-02cc-4242-ba70-ac2bce94d2dd",
              "name": "fileName",
              "type": "string",
              "value": ".png"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "bf15ba16-f228-4df1-a5f2-48dd3eceb2af",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1152,
        240
      ],
      "parameters": {
        "options": {},
        "operation": "toBinary",
        "sourceProperty": "base"
      },
      "typeVersion": 1.1
    },
    {
      "id": "0b449fab-316d-4379-88cc-5ff4136149e0",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        592,
        272
      ],
      "parameters": {
        "model": "openai/gpt-4o-mini",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d02178f2-962f-4dcd-978a-fffa8564ae1c",
      "name": "Send a photo message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1360,
        240
      ],
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "operation": "sendPhoto",
        "binaryData": true,
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "24ceeec0-77af-441b-b479-62a3608effd8",
      "name": "AI Recipe",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        208,
        0
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {
          "systemMessage": "You are a friendly and professional Virtual Chef Assistant. \nYour role is to help users with cooking, recipes, meal planning, food substitutions, nutrition tips, and step-by-step cooking guidance.  \n\nGuidelines:\n- Always reply in a clear, simple, and conversational tone.  \n- Suggest recipes based on available ingredients, dietary preferences, or cuisine styles.  \n- Provide step-by-step cooking instructions when asked.  \n- Offer ingredient substitutions if something is missing.  \n- Give nutrition advice when relevant, but do not provide medical advice.  \n- Be creative, encouraging, and make cooking feel fun and easy.  \n- If the user asks for meal plans, suggest balanced options (breakfast, lunch, dinner, snacks).  \n- If the user asks general questions about food or cooking techniques, explain in an easy-to-understand way.  \n- Do not provide unsafe cooking practices or harmful instructions.  \n\nYour personality:\n- Warm, supportive, and encouraging like a personal chef.  \n- Use a mix of professional cooking knowledge and friendly conversation.  \n- Adapt tone depending on user: beginner = simple steps, experienced = more advanced techniques."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "9d5b6784-261d-41a7-8f51-87298625ec2e",
      "name": "Restaurant-Style Plating prompt",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        688,
        0
      ],
      "parameters": {
        "text": "={{ $('AI Recipe').item.json.output }}",
        "options": {
          "systemMessage": "You are an expert AI prompt generator for text-to-image models. \nYour task is to read the recipe text provided and generate a single, clear, and detailed prompt suitable for a photorealistic image generation AI. \nDo not explain the recipe, do not add extra commentary, and do not output anything else except the image prompt. \n\nFocus only on visual details:\n- How the dish looks on a plate\n- Plating style and arrangement\n- Colors, textures, garnishes\n- Lighting and perspective\n- Use only plates and dishware typically found in professional restaurants (white ceramic, slate, glass, or elegant serving dishes)\n- Make it look like a high-end restaurant presentation\n\nThe output should be concise, a single paragraph of text, fully descriptive, ready to feed directly into an image generation model and output should be in English."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "3a28861d-d7cb-490a-b8a5-aa48c0846a43",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -272
      ],
      "parameters": {
        "width": 496,
        "height": 464,
        "content": "## AI Chef Bot \u2013 Recipe + Food Image Generator \nImport this workflow into your n8n instance.\n\nConfigure your Telegram Bot Token (from BotFather).\n\nConfigure your OpenRouter API Key for AI text + image generation.\n\nSave and activate the workflow.\n\nGo to Telegram and send any dish name (e.g., Polpette di pesce).\n\nThe bot replies with:\n\n\ud83d\udcd6 A full recipe.\n\n\ud83d\udcf8 A restaurant-plated realistic food image."
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4c3ecc19-e40d-4dfd-ba47-4c66aaade24e",
  "connections": {
    "AI Recipe": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nano \ud83c\udf4c": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Send a photo message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Recipe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a text message": {
      "main": [
        [
          {
            "node": "Restaurant-Style Plating prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Recipe",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Recipe",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Restaurant-Style Plating prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Restaurant-Style Plating prompt": {
      "main": [
        [
          {
            "node": "Nano \ud83c\udf4c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

AI Chef Bot is a smart virtual chef built with n8n and Telegram. Users can ask for any dish, and the bot:

Source: https://n8n.io/workflows/8221/ — 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

AI-powered Telegram bot for effortless expense tracking. Send receipts, voice messages, or text - the bot automatically extracts and categorizes your expenses. 📸 Receipt & Invoice OCR - Send photos of

Telegram Trigger, Mcp Client Tool, Tool Calculator +7
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Output Parser Structured, Telegram, N8N Nodes Tesseractjs +14
AI & RAG

This is a Telegram AI-to-Human Handover System that seamlessly transitions customer support conversations between an AI agent and human operators: AI-First Response: When users message the Telegram bo

Telegram Trigger, Telegram, Email Send +7
AI & RAG

This workflow automates the process of recording financial transactions from photos of receipts or shopping receipts. Users simply send an image of the receipt via Telegram. The image is processed usi

Telegram Trigger, HTTP Request, Chain Llm +7
AI & RAG

This workflow creates an AI-powered Telegram bot that allows users to generate and modify images using Grok Imagine models via the Kie AI API.

OpenRouter Chat, Telegram Trigger, Telegram +7