This workflow corresponds to n8n.io template #6635 — 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 →
{
"id": "ZIWg65Fq4Vr1rkBF",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Marketing Content Creating",
"tags": [],
"nodes": [
{
"id": "e790ce12-84f5-4a14-84b7-2cca94a2c2ce",
"name": "Trigger from Telegram",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-4272,
-368
],
"parameters": {
"updates": [
"*"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "3fdb47aa-c20d-4d64-ba2d-9e7004c6fdf4",
"name": "Extract Telegram Metadata",
"type": "n8n-nodes-base.set",
"position": [
-4016,
-368
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "516ee90b-f268-45a4-b445-3245fb0da83e",
"name": "photo_file_id",
"type": "string",
"value": "={{ $json.message.photo[3].file_id }}"
},
{
"id": "2008723e-9991-4e7a-b1d2-cbb4876adac8",
"name": "photo_caption",
"type": "string",
"value": "={{$json[\"message\"][\"caption\"] || \"No caption provided\"}}"
},
{
"id": "38ea22ee-878a-4d16-bad4-d178edde481e",
"name": "chat_id",
"type": "string",
"value": "={{$json[\"message\"][\"chat\"][\"id\"]}}"
},
{
"id": "9eb27912-af87-462f-a324-16ec084df841",
"name": "message_id",
"type": "string",
"value": "={{$json[\"message\"][\"message_id\"]}}"
},
{
"id": "f3f7a986-e9e1-45f0-ac79-44cda0dc32ec",
"name": "timestamp",
"type": "string",
"value": "={{new Date().toISOString()}}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "c634c46a-a9a9-4cd6-b161-fee6a2819f8e",
"name": "Get Telegram File Info",
"type": "n8n-nodes-base.httpRequest",
"position": [
-3824,
-368
],
"parameters": {
"url": "=https://api.telegram.org/{{TELEGRAM_BOT_TOKEN}}/getFile?file_id={{$json[\"photo_file_id\"]}}",
"options": {}
},
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "a7417e16-1a71-42ce-97c8-9ae7d1dc7535",
"name": "Build Telegram Image URL",
"type": "n8n-nodes-base.set",
"position": [
-3648,
-368
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "e84d0249-e55f-4099-9144-4c22598682db",
"name": "file_path",
"type": "string",
"value": "={{ $json.result.file_path }}"
},
{
"id": "9d23e1a9-80fe-45bb-a96f-7f7652237cf8",
"name": "download_url",
"type": "string",
"value": "=https://api.telegram.org/file/bot[YOUR_BOT_TOKEN]/{{$json[\"result\"][\"file_path\"]}}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d3d8a354-a650-4941-87e2-4755060b48a8",
"name": "Download Telegram Image",
"type": "n8n-nodes-base.httpRequest",
"position": [
-3440,
-368
],
"parameters": {
"url": "={{ $json.download_url }}",
"options": {
"response": {
"response": {
"responseFormat": "file",
"outputPropertyName": "=photo_data"
}
}
}
},
"typeVersion": 4.2
},
{
"id": "e1d82b9b-f1bf-40c6-8b3c-1d44c0bb12a7",
"name": "Generate Marketing Content",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-3248,
-368
],
"parameters": {
"text": "=You are the content creator for XQ Pharma\u2014a skincare brand dedicated to real, visible results for young, modern consumers in the Arab world.\n\nYour job is to write:\n\nA strong hook: A short, catchy sentence that starts with a real problem or clear benefit, instantly grabbing attention.\n\nConcise, convincing content: 3\u20135 sentences that explain the product or routine, what makes it different, and how it truly helps the customer (no complicated medical jargon, no exaggeration).\n\nA call-to-action (CTA): A direct, friendly invitation to try, buy, or start the routine.\n\nRequired Style & Tone:\n\nYouthful, conversational, and down-to-earth\u2014not formal or generic\n\nSpeak directly to the customer's needs and struggles\n\nFocus on how the product makes life easier, skin clearer, and confidence higher\n\nAvoid clich\u00e9s or over-the-top claims\u2014keep it real, keep it simple\n\nUse language and phrases that feel local, relatable, and fresh\n\nStructure:\n\nHook: One catchy line that starts with the customer\u2019s struggle or promises a real change\n\nBody: 3\u20135 sentences explaining the true benefit and role of the product or routine\u2014why XQ makes a difference\n\nCTA: End with a clear, friendly, motivating invitation to try, buy, or experience XQ\n\nBrand Example Tone:\n\n\u201cWake up to new breakouts every day? Leave them behind and start your XQ routine\u2014for calmer, clearer skin!\u201d\n\n\u201cOne wash\u2026 and real clarity that lasts.\u201d\n\n\u201cEvery product has a role. Every step gives you real comfort and confidence.\u201d\n\n\u201cTry XQ and see the difference for yourself!\u201d\n\nAlways write in clear, natural Arabic, true to XQ\u2019s brand voice.\nDon\u2019t recycle generic ad copy\u2014each post must feel new, real, and close to your audience.\nMatch the brand\u2019s look, feel, and promise in every line.\n\nOutput must be in this JSON format:\n{\n \"headline\": \"...\",\n \"content\": \"...\",\n \"hashtags\": [\"...\", \"...\"],\n \"cta\": \"...\"\n}\n\n\n",
"options": {},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "95fc665a-c98a-4ce6-9d77-63a6deba8c81",
"name": "Language Model (OpenRouter)",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
-3248,
-144
],
"parameters": {
"model": "google/gemini-2.5-flash-lite",
"options": {}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "18dd5c2e-f93b-48a8-8fc0-f2653f18411a",
"name": "Parse AI Output",
"type": "n8n-nodes-base.set",
"position": [
-2864,
-368
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "91323867-f4bf-4bcc-a696-6524795e082f",
"name": "headline",
"type": "string",
"value": "={{ JSON.parse($json[\"output\"].replace(/```json|```/g, \"\").trim()).headline }}\n"
},
{
"id": "33d44685-8463-4730-8bb4-c1f006f6a466",
"name": "content",
"type": "string",
"value": "={{ JSON.parse($json[\"output\"].replace(/```json|```/g, \"\").trim()).content }}\n"
},
{
"id": "915dec92-ad74-423a-a81e-30b027100eb1",
"name": "hashtags",
"type": "string",
"value": "={{ JSON.parse($json[\"output\"].replace(/```json|```/g, \"\").trim()).hashtags.join(\" \") }}\n"
},
{
"id": "5c7cbab9-8090-436e-962f-6626f6855393",
"name": "cta",
"type": "string",
"value": "={{ JSON.parse($json[\"output\"].replace(/```json|```/g, \"\").trim()).cta }}\n"
},
{
"id": "73d4fbf5-9f22-4ec7-b4e3-64a89b2c726a",
"name": "approval_id",
"type": "string",
"value": "=_{{Math.random().toString(36).substr(2, 9)}}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "b3a68c66-f304-434e-8050-b34be7ea93d8",
"name": "Approval Decision",
"type": "n8n-nodes-base.if",
"position": [
-1904,
-368
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "or",
"conditions": [
{
"id": "b86d09ef-20f0-40fa-be59-3a9900f20aa5",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": "="
},
{
"id": "03978ad9-213f-4aeb-809e-c9b6fa0e0324",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2,
"alwaysOutputData": false
},
{
"id": "b48b0d1c-b5af-474b-a334-f00a56e08a50",
"name": "Check if Message has Photo",
"type": "n8n-nodes-base.if",
"position": [
-3760,
48
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "a93c60b8-3ddf-4ab0-bfe7-34b922b08533",
"operator": {
"type": "boolean",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.message.photo }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "b560bb97-68b0-4eb8-8709-c65b7f8753de",
"name": "Prompt for User Input (Manual)",
"type": "n8n-nodes-base.telegram",
"position": [
-2048,
544
],
"parameters": {
"text": "What changes would you like ?",
"chatId": "={{ $('Extract Telegram Metadata').item.json.chat_id }} ",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "96cbf7cb-89a4-42bd-9107-0d6e88eee868",
"name": "Restart Workflow with User Text",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
-1840,
544
],
"parameters": {
"options": {},
"workflowId": {
"__rl": true,
"mode": "list",
"value": "{{REPLACE_WITH_SUB_WORKFLOW_ID}}",
"cachedResultName": "{{Sub Workflow Name}}"
},
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
}
},
"typeVersion": 1.2
},
{
"id": "246d08f7-d645-45cf-807a-b7d69d0689f9",
"name": "Restart Workflow Again",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
-1456,
80
],
"parameters": {
"options": {},
"workflowId": {
"__rl": true,
"mode": "list",
"value": "{{REPLACE_WITH_SUB_WORKFLOW_ID}}",
"cachedResultName": "{{Sub Workflow Name}}"
},
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
}
},
"typeVersion": 1.2
},
{
"id": "8cbbd214-3b3a-4aba-93cc-1e769847e789",
"name": "Publish Post to Facebook",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1664,
-384
],
"parameters": {
"url": "https://graph.facebook.com/v12.0/{{PAGE_ID}}/photos",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "source",
"value": "={{ $('Edit Fields1').item.json.file_path }}"
},
{
"name": "message",
"value": "={{ $('Switch1').item.json.headline }}\\n\\n{{ $('Switch1').item.json.content }}\\n\\n{{ $('Switch1').item.json.hashtags }}"
},
{
"name": "published",
"value": "true"
}
]
},
"genericAuthType": "oAuth2Api"
},
"typeVersion": 4.2
},
{
"id": "45c9e2cf-bbdd-4e09-9c62-240382f85921",
"name": "Notify Facebook Success",
"type": "n8n-nodes-base.telegram",
"position": [
-1456,
-384
],
"parameters": {
"text": "\ud83d\udcc5 Your post has been successfully scheduled for publishing on Facebook!",
"chatId": "={{ $('Check if Message has Photo').item.json.message.chat.id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "a05ff9fe-ddce-4c9a-bc28-407612de0c6b",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-4368,
-480
],
"parameters": {
"color": 3,
"height": 256,
"content": "Starts the workflow when the Telegram bot receives a new message from a user, including photos and text."
},
"typeVersion": 1
},
{
"id": "5850a31e-524e-4449-9a2d-cf8b9fc0f82b",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3824,
-96
],
"parameters": {
"color": 4,
"height": 320,
"content": "Determines whether the incoming Telegram message contains a photo. Routes to either the image processing path or the fallback for text-only messages."
},
"typeVersion": 1
},
{
"id": "aeee1d5f-2744-4d23-a669-c46bca013a9a",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-4080,
-480
],
"parameters": {
"color": 5,
"width": 208,
"height": 256,
"content": "Extracts key fields like chat_id, file_id, caption, and timestamp from the incoming message for further processing."
},
"typeVersion": 1
},
{
"id": "6d30b34a-8052-4772-9c03-2f13dcde46fd",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3856,
-480
],
"parameters": {
"color": 4,
"width": 160,
"height": 256,
"content": "Calls Telegram's API to retrieve file path information using the provided photo file ID."
},
"typeVersion": 1
},
{
"id": "7057a573-4bb7-4b5a-b350-dd64c74f7e4c",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3680,
-480
],
"parameters": {
"color": 5,
"width": 176,
"height": 256,
"content": "Builds a downloadable file URL using the file path from Telegram's response."
},
"typeVersion": 1
},
{
"id": "92d7a0df-4d7a-4d19-b777-5ec25dac16a9",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3488,
-480
],
"parameters": {
"color": 4,
"width": 192,
"height": 256,
"content": "Downloads the photo file from Telegram and stores it as photo_data for use by the AI."
},
"typeVersion": 1
},
{
"id": "6802e29d-1ee8-488f-92c3-1ee294f321c6",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3232,
-480
],
"parameters": {
"color": 6,
"height": 256,
"content": "Uses an AI agent (powered by a language model) to generate marketing content based on the image, caption, and brand style prompt."
},
"typeVersion": 1
},
{
"id": "5c1608cb-b51e-4e9f-b454-cc12aad1ae89",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3328,
-160
],
"parameters": {
"color": 6,
"height": 256,
"content": "\n\n\n\n\n\n\n\n\n\n\n\nProvides the underlying LLM (like Gemini or GPT) that powers the AI Agent node to generate the post content."
},
"typeVersion": 1
},
{
"id": "50ae9451-f18c-42ee-8ab4-b4c18611a1ed",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2944,
-608
],
"parameters": {
"color": 4,
"height": 384,
"content": "Parses the structured JSON response from the AI to extract:\n\nHeadline\n\nContent\n\nHashtags\n\nCTA\nAlso generates a random approval ID."
},
"typeVersion": 1
},
{
"id": "305fd517-304a-4f92-9581-a010c1ccc23f",
"name": "Decide Input is New or Old",
"type": "n8n-nodes-base.switch",
"position": [
-2656,
-368
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "39e6e597-0d27-43c5-bae6-42926f284937",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $('Check if Message has Photo').item.json.message.from.is_bot }}",
"rightValue": ""
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "203ef3ef-d966-45bd-8b30-40c62e3e1fb0",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $('Check if Message has Photo').item.json.message.from.is_bot }}",
"rightValue": ""
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "ae793205-2c10-4640-a9cd-ea6111894cfd",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2688,
-528
],
"parameters": {
"color": 5,
"width": 176,
"height": 304,
"content": "Checks if the message sender is a new message or user requested edit and routes the generated content to the right approval flow."
},
"typeVersion": 1
},
{
"id": "da169286-1d7a-4781-a3c0-9f6c3bdf7e01",
"name": "Send Content for Approval (New)",
"type": "n8n-nodes-base.telegram",
"position": [
-2320,
-496
],
"parameters": {
"chatId": "={{ $('Check if Message has Photo').item.json.message.chat.id }}",
"message": "=\ud83d\udcdd **Generated Marketing Content**\n\n**Headline:** {{ $('Parse AI Output').item.json.headline }}\n\n**Content:** {{ $('Parse AI Output').item.json.content }}\n\n**Hashtags:** {{ $('Parse AI Output').item.json.hashtags }}\n\n**CTA:** {{ $('Parse AI Output').item.json.cta }}\n\n\u2705 Reply \"APPROVE\" to post \n\u274c Reply \"REJECT\" to cancel",
"options": {},
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "657f641e-539d-4b23-bccc-b83c19f223f7",
"name": "Send Content for Approval (Old)",
"type": "n8n-nodes-base.telegram",
"position": [
-2320,
-144
],
"parameters": {
"chatId": "={{ $('Extract Telegram Metadata').item.json.chat_id }} ",
"message": "=\ud83d\udcdd **Generated Marketing Content**\n\n**Headline:** {{ $('Parse AI Output').item.json.headline }}\n\n**Content:** {{ $('Parse AI Output').item.json.content }}\n\n**Hashtags:** {{ $('Parse AI Output').item.json.hashtags }}\n\n**CTA:** {{ $('Parse AI Output').item.json.cta }}\n\n\u2705 Reply \"APPROVE\" to post \n\u274c Reply \"REJECT\" to cancel",
"options": {},
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "6344d872-4c6a-455d-bf07-238dc8344d03",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2368,
-608
],
"parameters": {
"color": 4,
"width": 208,
"height": 288,
"content": "Sends the AI-generated content to the user for review and waits for their reply (APPROVE or REJECT)."
},
"typeVersion": 1
},
{
"id": "ac30bbca-7e8f-4d4a-9923-d381e34c1ccb",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2368,
-256
],
"parameters": {
"color": 4,
"width": 208,
"height": 288,
"content": "Sends the AI-generated content to the user for review and waits for their reply (APPROVE or REJECT)."
},
"typeVersion": 1
},
{
"id": "9059b7fd-018b-46f3-9ab1-d5e9648c07ec",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1952,
-480
],
"parameters": {
"color": 5,
"width": 176,
"height": 256,
"content": "Checks whether the user approved or rejected the content and routes accordingly."
},
"typeVersion": 1
},
{
"id": "c32046c3-99e2-44b1-a77d-d1b849872cdf",
"name": "Sticky Note13",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1712,
-496
],
"parameters": {
"color": 4,
"width": 192,
"height": 272,
"content": "Posts the approved photo and content to a Facebook page using a multipart HTTP request."
},
"typeVersion": 1
},
{
"id": "c2f306c7-b762-47e3-b930-cebc61e16b74",
"name": "Sticky Note14",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1504,
-496
],
"parameters": {
"color": 5,
"width": 192,
"height": 272,
"content": "Notifies the user via Telegram that the Facebook post was successfully scheduled or published."
},
"typeVersion": 1
},
{
"id": "056940d3-d701-4904-a02b-9c9f122e20fd",
"name": "Check If Text or Photo",
"type": "n8n-nodes-base.switch",
"position": [
-2000,
96
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "2a8def23-8ef5-470c-96c8-ba873aa48a30",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $('Check if Message has Photo').item.json.message.from.is_bot }}",
"rightValue": ""
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "2011dd2e-5ed8-45c4-887f-01944f6e94a1",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $('Check if Message has Photo').item.json.message.from.is_bot }}",
"rightValue": ""
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "d98de212-9b3c-4917-9120-dfb6d5198244",
"name": "Sticky Note15",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2048,
0
],
"parameters": {
"color": 4,
"width": 208,
"height": 272,
"content": "Checks if the message came from the text route or the photo route"
},
"typeVersion": 1
},
{
"id": "4669ff74-44b8-4d8e-bb6e-74466a4bc88a",
"name": "Asking User for Changes",
"type": "n8n-nodes-base.telegram",
"position": [
-1696,
80
],
"parameters": {
"text": "What changes would you like ?",
"chatId": "={{ $('Check if Message has Photo').item.json.message.chat.id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "6e713890-dc12-4960-b748-37991976f036",
"name": "Sticky Note16",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1760,
-16
],
"parameters": {
"color": 5,
"width": 224,
"height": 256,
"content": "Sends a Telegram message asking the user to type what they want (used when no photo is sent)."
},
"typeVersion": 1
},
{
"id": "dccf21dd-f0ff-41fd-a76c-3d34ad6a718d",
"name": "Sticky Note17",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1520,
-112
],
"parameters": {
"color": 4,
"height": 352,
"content": "Re-triggers the workflow by executing it again using the user's text instead of a photo. Enables feedback loop via Telegram instead of bothering users to write their edits in a new tap"
},
"typeVersion": 1
},
{
"id": "07331e32-ca71-4ff3-8722-095778bfe351",
"name": "Sticky Note18",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1888,
384
],
"parameters": {
"color": 4,
"height": 352,
"content": "Re-triggers the workflow by executing it again using the user's text instead of a photo. Enables feedback loop via Telegram instead of bothering users to write their edits in a new tap"
},
"typeVersion": 1
},
{
"id": "b58342e6-1131-42be-9a10-ceefa65780a4",
"name": "Sticky Note19",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2128,
448
],
"parameters": {
"color": 5,
"width": 224,
"height": 288,
"content": "Sends a Telegram message asking the user to type what they want (used when a photo is sent)."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "3c4af25b-1c97-4e1f-8e22-cbf8a0ab92e5",
"connections": {
"Parse AI Output": {
"main": [
[
{
"node": "Decide Input is New or Old",
"type": "main",
"index": 0
}
]
]
},
"Approval Decision": {
"main": [
[
{
"node": "Publish Post to Facebook",
"type": "main",
"index": 0
}
],
[
{
"node": "Check If Text or Photo",
"type": "main",
"index": 0
}
]
]
},
"Trigger from Telegram": {
"main": [
[
{
"node": "Check if Message has Photo",
"type": "main",
"index": 0
}
]
]
},
"Check If Text or Photo": {
"main": [
[
{
"node": "Asking User for Changes",
"type": "main",
"index": 0
}
],
[
{
"node": "Prompt for User Input (Manual)",
"type": "main",
"index": 0
}
]
]
},
"Get Telegram File Info": {
"main": [
[
{
"node": "Build Telegram Image URL",
"type": "main",
"index": 0
}
]
]
},
"Asking User for Changes": {
"main": [
[
{
"node": "Restart Workflow Again",
"type": "main",
"index": 0
}
]
]
},
"Download Telegram Image": {
"main": [
[
{
"node": "Generate Marketing Content",
"type": "main",
"index": 0
}
]
]
},
"Build Telegram Image URL": {
"main": [
[
{
"node": "Download Telegram Image",
"type": "main",
"index": 0
}
]
]
},
"Publish Post to Facebook": {
"main": [
[
{
"node": "Notify Facebook Success",
"type": "main",
"index": 0
}
]
]
},
"Extract Telegram Metadata": {
"main": [
[
{
"node": "Get Telegram File Info",
"type": "main",
"index": 0
}
]
]
},
"Check if Message has Photo": {
"main": [
[
{
"node": "Extract Telegram Metadata",
"type": "main",
"index": 0
}
],
[
{
"node": "Generate Marketing Content",
"type": "main",
"index": 0
}
]
]
},
"Decide Input is New or Old": {
"main": [
[
{
"node": "Send Content for Approval (New)",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Content for Approval (Old)",
"type": "main",
"index": 0
}
]
]
},
"Generate Marketing Content": {
"main": [
[
{
"node": "Parse AI Output",
"type": "main",
"index": 0
}
]
]
},
"Language Model (OpenRouter)": {
"ai_languageModel": [
[
{
"node": "Generate Marketing Content",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Prompt for User Input (Manual)": {
"main": [
[
{
"node": "Restart Workflow with User Text",
"type": "main",
"index": 0
}
]
]
},
"Send Content for Approval (New)": {
"main": [
[
{
"node": "Approval Decision",
"type": "main",
"index": 0
}
]
]
},
"Send Content for Approval (Old)": {
"main": [
[
{
"node": "Approval Decision",
"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.
openRouterApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Instantly turn images into marketing content with one Telegram message.
Source: https://n8n.io/workflows/6635/ — 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.
RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.
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
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
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