Назад к шаблонам
ШАБЛОН РАБОЧЕГО ПРОЦЕССА
Telegram Trigger | Operasyon için n8n Otomasyon İş Akışı Şablonu
n8n için hazır otomasyon şablonu: Telegram Trigger. 37 düğüm. JSON'u kopyalayıp n8n'e içe aktarın.
37 узлыTelegram_Trigger-workflow.json
{"meta": {"instanceId": "3378b0d68c3b7ebfc71b79896d94e1a044dec38e99a1160aed4e9c323910fbe2","templateId": "9008","templateCredsSetupCompleted": true},"nodes": [{"id": "fe57df5b-9bd6-4b89-9f2a-7e492f007ee6","name": "Telegram Trigger","type": "n8n-nodes-base.telegramTrigger","position": [592,512],"webhookId": "68e2da8a-4bb2-45a8-9e6d-9b4b1509bf9a","parameters": {"updates": ["message"],"additionalFields": {}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "8f54add4-f32f-41a5-be2f-9602c8c0235e","name": "Switch","type": "n8n-nodes-base.switch","position": [1120,464],"parameters": {"rules": {"values": [{"outputKey": "Do Nothing","conditions": {"options": {"version": 2,"leftValue": "","caseSensitive": true,"typeValidation": "strict"},"combinator": "and","conditions": [{"id": "611dbffc-c663-48c9-9e10-c045f26f4505","operator": {"type": "string","operation": "equals"},"leftValue": "={{ $('Telegram Trigger').item.json.message.text }}","rightValue": "/start"}]},"renameOutput": true},{"outputKey": "voice","conditions": {"options": {"version": 2,"leftValue": "","caseSensitive": true,"typeValidation": "strict"},"combinator": "and","conditions": [{"id": "2c19aba8-aba2-4cf2-aefc-1f1af9277f5d","operator": {"type": "object","operation": "exists","singleValue": true},"leftValue": "={{ $('Telegram Trigger').item.json.message.voice }}","rightValue": ""}]},"renameOutput": true},{"outputKey": "picture","conditions": {"options": {"version": 2,"leftValue": "","caseSensitive": true,"typeValidation": "strict"},"combinator": "and","conditions": [{"id": "5e324898-f3d5-4a84-8ca4-94a33849cd6d","operator": {"type": "object","operation": "exists","singleValue": true},"leftValue": "={{ $('Telegram Trigger').item.json.message.document }}","rightValue": ""}]},"renameOutput": true},{"outputKey": "video","conditions": {"options": {"version": 2,"leftValue": "","caseSensitive": true,"typeValidation": "strict"},"combinator": "and","conditions": [{"id": "7b448a1b-5f96-42e3-bfce-dad6b5c45f01","operator": {"type": "object","operation": "exists","singleValue": true},"leftValue": "={{ $('Telegram Trigger').item.json.message.video }}","rightValue": ""}]},"renameOutput": true},{"outputKey": "text","conditions": {"options": {"version": 2,"leftValue": "","caseSensitive": true,"typeValidation": "strict"},"combinator": "and","conditions": [{"id": "e4174e28-530a-42ab-92f8-3ab0b79c7684","operator": {"type": "string","operation": "notEquals"},"leftValue": "={{ $('Telegram Trigger').item.json.message.text }}","rightValue": "/start"}]},"renameOutput": true}]},"options": {}},"typeVersion": 3.2},{"id": "ab6b3c42-8f87-4d9c-b446-467420ba89dc","name": "No Operation, do nothing","type": "n8n-nodes-base.noOp","position": [1440,64],"parameters": {},"typeVersion": 1},{"id": "91108b1b-d794-41bf-becc-df8fa7c5bf72","name": "Transcribe a recording","type": "@n8n/n8n-nodes-langchain.openAi","position": [1680,304],"parameters": {"options": {},"resource": "audio","operation": "transcribe"},"credentials": {"openAiApi": {"id": "XJdxgMSXFgwReSsh","name": "n8n key"}},"typeVersion": 1.8},{"id": "b24c21d7-ba1a-460e-8575-3908e450d9ad","name": "Sticky Note","type": "n8n-nodes-base.stickyNote","position": [32,240],"parameters": {"color": 7,"width": 480,"height": 736,"content": "# INSTRUCTIONS\n\n## 1. Create your chat bot and generate access token\n-> Search Bot father in telegram\n-> \"/newbot\"\n-> follow instructions and create access token\n-> Copy access token\n\n## 2. Create Credentials in n8n\n-> Open telegram trigger node\n-> Click create credential\n-> Paste access token\n-> Save\n\n## 3. Configure upload-post\n-> Open app.upload-post.com\n-> Follow the tutorial, connect accounts and generate token \n-> Generate credential generic and paste access token\n-> Save\n\n\n## 4. Create LLM access token\nDifferent per LLM but search your LLM + API in google\n-> (will have to create an account with the LLM platform)\n-> Buy credits to use LLM API\n-> Generate Access token\n-> Paste token in LLM node"},"typeVersion": 1},{"id": "a7c7769a-498a-43ed-bc54-f8d5df6f4b63","name": "Sticky Note1","type": "n8n-nodes-base.stickyNote","position": [544,320],"parameters": {"color": 5,"width": 208,"height": 496,"content": "### Waits for telegram message to start workflow"},"typeVersion": 1},{"id": "5b0a6572-dcb8-4607-8f68-7b1f57074c1d","name": "Sticky Note2","type": "n8n-nodes-base.stickyNote","position": [1072,320],"parameters": {"color": 5,"width": 208,"height": 496,"content": "### Determines what type of message was sent"},"typeVersion": 1},{"id": "c90fc3ab-dfee-41de-9da0-2cedc8ae1a8b","name": "Sticky Note3","type": "n8n-nodes-base.stickyNote","position": [1376,240],"parameters": {"color": 5,"width": 192,"height": 208,"content": "### Get Audio File"},"typeVersion": 1},{"id": "2d3fef65-2c63-4672-ba2e-dc8c4dce3050","name": "Sticky Note4","type": "n8n-nodes-base.stickyNote","position": [1632,240],"parameters": {"color": 5,"width": 208,"height": 208,"content": "### Use OpenAI to Transcribe Recording"},"typeVersion": 1},{"id": "98231e32-f8c9-4489-a190-c531beee462f","name": "Sticky Note5","type": "n8n-nodes-base.stickyNote","position": [2192,1472],"parameters": {"width": 208,"height": 224,"content": "### Choose any LLM you want here"},"typeVersion": 1},{"id": "27be2872-1ff2-44f3-95df-aa9e2dcc2f37","name": "Sticky Note6","type": "n8n-nodes-base.stickyNote","position": [2256,1104],"parameters": {"color": 5,"width": 288,"height": 368,"content": "### Base AI Agent. Adjust \"System Prompt\" to personalize this agent to your needs"},"typeVersion": 1},{"id": "1c156152-bd4d-4294-b462-2739ae45ca07","name": "Sticky Note7","type": "n8n-nodes-base.stickyNote","position": [2560,1104],"parameters": {"color": 5,"width": 224,"height": 368,"content": "### Sends AI Agent output to you in Telegram for confirmation"},"typeVersion": 1},{"id": "8310f4e1-07f2-458a-8d41-a347aca32136","name": "Sticky Note9","type": "n8n-nodes-base.stickyNote","position": [2416,1472],"parameters": {"width": 230,"height": 224,"content": "### Parse Output"},"typeVersion": 1},{"id": "8779f8c2-1ab3-45a9-8787-0177b2b09534","name": "Sticky Note10","type": "n8n-nodes-base.stickyNote","position": [1376,512],"parameters": {"color": 5,"width": 192,"height": 224,"content": "### Get Photo File"},"typeVersion": 1},{"id": "5fd1f209-90cf-4956-a029-b7fa86d4f4e0","name": "Sticky Note11","type": "n8n-nodes-base.stickyNote","position": [1632,512],"parameters": {"color": 5,"width": 208,"height": 224,"content": "### Use Gemini to analyze photo"},"typeVersion": 1},{"id": "ec2895ca-8912-4b4d-88e3-f6edd46e6a3c","name": "Get a Audio File","type": "n8n-nodes-base.telegram","position": [1424,304],"webhookId": "0a8d24f6-162c-4ed5-8cc7-ff35141993f0","parameters": {"fileId": "={{ $('Telegram Trigger').item.json.message.voice.file_id }}","resource": "file","additionalFields": {}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "f8290197-046a-448f-86d0-154fed593d21","name": "Get a Photo","type": "n8n-nodes-base.telegram","position": [1424,592],"webhookId": "0a8d24f6-162c-4ed5-8cc7-ff35141993f0","parameters": {"fileId": "={{ $('Telegram Trigger').item.json.message.photo && $('Telegram Trigger').item.json.message.photo.length\n ? $('Telegram Trigger').item.json.message.photo[$('Telegram Trigger').item.json.message.photo.length - 1].file_id\n : ($('Telegram Trigger').item.json.message.document && $('Telegram Trigger').item.json.message.document.file_id) }}","resource": "file","additionalFields": {}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "a9af3fbf-5945-4f79-b994-95de3a9c924c","name": "Get a Video File","type": "n8n-nodes-base.telegram","position": [1424,880],"webhookId": "0a8d24f6-162c-4ed5-8cc7-ff35141993f0","parameters": {"fileId": "={{ $('Telegram Trigger').item.json.message.video.file_id }}","resource": "file","additionalFields": {}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "262a8562-66ac-4834-b424-cbe36fad8a48","name": "Sticky Note13","type": "n8n-nodes-base.stickyNote","position": [1376,800],"parameters": {"color": 5,"width": 192,"height": 240,"content": "### Get Video File"},"typeVersion": 1},{"id": "6a25a9e7-8839-4de4-b5f4-2d8d7ed63a44","name": "Sticky Note14","type": "n8n-nodes-base.stickyNote","position": [1632,800],"parameters": {"color": 5,"width": 208,"height": 240,"content": "### Use Gemini to analyze Video"},"typeVersion": 1},{"id": "5ba18177-7feb-4455-976b-14f819f9c449","name": "Analyze video","type": "@n8n/n8n-nodes-langchain.googleGemini","position": [1680,880],"parameters": {"text": "=Analyze the video and describe his content","modelId": {"__rl": true,"mode": "list","value": "models/gemini-2.5-flash","cachedResultName": "models/gemini-2.5-flash"},"options": {},"resource": "video","inputType": "binary","operation": "analyze"},"credentials": {"googlePalmApi": {"id": "JQq5JRn9RAWcdBI6","name": "Google Gemini(PaLM) Api account"}},"typeVersion": 1},{"id": "a418361f-6f9e-4c4b-ad56-4454b94e7660","name": "Analyze an image","type": "@n8n/n8n-nodes-langchain.googleGemini","position": [1680,592],"parameters": {"text": "=Analyze the photo and describe his content in addition: {{ $('Telegram Trigger').item.json.message.caption || $('Telegram Trigger').item.json.message.text }}","modelId": {"__rl": true,"mode": "list","value": "models/gemini-2.5-flash","cachedResultName": "models/gemini-2.5-flash"},"options": {},"resource": "image","inputType": "binary","operation": "analyze"},"credentials": {"googlePalmApi": {"id": "JQq5JRn9RAWcdBI6","name": "Google Gemini(PaLM) Api account"}},"typeVersion": 1},{"id": "a767e4bc-e77f-406c-b36d-e05610d77ea7","name": "Google Gemini Chat Model","type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position": [2272,1536],"parameters": {"options": {}},"credentials": {"googlePalmApi": {"id": "Pz5rkKL1ZRGrSYoQ","name": "key studio google"}},"typeVersion": 1},{"id": "a64a1fb5-2cfd-4ac9-ab16-e298f1095fa8","name": "Structured Output Parser","type": "@n8n/n8n-nodes-langchain.outputParserStructured","position": [2416,1536],"parameters": {"autoFix": true,"jsonSchemaExample": "[\n{\"platform\": \"TikTok\", \"description\": \"description_generated\"},\n{\"platform\": \"Instagram\", \"description\": \"description_generated\"},\n{\"platform\": \"YouTube\", \"title\": \"generated_title\", \"description\": \"description_generated\"}\n]"},"typeVersion": 1.3},{"id": "6ed6d92b-b5d8-4f4d-9428-71a59e151f6e","name": "Send Regular Message","type": "n8n-nodes-base.telegram","position": [944,512],"webhookId": "c213a4f1-9cfd-49cb-b57e-f7074a62a29a","parameters": {"text": "=Asset received: Processing and generating descriptions","chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields": {"appendAttribution": false}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "e2e43a32-b5f5-4bf8-bb11-f09b4e70d5ed","name": "Sticky Note12","type": "n8n-nodes-base.stickyNote","position": [2208,784],"parameters": {"width": 224,"height": 224,"content": "### Choose any LLM you want here"},"typeVersion": 1},{"id": "9d670f42-6a36-45a1-a5d6-60985393c167","name": "Sticky Note15","type": "n8n-nodes-base.stickyNote","position": [2240,384],"parameters": {"color": 5,"width": 288,"height": 368,"content": "### Base AI Agent. Adjust \"System Prompt\" to personalize this agent to your needs"},"typeVersion": 1},{"id": "ac92170d-0fab-4e38-9a0a-736765ff4822","name": "Sticky Note16","type": "n8n-nodes-base.stickyNote","position": [2560,400],"parameters": {"color": 5,"width": 224,"height": 368,"content": "### Sends AI Agent output to you in Telegram for confirmation"},"typeVersion": 1},{"id": "8ac30b76-6183-4d6e-8617-2a19c9cdb015","name": "Sticky Note18","type": "n8n-nodes-base.stickyNote","position": [2432,784],"parameters": {"width": 230,"height": 224,"content": "### Parse Output "},"typeVersion": 1},{"id": "5837c0b5-45b7-4020-b98d-b0ad7bfd9dcb","name": "Google Gemini Chat Model1","type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position": [2272,880],"parameters": {"options": {}},"credentials": {"googlePalmApi": {"id": "Pz5rkKL1ZRGrSYoQ","name": "key studio google"}},"typeVersion": 1},{"id": "5ed5f0d6-4e35-41be-b7d6-ac44563ea67d","name": "Structured Output Parser1","type": "@n8n/n8n-nodes-langchain.outputParserStructured","position": [2416,864],"parameters": {"autoFix": true,"jsonSchemaExample": "[\n{\"platform\": \"TikTok\", \"description\": \"description_generated\"},\n{\"platform\": \"Instagram\", \"description\": \"description_generated\"},\n{\"platform\": \"Pinterest\", \"title\": \"generated_title\", \"description\": \"description_generated\"}\n]"},"typeVersion": 1.3},{"id": "09db5082-77bc-410b-a1f3-0d92ebd8d171","name": "Get a Photo File","type": "n8n-nodes-base.telegram","position": [3216,544],"webhookId": "0a8d24f6-162c-4ed5-8cc7-ff35141993f0","parameters": {"fileId": "={{ $('Telegram Trigger').item.json.message.photo && $('Telegram Trigger').item.json.message.photo.length\n ? $('Telegram Trigger').item.json.message.photo[$('Telegram Trigger').item.json.message.photo.length - 1].file_id\n : ($('Telegram Trigger').item.json.message.document && $('Telegram Trigger').item.json.message.document.file_id) }}","resource": "file","additionalFields": {}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "50754630-21b4-4c94-8e2c-1e3fb0e8ed43","name": "Edit Fields","type": "n8n-nodes-base.set","position": [752,512],"parameters": {"options": {},"assignments": {"assignments": [{"id": "e6ba0caf-d30c-4e3c-9c31-8db30fbe61b7","name": "upload_post_user","type": "string","value": "influencersde"},{"id": "01de814b-5f2f-4eb9-93f5-7814c67677ae","name": "pinterest_board_id","type": "string","value": "995647498810363103"}]}},"typeVersion": 3.4},{"id": "5c9eedbd-bb8e-4d51-b2f8-2bc25fd02f43","name": "AI Agent Photos","type": "@n8n/n8n-nodes-langchain.agent","position": [2272,560],"parameters": {"text": "=Te voy a pasar a continuacion la descripcion de una foto, debes crearme una descripcion perfecta, para Tiktok (90 caracteres maximo), Instagram y Pinterest, en el caso de youtube tambien un titulo: {{ $json.content.parts[0].text }} informacion adicional: {{ $('Telegram Trigger').item.json.message.caption || $('Telegram Trigger').item.json.message.text }}","options": {"systemMessage": "Eres un experto en gestión de redes sociales y creación de contenido, la salida tiene que tener este formato siempre solo devuelve eso: [\n{\"platform\": \"TikTok\", \"description\": \"description_generated\"},\n{\"platform\": \"Instagram\", \"description\": \"description_generated\"},\n{\"platform\": \"Pinterest\", \"title\": \"generated_title\", \"description\": \"description_generated\"}\n]"},"promptType": "define","hasOutputParser": true},"retryOnFail": true,"typeVersion": 2.2},{"id": "0fe10676-1310-427c-af4c-c0d1553ffd7f","name": "AI Agent Videos","type": "@n8n/n8n-nodes-langchain.agent","position": [2272,1232],"parameters": {"text": "=Te voy a pasar a continuacion la descripcion de un video, debes crearme una descripcion perfecta, para Tiktok, Instagram y Youtube, en el caso de youtube tambien un titulo: {{ $json.content.parts[0].text }} informacion adicional: {{ $('Telegram Trigger').item.json.message.caption || $('Telegram Trigger').item.json.message.text }}","options": {"systemMessage": "\nEres un experto en gestión de redes sociales y creación de contenido, no uses comillas ni caracteres especiales la salida tiene que tener este formato siempre solo devuelve eso: [\n{\"platform\": \"TikTok\", \"description\": \"description_generated\"},\n{\"platform\": \"Instagram\", \"description\": \"description_generated\"},\n{\"platform\": \"YouTube\", \"title\": \"generated_title\", \"description\": \"description_generated\"}\n]"},"promptType": "define","hasOutputParser": true},"retryOnFail": true,"typeVersion": 2.2},{"id": "b383c0ae-6cf1-415f-b028-e5ebcaa9dc7e","name": "Get a Video File2","type": "n8n-nodes-base.telegram","position": [3200,1216],"webhookId": "0a8d24f6-162c-4ed5-8cc7-ff35141993f0","parameters": {"fileId": "={{ $('Telegram Trigger').item.json.message.video.file_id }}","resource": "file","additionalFields": {}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "6c57e733-fa9b-489d-a986-7b7990c3cd7d","name": "If","type": "n8n-nodes-base.if","position": [2816,560],"parameters": {"options": {},"conditions": {"options": {"version": 2,"leftValue": "","caseSensitive": true,"typeValidation": "loose"},"combinator": "and","conditions": [{"id": "e898b04b-611e-4184-9c04-bb8f538a8863","operator": {"name": "filter.operator.equals","type": "string","operation": "equals"},"leftValue": "={{ $json.data.approved }}","rightValue": "true"}]},"looseTypeValidation": true},"typeVersion": 2.2},{"id": "b704f159-7e0e-454d-a82e-257707fca311","name": "Send message and wait for response","type": "n8n-nodes-base.telegram","position": [2624,560],"webhookId": "2ab2ef8e-e18f-4142-8343-3eb5e2cf373f","parameters": {"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","message": "=➡️ Tiktok Description:\n\n {{ $json.output[0].description }}\n\n➡️ Instagram Description: \n\n {{ $json.output[1].description }}\n\n➡️ Pinterest Description\n\n {{ $json.output[2].description }}","options": {},"operation": "sendAndWait","approvalOptions": {"values": {"approvalType": "double"}}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "ba14f239-70ce-444e-a1f0-f6d9a9371b6c","name": "Send message and wait for response1","type": "n8n-nodes-base.telegram","position": [2608,1232],"webhookId": "2ab2ef8e-e18f-4142-8343-3eb5e2cf373f","parameters": {"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","message": "=➡️ Tiktok Description:\n\n {{ $json.output[0].description }}\n\n➡️ Instagram Description: \n\n {{ $json.output[1].description }}\n\n➡️ Youtube Description\n\n {{ $json.output[2].description }}","options": {},"operation": "sendAndWait","approvalOptions": {"values": {"approvalType": "double"}}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"retryOnFail": true,"typeVersion": 1.2},{"id": "ca6c16d5-bcde-490d-8cbc-4f2e9d4ac2c9","name": "If1","type": "n8n-nodes-base.if","position": [2816,1232],"parameters": {"options": {},"conditions": {"options": {"version": 2,"leftValue": "","caseSensitive": true,"typeValidation": "loose"},"combinator": "and","conditions": [{"id": "e898b04b-611e-4184-9c04-bb8f538a8863","operator": {"name": "filter.operator.equals","type": "string","operation": "equals"},"leftValue": "={{ $json.data.approved }}","rightValue": "true"}]},"looseTypeValidation": true},"typeVersion": 2.2},{"id": "80c5b84d-e539-4802-8f37-4eddf16ed77e","name": "Sticky Note17","type": "n8n-nodes-base.stickyNote","position": [2224,64],"parameters": {"width": 224,"height": 224,"content": "### Choose any LLM you want here"},"typeVersion": 1},{"id": "34418b61-8f2e-479d-8496-4ef504f4d21d","name": "Sticky Note19","type": "n8n-nodes-base.stickyNote","position": [2256,-304],"parameters": {"color": 5,"width": 288,"height": 368,"content": "### Base AI Agent. Adjust \"System Prompt\" to personalize this agent to your needs"},"typeVersion": 1},{"id": "c894f61e-07ce-43a1-9e61-ddfd4e68f065","name": "Sticky Note20","type": "n8n-nodes-base.stickyNote","position": [2576,-320],"parameters": {"color": 5,"width": 224,"height": 368,"content": "### Sends AI Agent output to you in Telegram for confirmation"},"typeVersion": 1},{"id": "8d08f0d4-ecd8-4afc-ad7f-9a694446cabe","name": "Sticky Note21","type": "n8n-nodes-base.stickyNote","position": [2416,64],"parameters": {"width": 214,"height": 224,"content": "### Parse Output "},"typeVersion": 1},{"id": "17c8bfa6-1990-49a1-a156-ba376f1fc057","name": "Google Gemini Chat Model2","type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position": [2288,160],"parameters": {"options": {}},"credentials": {"googlePalmApi": {"id": "Pz5rkKL1ZRGrSYoQ","name": "key studio google"}},"typeVersion": 1},{"id": "d26ba9b6-5a2f-4003-8fb3-a266aa700cc5","name": "Structured Output Parser2","type": "@n8n/n8n-nodes-langchain.outputParserStructured","position": [2400,160],"parameters": {"autoFix": true,"jsonSchemaExample": "[\n{\"platform\": \"Threads\", \"description\": \"description_generated\"},\n{\"platform\": \"Linkedin\", \"description\": \"description_generated\"},\n{\"platform\": \"X\", \"description\": \"description_generated\"}\n]"},"typeVersion": 1.3},{"id": "67b8d34b-104e-4979-acd0-87456adf51c4","name": "If2","type": "n8n-nodes-base.if","position": [2832,-160],"parameters": {"options": {},"conditions": {"options": {"version": 2,"leftValue": "","caseSensitive": true,"typeValidation": "loose"},"combinator": "and","conditions": [{"id": "e898b04b-611e-4184-9c04-bb8f538a8863","operator": {"name": "filter.operator.equals","type": "string","operation": "equals"},"leftValue": "={{ $json.data.approved }}","rightValue": "true"}]},"looseTypeValidation": true},"typeVersion": 2.2},{"id": "1376dc0e-111e-4702-8696-c8086e525fd2","name": "Send message and wait for response2","type": "n8n-nodes-base.telegram","position": [2640,-160],"webhookId": "2ab2ef8e-e18f-4142-8343-3eb5e2cf373f","parameters": {"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","message": "=➡️ Threads Description:\n\n {{ $json.output[0].description }}\n\n➡️ Linkedin Description: \n\n {{ $json.output[1].description }}\n\n➡️ Twitter Description\n\n {{ $json.output[2].description }}","options": {},"operation": "sendAndWait","approvalOptions": {"values": {"approvalType": "double"}}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "f869874c-9d7a-4a46-a214-a87fa263aedf","name": "Sticky Note8","type": "n8n-nodes-base.stickyNote","position": [2144,-384],"parameters": {"color": 3,"width": 2096,"height": 688,"content": "## Text Post Assistant\n"},"typeVersion": 1},{"id": "bddcaef1-d4de-4a63-928f-b3b3ba3c9e39","name": "Sticky Note22","type": "n8n-nodes-base.stickyNote","position": [2144,336],"parameters": {"color": 3,"width": 2096,"height": 704,"content": "## Photo Post Assistant\n"},"typeVersion": 1},{"id": "79dee5c0-74cc-4b19-afaf-9bc07f4093ee","name": "Sticky Note23","type": "n8n-nodes-base.stickyNote","position": [2144,1056],"parameters": {"color": 3,"width": 2096,"height": 704,"content": "## Video Post Assistant\n"},"typeVersion": 1},{"id": "2dae5293-a546-40e1-bb69-6d08e2b5dcb6","name": "AI Agent Text","type": "@n8n/n8n-nodes-langchain.agent","position": [2288,-160],"parameters": {"text": "=\n * Not emotes\n * Use relevant hashtags\n * Ejemplos de post mios para que copies el lenguaje, tono, expresiones todo: \n\n\"Hoy os quiero compartir un nuevo workflow de n8n que estuve haciendo el finde para generar carruseles de historias con la nueva api de Openai gpt-image-1.\n\nLo que hace es generar 5 imágenes y mantiene la consistencia de los mismos personajes u objetos en las 5, luego automáticamente lo sube a Instagram y Tiktok con una canción de fondo. En Tiktok sobre todo está funcionando bastante bien este tipo de contenido, aquí os dejo un ejemplo:\n\nhttps://lnkd.in/dHB8kJfz\n\nY aquí tenéis el témplate por si queréis probarlo: \n\nhttps://lnkd.in/d_3fGzDt\n\nA ver si a alguien se le ocurre algún uso interesante/comercial a parte del de contar historias, igual para hacer anuncios también puede servir, os leo.\"\n\n\"Hoy os quería compartir una automatización de n8n que tenemos para las facturas que nos está quitando mucho curro.\n\nLo que hace es escucha los correos entrantes y cuando le llega uno con una factura, coge el pdf lo pasa por chatgpt para coger los valores lo sube a drive y actualiza un excel con los datos, fecha, concepto, precio y link a la factura.\n\nlink\n\"\n\"\nComo me gusta mucho comer fuera, los bares y el turismo gastronómico, y como además me gustan mucho los datos, he cogido todos los datos posibles de todos los restaurantes y bares de Madrid, Barcelona y Málaga (de momento), y he hecho una webapp con los 100 mejores. \n\nEsta selección está basada solo en datos de Google Maps, reseñas y webs de todo tipo, procesados y filtrados con Gemini 2.5 flash. Los datos han sido recogidos con la API de google places y las búsquedas de Gemini (Google <3) .\n\nYa estaba cansado de tener que estar todo el día leyendo y filtrando google maps a mano para buscar sitios donde comer o cenar y de los fooders de Tiktok con opiniones sesgadas. \n\nLa idea es ir mejorando la aplicación e ir añadiendo nuevas funcionalidades que se os ocurran, para ello he puesto un botón de solicitar funcionalidad donde la gente puede ir votando qué feature nueva quiere.\n\n¿Qué os parece, qué añadiríais? os leo \n\nY si os mola please compartidlo \n\nhttps://www.topbares.com/\n\"\n\"\nBuenas gente, hoy os quería compartir un workflow de n8n que he creado (modificado), he cogido uno de los más usados del mes pasado que genera reels con IA y le he enganchado upload-post para subir el contenido a todas las redes: \n\nhttps://lnkd.in/dqSeZ7is\n\nEstá rankeando bastante bien este mes en el ranking de las templates de n8n más usadas, utiliza Openai, FLux y Kling para generar el contenido, solo le tienes que pasar varias ideas en un excel y el va generando los videos y subiendolos.\n\"\n\n\"\nHe actualizado la template de n8n para añadirle Youtube, en cuanto nos aprueben la verificación de Facebook lo añadiré también, y así puedes subir tu contenido a todas las redes sociales a la vez, con solo subir al drive el video: \n\nhttps://lnkd.in/d-5hhuB2\n\nTambién hemos creado librerías en node y python para que los devs podáis integrar la subida en vuestros pipelines muy fácilmente : \n\nhttps://lnkd.in/dWSRPqQD\n\nSe os ocurre alguna automatización más que añadir o alguna feature para facilitar las subidas a redes? os leo.\n\"\n\"\nHoy os quería hablar de otro SaaS que tenemos: https://upload-post.com \n\nBásicamente es una API que te permite subir fácilmente post, reels, imágenes ect a casi todas las redes sociales: Tiktok, Instagram, Facebook, YouTube , Twitter y Linkedin\n\nSolo hay que conectar las cuentas, generar un token y listo! ya solo con una petición subes a todas las redes tu post. \n\nAdemás tenemos integración con n8n y make y 10 subidas gratis al mes para que pruebes.\n\nLas únicas alternativas del mercado que te dejan integrar con API (que yo conozca son Ayrshare y Hootsuite) y parten de un plan mensual de 150 dólares.\n\nNosotros hemos hecho planes mucho más asequibles. echadle un vistazo!\n\n\"\n\n* **For Twitter/X:**\n * Create a thread **in English** .\n * **If it's a thread:**\n * Tweet 1: The hook with the image. Present the problem and solution explosively. (e.g., \"I built an n8n workflow that does [X]. Goodbye to [problem]. 🧵👇\")\n * Tweet 2-3: Briefly explain how it works and why it's useful.\n * Final Tweet: The CTA and community invitation.\n * Use concise hashtags: `#n8n`, `#automation`, `#dev`.\nThe system is designed to intelligently create threads on X (formerly Twitter) by automatically splitting your text while respecting any formatting you've already done. Here’s the step-by-step logic:\nSplitting by Paragraphs (Primary Method):\nThe function first looks for two or more newlines (i.e., a blank line) between blocks of text. It considers each of these blocks as a separate, intended tweet in your thread.\nExample: If you write two paragraphs separated by a blank line, they will become the first and second tweets in the thread.\nHandling Overly Long Tweets:\nIf any of these individual \"tweets\" are still longer than the 280-character limit, the system will try to split them further using these rules in order:\nSplitting by Line Breaks: It will first try to split the long text by single newline characters. This is useful for lists or text with intentional line breaks.\nSplitting by Words: As a last resort, if a single line is still too long, it will be broken up by words to ensure it fits within the character limit.\n\n\n* **For Threads:**\n * The style is similar to Twitter, but allows for a slightly more conversational and relaxed tone. Create the post **in Spanish**.\n * You can frame it as a \"dev note\" or a \"behind the scenes\" look at the workflow.\n * It's a good place to ask direct questions and respond to comments more fluidly.\n * Mximun 500 characters long\n * Don't need create thread like x here is more long\n\nTe voy a pasar a continuacion lo que quiero que me redactes usa el mismo idioma que estas directrices que te voy a dar para todas las redes sociales, para linkedin, x y threads: {{ $json.text }}","options": {"systemMessage": "Eres un experto en gestión de redes sociales y creación de contenido, la salida tiene que tener este formato siempre solo devuelve eso: [\n{\"platform\": \"Threads\", \"description\": \"description_generated\"},\n{\"platform\": \"Linkedin\", \"description\": \"description_generated\"},\n{\"platform\": \"X\",\"description\": \"description_generated\"}\n]"},"promptType": "define","hasOutputParser": true},"retryOnFail": true,"typeVersion": 2.2},{"id": "eb1bf3e0-3a56-4ee3-b2bb-69d8be7fee59","name": "Sticky Note24","type": "n8n-nodes-base.stickyNote","position": [720,320],"parameters": {"color": 5,"width": 176,"height": 496,"content": "### Configure upload-post user profile created in app.upload-post.com"},"typeVersion": 1},{"id": "4b0045f3-8eca-42bd-bd08-ce068a157a7f","name": "Sticky Note25","type": "n8n-nodes-base.stickyNote","position": [896,320],"parameters": {"color": 5,"width": 176,"height": 496,"content": "### Sent telegram notification starting process"},"typeVersion": 1},{"id": "6d5a8fbe-d26b-4a99-9dc5-5cec4435c0fb","name": "Send Confirmation upload","type": "n8n-nodes-base.telegram","position": [3728,1216],"webhookId": "c213a4f1-9cfd-49cb-b57e-f7074a62a29a","parameters": {"text": "=➡️ Tiktok Status upload:\n\n - sucess: {{ $json.results[1].success }}\n - {{ $json.results[1].post_url }}\n - {{ $json.results[1].error_message }}\n\n➡️ Instagram Status upload:\n\n - sucess: {{ $json.results[0].success }}\n - {{ $json.results[0].post_url }}\n - {{ $json.results[0].error_message }}\n\n➡️ Youtube Status upload:\n\n - sucess: {{ $json.results[2].success }}\n - {{ $json.results[2].post_url }}\n - {{ $json.results[2].error_message }}\n\n","chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields": {"appendAttribution": false}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "c5185e5d-4c27-43c4-bbfc-23231c474775","name": "Send processing upload","type": "n8n-nodes-base.telegram","position": [3024,1216],"webhookId": "a7eabf28-3f73-4f88-969a-b3cd2082df93","parameters": {"text": "⌛ Uploading...","chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields": {}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "2a7f6bdf-9357-4acf-a500-c01cdca43bb5","name": "Send processing upload1","type": "n8n-nodes-base.telegram","position": [3024,544],"webhookId": "a7eabf28-3f73-4f88-969a-b3cd2082df93","parameters": {"text": "⌛ Uploading...","chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields": {}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "9500429e-7035-403e-b9a1-3f6454f2947a","name": "Send Confirmation upload1","type": "n8n-nodes-base.telegram","position": [3696,544],"webhookId": "c213a4f1-9cfd-49cb-b57e-f7074a62a29a","parameters": {"text": "=➡️ Tiktok Status upload:\n\n - sucess: {{ $json.results[2].success }}\n - {{ $json.results[2].post_url }}\n - {{ $json.results[2].error_message }}\n\n➡️ Instagram Status upload:\n\n - sucess: {{ $json.results[0].success }}\n - {{ $json.results[0].post_url }}\n - {{ $json.results[0].error_message }}\n\n➡️ Pinterest Status upload:\n\n - sucess: {{ $json.results[1].success }}\n - {{ $json.results[1].post_url }}\n - {{ $json.results[1].error_message }}\n\n","chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields": {"appendAttribution": false}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "87cb489a-778d-4de1-9afd-2c10fcbe1cc0","name": "Send processing upload2","type": "n8n-nodes-base.telegram","position": [3024,-176],"webhookId": "a7eabf28-3f73-4f88-969a-b3cd2082df93","parameters": {"text": "⌛ Uploading...","chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields": {}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "a7cdea06-bb82-46b0-84b3-5e261e799cd6","name": "Send Confirmation upload2","type": "n8n-nodes-base.telegram","position": [3552,-176],"webhookId": "c213a4f1-9cfd-49cb-b57e-f7074a62a29a","parameters": {"text": "=➡️ Linkedin Status upload:\n\n sucess: {{ $json.results.linkedin.success }}\n {{ $json.results.linkedin.url }}\n\n➡️ X Status upload:\n\n sucess: {{ $json.results.x.success }}\n {{ $json.results.x.url }}\n\n➡️ Threads Status upload:\n\n sucess: {{ $json.results.threads.success }}\n {{ $json.results.threads.url }}\n\n","chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields": {"parse_mode": "HTML","appendAttribution": false}},"credentials": {"telegramApi": {"id": "Yz85NEO7PkLjqZYt","name": "agentsocialmediaAIbot"}},"typeVersion": 1.2},{"id": "c0c40729-da3c-419f-9f9f-fabebb5a8ed0","name": "Upload video to Tiktok Instagram Youtube","type": "n8n-nodes-upload-post.uploadPost","position": [3440,1216],"parameters": {"user": "={{ $('Edit Fields').item.json.upload_post_user }}","title": "={{ $('AI Agent Videos').item.json.output[2].title }}","video": "data","platform": ["instagram","tiktok","youtube"],"operation": "uploadVideo","tiktokTitle": "={{ $('AI Agent Videos').item.json.output[0].title }}","youtubeTitle": "={{ $('AI Agent Videos').item.json.output[2].title }}","instagramTitle": "={{ $('AI Agent Videos').item.json.output[1].title }}","youtubeDescription": "={{ $('AI Agent Videos').item.json.output[2].description }}"},"credentials": {"uploadPostApi": {"id": "mREXP5Q3Gj5dS52e","name": "Smoker"}},"typeVersion": 1},{"id": "f545a9a8-9cb3-48b2-857e-d36fe4aa04d3","name": "Upload photos","type": "n8n-nodes-upload-post.uploadPost","position": [3424,544],"parameters": {"user": "={{ $('Edit Fields').item.json.upload_post_user }}","title": "={{ $('AI Agent Photos').item.json.output[1].description }}","photos": "=data","platform": ["instagram","pinterest","tiktok"],"tiktokTitle": "={{ $('AI Agent Photos').item.json.output[0].description }}","instagramTitle": "={{ $('AI Agent Photos').item.json.output[1].description }}","pinterestTitle": "={{ $('AI Agent Photos').item.json.output[2].title }}","pinterestBoardId": "995647498810363103"},"credentials": {"uploadPostApi": {"id": "mREXP5Q3Gj5dS52e","name": "Smoker"}},"retryOnFail": true,"typeVersion": 1},{"id": "1184aa32-6cec-49c0-9fac-fd57c778a70f","name": "Upload a text post","type": "n8n-nodes-upload-post.uploadPost","position": [3296,-176],"parameters": {"user": "={{ $('Edit Fields').item.json.upload_post_user }}","title": "={{ $('AI Agent Text').item.json.output[1].description }}","xTitle": "={{ $('AI Agent Text').item.json.output[2].description }}","platform": ["linkedin","x","threads"],"operation": "uploadText","uploadAsync": false,"linkedinTitle": "={{ $('AI Agent Text').item.json.output[1].description }}","targetLinkedinPageId": "urn:li:organization:108870530"},"credentials": {"uploadPostApi": {"id": "mREXP5Q3Gj5dS52e","name": "Smoker"}},"retryOnFail": true,"typeVersion": 1}],"pinData": {"Telegram Trigger": [{"message": {"chat": {"id": 245284777,"type": "private","username": "Mutonby","first_name": "Juan Carlos 🦴"},"date": 1759873429,"from": {"id": 245284777,"is_bot": false,"username": "Mutonby","first_name": "Juan Carlos 🦴","language_code": "es"},"video": {"thumb": {"width": 180,"height": 320,"file_id": "AAMCBAADGQEAA_Bo5YmVWqfy3uxZu7BAoOL7HqtD4QACghkAAgiKKFNi0ykiwc-2gwEAB20AAzYE","file_size": 10871,"file_unique_id": "AQADghkAAgiKKFNy"},"width": 720,"height": 1280,"file_id": "BAACAgQAAxkBAAPwaOWJlVqn8t7sWbuwQKDi-x6rQ-EAAoIZAAIIiihTYtMpIsHPtoM2BA","duration": 38,"file_name": "heygen_generated_678aaf41e910ecac5089a939_20251007_212908_355937.mp4","file_size": 12067868,"mime_type": "video/mp4","thumbnail": {"width": 180,"height": 320,"file_id": "AAMCBAADGQEAA_Bo5YmVWqfy3uxZu7BAoOL7HqtD4QACghkAAgiKKFNi0ykiwc-2gwEAB20AAzYE","file_size": 10871,"file_unique_id": "AQADghkAAgiKKFNy"},"file_unique_id": "AgADghkAAgiKKFM"},"message_id": 240},"update_id": 189771664}]},"connections": {"If": {"main": [[{"node": "Send processing upload1","type": "main","index": 0}],[]]},"If1": {"main": [[{"node": "Send processing upload","type": "main","index": 0}]]},"If2": {"main": [[{"node": "Send processing upload2","type": "main","index": 0}]]},"Switch": {"main": [[{"node": "No Operation, do nothing","type": "main","index": 0}],[{"node": "Get a Audio File","type": "main","index": 0}],[{"node": "Get a Photo","type": "main","index": 0}],[{"node": "Get a Video File","type": "main","index": 0}],[]]},"Edit Fields": {"main": [[{"node": "Send Regular Message","type": "main","index": 0}]]},"Get a Photo": {"main": [[{"node": "Analyze an image","type": "main","index": 0}]]},"AI Agent Text": {"main": [[{"node": "Send message and wait for response2","type": "main","index": 0}]]},"Analyze video": {"main": [[{"node": "AI Agent Videos","type": "main","index": 0}]]},"Upload photos": {"main": [[{"node": "Send Confirmation upload1","type": "main","index": 0}]]},"AI Agent Photos": {"main": [[{"node": "Send message and wait for response","type": "main","index": 0}]]},"AI Agent Videos": {"main": [[{"node": "Send message and wait for response1","type": "main","index": 0}]]},"Analyze an image": {"main": [[{"node": "AI Agent Photos","type": "main","index": 0}]]},"Get a Audio File": {"main": [[{"node": "Transcribe a recording","type": "main","index": 0}]]},"Get a Photo File": {"main": [[{"node": "Upload photos","type": "main","index": 0}]]},"Get a Video File": {"main": [[{"node": "Analyze video","type": "main","index": 0}]]},"Telegram Trigger": {"main": [[{"node": "Edit Fields","type": "main","index": 0}]]},"Get a Video File2": {"main": [[{"node": "Upload video to Tiktok Instagram Youtube","type": "main","index": 0}]]},"Upload a text post": {"main": [[{"node": "Send Confirmation upload2","type": "main","index": 0}]]},"Send Regular Message": {"main": [[{"node": "Switch","type": "main","index": 0}]]},"Send processing upload": {"main": [[{"node": "Get a Video File2","type": "main","index": 0}]]},"Transcribe a recording": {"main": [[{"node": "AI Agent Text","type": "main","index": 0}]]},"Send processing upload1": {"main": [[{"node": "Get a Photo File","type": "main","index": 0}]]},"Send processing upload2": {"main": [[{"node": "Upload a text post","type": "main","index": 0}]]},"Google Gemini Chat Model": {"ai_languageModel": [[{"node": "AI Agent Videos","type": "ai_languageModel","index": 0},{"node": "Structured Output Parser","type": "ai_languageModel","index": 0}]]},"Structured Output Parser": {"ai_outputParser": [[{"node": "AI Agent Videos","type": "ai_outputParser","index": 0}]]},"Google Gemini Chat Model1": {"ai_languageModel": [[{"node": "AI Agent Photos","type": "ai_languageModel","index": 0},{"node": "Structured Output Parser1","type": "ai_languageModel","index": 0}]]},"Google Gemini Chat Model2": {"ai_languageModel": [[{"node": "AI Agent Text","type": "ai_languageModel","index": 0},{"node": "Structured Output Parser2","type": "ai_languageModel","index": 0}]]},"Structured Output Parser1": {"ai_outputParser": [[{"node": "AI Agent Photos","type": "ai_outputParser","index": 0}]]},"Structured Output Parser2": {"ai_outputParser": [[{"node": "AI Agent Text","type": "ai_outputParser","index": 0}]]},"Send message and wait for response": {"main": [[{"node": "If","type": "main","index": 0}]]},"Send message and wait for response1": {"main": [[{"node": "If1","type": "main","index": 0}]]},"Send message and wait for response2": {"main": [[{"node": "If2","type": "main","index": 0}]]},"Upload video to Tiktok Instagram Youtube": {"main": [[{"node": "Send Confirmation upload","type": "main","index": 0}]]}}}
В редакторе n8n: вставьте через Ctrl+V→Workflow будет создан