This workflow corresponds to n8n.io template #4275 — we link there as the canonical source.
This workflow follows the HTTP Request → Telegram 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 →
{
"nodes": [
{
"id": "0db7b2f0-dfb2-4c92-98c8-d5eb27ca54f3",
"name": "Telegram Bot Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-280,
380
],
"parameters": {},
"description": "Listens for incoming messages with images from a Telegram bot",
"typeVersion": 1.2
},
{
"id": "434d739e-54d7-4f75-955f-e1181ff23db8",
"name": "Workflow Start Documentation",
"type": "n8n-nodes-base.stickyNote",
"position": [
-380,
-20
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "dc5ddb08-76b8-4a1f-a2fb-315c64199157",
"name": "Workflow Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1000,
-220
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b4682f5b-4c6e-4ba0-a40b-c2851c64bfef",
"name": "OpenAI API Documentation",
"type": "n8n-nodes-base.stickyNote",
"position": [
60,
-240
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "a7266711-bee5-40a2-afc2-86affd226abc",
"name": "Conversion Documentation",
"type": "n8n-nodes-base.stickyNote",
"position": [
460,
-120
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "f651bd6f-dc2f-4d60-b896-2c860ef0673f",
"name": "Edit Image (OpenAI)",
"type": "n8n-nodes-base.httpRequest",
"position": [
160,
280
],
"parameters": {},
"description": "Sends image to OpenAI for AI-powered editing based on the caption",
"typeVersion": 4.2
},
{
"id": "8e50ff8a-6c4b-486e-9307-9624fc7ff274",
"name": "Convert to Binary Image",
"type": "n8n-nodes-base.convertToFile",
"position": [
580,
280
],
"parameters": {},
"description": "Converts base64 encoded image to binary format for sending",
"typeVersion": 1.1
},
{
"id": "e8096804-b5a7-4f2f-943b-e4a5db0929fb",
"name": "Send Edited Image",
"type": "n8n-nodes-base.telegram",
"position": [
880,
740
],
"parameters": {},
"description": "Sends the edited image back to the user via Telegram",
"typeVersion": 1.2
},
{
"id": "d33a7637-4046-40a9-90e6-6d8b8fc2f4b6",
"name": "Replicate Documentation",
"type": "n8n-nodes-base.stickyNote",
"position": [
1460,
120
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "d0894342-ab6a-473c-9ad0-667987801a9f",
"name": "Wait Node Documentation",
"type": "n8n-nodes-base.stickyNote",
"position": [
2000,
180
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "5f0417a3-7682-481c-b642-c2b45142839e",
"name": "File Retrieval Documentation",
"type": "n8n-nodes-base.stickyNote",
"position": [
1100,
-40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "906ba4d2-445c-477f-8732-be7e9d828ba0",
"name": "Generate Variation (Replicate)",
"type": "n8n-nodes-base.httpRequest",
"position": [
1620,
640
],
"parameters": {},
"description": "Sends the original image to Replicate for AI-powered variation",
"typeVersion": 4.2
},
{
"id": "ab244f36-31e3-4dea-9c8e-e4935335810a",
"name": "Retrieve Generated Image",
"type": "n8n-nodes-base.httpRequest",
"position": [
2540,
840
],
"parameters": {},
"description": "Gets the final generated image from Replicate after processing",
"typeVersion": 4.2
},
{
"id": "fee42f2b-09d2-47f9-842a-52139e8c8de6",
"name": "Send Variation Image",
"type": "n8n-nodes-base.telegram",
"position": [
2740,
280
],
"parameters": {},
"description": "Sends the AI-generated variation back to the user",
"typeVersion": 1.2
},
{
"id": "93c43617-3c40-451f-b3b5-eb1d276db1ba",
"name": "Get File Path",
"type": "n8n-nodes-base.httpRequest",
"position": [
1220,
340
],
"parameters": {},
"description": "Retrieves the file path from Telegram's servers",
"typeVersion": 4.2
},
{
"id": "71391d58-693a-4c6e-9180-a7b5819bdd3f",
"name": "Wait for Processing",
"type": "n8n-nodes-base.wait",
"position": [
2080,
600
],
"parameters": {},
"description": "Waits for Replicate to complete the image generation (45 seconds)",
"typeVersion": 1.1
},
{
"id": "736f5bc9-3785-486d-a93a-d6e9cbd5e45b",
"name": "Setup Documentation",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1000,
380
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "2873e80c-d160-4bbc-88e7-89097adaa0bd",
"name": "Note: Send Replicate Output",
"type": "n8n-nodes-base.stickyNote",
"position": [
2640,
20
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "65e13c0b-cf11-4c15-8de4-a6633e621a43",
"name": "Note: Get Replicate Result",
"type": "n8n-nodes-base.stickyNote",
"position": [
2420,
580
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "d6f4bd9c-6016-45a1-9318-c37aa5786e34",
"name": "Note: Send Edited Image",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
500
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"connections": {
"Get File Path": {
"main": [
[
{
"node": "Generate Variation (Replicate)",
"type": "main",
"index": 0
}
]
]
},
"Send Edited Image": {
"main": [
[
{
"node": "Get File Path",
"type": "main",
"index": 0
}
]
]
},
"Edit Image (OpenAI)": {
"main": [
[
{
"node": "Convert to Binary Image",
"type": "main",
"index": 0
}
]
]
},
"Wait for Processing": {
"main": [
[
{
"node": "Retrieve Generated Image",
"type": "main",
"index": 0
}
]
]
},
"Telegram Bot Trigger": {
"main": [
[
{
"node": "Edit Image (OpenAI)",
"type": "main",
"index": 0
}
]
]
},
"Convert to Binary Image": {
"main": [
[
{
"node": "Send Edited Image",
"type": "main",
"index": 0
}
]
]
},
"Retrieve Generated Image": {
"main": [
[
{
"node": "Send Variation Image",
"type": "main",
"index": 0
}
]
]
},
"Generate Variation (Replicate)": {
"main": [
[
{
"node": "Wait for Processing",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Tutorial Video
Source: https://n8n.io/workflows/4275/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
N8N Complete Final. Uses telegramTrigger, dataTable, telegram, mqtt. Event-driven trigger; 58 nodes.
TextMain. Uses telegramTrigger, stopAndError, telegram, httpRequest. Event-driven trigger; 56 nodes.
Pede Ai. Uses httpRequest, telegram, postgres, telegramTrigger. Event-driven trigger; 53 nodes.
📄 Documentation: Notion Guide
Telegram Wait. Uses stickyNote, httpRequest, redis, noOp. Event-driven trigger; 36 nodes.