Robot de redes sociales
Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 20 nodos.Utiliza principalmente nodos como If, Set, Code, Twitter, Telegram. Usar Gemini AI y aprobación de Telegram para generar títulos de redes sociales para imágenes de productos
- •Credenciales de API de Twitter
- •Bot Token de Telegram
- •Credenciales de API de Google Drive
- •Pueden requerirse credenciales de autenticación para la API de destino
Nodos utilizados (20)
Categoría
{
"id": "VRQRmYeZgdhja9Tr",
"meta": {
"instanceId": "3cf03cf248085630c965336067d071bb3528b35e6ad2acfb841a4d314e555f67",
"templateCredsSetupCompleted": true
},
"name": "Social_Media_Bot",
"tags": [
{
"id": "LlHwj4AbBF3cwHta",
"name": "AI_AGENT",
"createdAt": "2025-09-10T10:29:49.604Z",
"updatedAt": "2025-09-10T10:29:49.604Z"
}
],
"nodes": [
{
"id": "a6622083-d0bf-4d19-ac94-6483bb7e634f",
"name": "Google Drive Trigger",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
-448,
-560
],
"parameters": {
"event": "fileCreated",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"mode": "list",
"value": "1A1Nmg58RBv969MqOIrvTWFlKbkgiKZBE",
"cachedResultUrl": "https://drive.google.com/drive/folders/1A1Nmg58RBv969MqOIrvTWFlKbkgiKZBE",
"cachedResultName": "Product_images"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "sJQdyi6KBJuEPugK",
"name": "Google Drive account"
}
},
"typeVersion": 1
},
{
"id": "3d0c332a-f6f7-48ab-bfa0-d9c8c7d6b10c",
"name": "Analizar imagen",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
0,
-560
],
"parameters": {
"text": "You are an image analysis assistant. Analyze the given image carefully and provide a structured JSON output with the following fields:\n\n{\n \"objects\": [\"list of main objects or items visible in the image\"],\n \"subject\": \"the main subject or product of the image\",\n \"colors\": [\"primary and secondary colors present\"],\n \"background\": \"description of the background or setting\",\n \"style\": \"the style of the image (e.g. professional photo, selfie, product shot, illustration, etc.)\",\n \"mood\": \"the mood or feeling conveyed by the image\",\n \"possible_use_cases\": [\"possible purposes of the image, e.g. advertisement, social media post, product showcase, art, etc.\"]\n}\n\nMake the response concise, factual, and machine-readable. Do not generate captions or hashtags here, just the structured description.\n\nReturn only valid JSON. \nDo not include explanations, markdown formatting, or code fences.",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-pro",
"cachedResultName": "models/gemini-2.5-pro"
},
"options": {},
"resource": "image",
"simplify": false,
"inputType": "binary",
"operation": "analyze"
},
"credentials": {
"googlePalmApi": {
"id": "zjKI9xCNFxzCZ2SQ",
"name": "Google Gemini(PaLM) Api account 2"
}
},
"retryOnFail": false,
"typeVersion": 1
},
{
"id": "eea30874-a4da-458c-bb39-19bf306fb685",
"name": "Enviar mensaje a un modelo",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
672,
-624
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are a social media assistant. \nI will provide you with structured JSON describing an image. \nYour task is to generate exactly:\n\n1. One short, catchy caption (max 20 words). \n2. Five trending hashtags relevant to the image. \n\nReturn only valid JSON. Do not include explanations, text outside JSON, or code fences.\n\nFormat:\n{\n \"caption\": \"your caption here\",\n \"hashtags\": [\"#tag1\", \"#tag2\", \"#tag3\", \"#tag4\", \"#tag5\"]\n}\n\nHere is the image description:\nobjects:{{ $json.output.objects }}\nsubject:{{ $json.output.subject }}\nColor:{{ $json.output.colors }}\nbackground:{{ $json.output.background }}\nstyle:{{ $json.output.style }}\nmood:{{ $json.output.mood }}\npossible_use_cases:{{ $json.output.possible_use_cases }}"
}
]
}
},
"credentials": {
"googlePalmApi": {
"id": "zjKI9xCNFxzCZ2SQ",
"name": "Google Gemini(PaLM) Api account 2"
}
},
"typeVersion": 1
},
{
"id": "01308a79-aead-4b1e-ad7e-52a26d0cd776",
"name": "Crear Tweet",
"type": "n8n-nodes-base.twitter",
"position": [
2592,
-720
],
"parameters": {
"text": "={{ $('Output_Cleaner').item.json.output.caption }}\n\n{{ $('Output_Cleaner').item.json.output.hashtags }}",
"additionalFields": {
"attachments": "={{ $json.media_id_string }}"
}
},
"credentials": {
"twitterOAuth2Api": {
"id": "LEEVlnrNRYmBi7cB",
"name": "X account"
}
},
"typeVersion": 2
},
{
"id": "5ee71875-8bdc-4b67-8a6c-68f7b4c4130b",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
544,
-1680
],
"parameters": {
"width": 992,
"height": 896,
"content": "# Social Media Bot: AI Captioning, Approval & Auto-Tweet\n\nThis n8n template demonstrates a complete AI-assisted social media workflow. It automatically generates captions and hashtags for product images, allows human approval through Telegram, and posts approved content to Twitter.\n\n## How it works\n\n**Trigger**: A new file in Google Drive starts the workflow.\n\n**File Analysis**: Product details are extracted from the uploaded image.\n\n**AI Captioning**: Gemini generates a caption and 5 suggested hashtags.\n\n**Telegram Approval**: The user receives the image + caption + hashtags and chooses to approve, regenerate, or discard.\n\n✅ Approve → The content is posted on Twitter and a confirmation is sent back on Telegram.\n\n🔄 Regenerate → Gemini creates a new caption + hashtags and sends them again for approval.\n\n❌ Discard → The user is notified on Telegram and the workflow ends.\n\n## Requirements\n\n1. Google Drive account\n\n2. Gemini API credentials (LLM access)\n\n3. Telegram bot for approvals + confirmations\n\n4. Twitter Developer Account & API credentials\n\n## Customising this workflow\n\n- Swap Google Drive with Dropbox, Notion, or Airtable as your source.\n\n- Replace Twitter with LinkedIn, Instagram, or multiple channels at once.\n\n- Expand Telegram approval flow to include team voting or multi-step review."
},
"typeVersion": 1
},
{
"id": "b7ad05f6-6e2a-4446-8e5a-4f25db47f53c",
"name": "Product_Img",
"type": "n8n-nodes-base.googleDrive",
"position": [
-224,
-560
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "url",
"value": "={{ $json.webViewLink }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "sJQdyi6KBJuEPugK",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "da8e463b-fb76-4ff0-9d66-3cef9be9afec",
"name": "Temp_Field",
"type": "n8n-nodes-base.set",
"position": [
224,
-560
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "7df8de54-ae7b-4e8b-bc96-5df4486bfbb9",
"name": "name",
"type": "string",
"value": "={{ $json.candidates[0].content.parts[0].text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "b7cc2b40-2e71-42c4-91cd-2cffd36bb240",
"name": "Formatting_Block",
"type": "n8n-nodes-base.code",
"position": [
448,
-560
],
"parameters": {
"jsCode": "const raw= $('Analyze image').first().json.candidates[0].content.parts[0].text;\n\n// remove code fences if present\nconst cleaned = raw.replace(/```json|```/g, \"\").trim();\n\n// parse JSON\nconst parsed = JSON.parse(cleaned);\n\n// wrap in single key\nreturn {\n output: parsed\n};\n"
},
"typeVersion": 2
},
{
"id": "da917fdf-ad46-451b-808d-c72aca5a5560",
"name": "Output_Cleaner",
"type": "n8n-nodes-base.code",
"position": [
1024,
-624
],
"parameters": {
"jsCode": "const raw = $input.first().json.content.parts[0].text;\n\n// remove code fences if present\nconst cleaned = raw.replace(/```json|```/g, \"\").trim();\n\n// parse JSON\nconst parsed = JSON.parse(cleaned);\n\n// wrap in single key\nreturn {\n output: parsed\n};\n"
},
"typeVersion": 2
},
{
"id": "65dd795d-c099-40b9-bef2-0b07e849bbdd",
"name": "Product_Img_1",
"type": "n8n-nodes-base.googleDrive",
"position": [
1248,
-624
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "url",
"value": "={{ $('Google Drive Trigger').item.json.webViewLink }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "sJQdyi6KBJuEPugK",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "bdd0e1c4-2a5f-4423-8610-4a74815bb5e9",
"name": "Enviar foto",
"type": "n8n-nodes-base.telegram",
"position": [
1472,
-624
],
"webhookId": "2986dec2-1b18-421e-9c88-561ff61d471a",
"parameters": {
"chatId": "8259607814",
"operation": "sendPhoto",
"binaryData": true,
"additionalFields": {
"caption": "Uploaded Photo"
}
},
"credentials": {
"telegramApi": {
"id": "XlRHHnn2TcBwqM5f",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "ce801f5f-7bc4-4ff1-a8f8-3da3dcc1e75f",
"name": "Solicitar aprobación",
"type": "n8n-nodes-base.telegram",
"position": [
1696,
-624
],
"webhookId": "aebad6dd-ff6a-4573-b729-f06aa76699bc",
"parameters": {
"chatId": "8259607814",
"message": "=📢 Image Caption & Hashtags Generated ✅\n\n🖼️ Caption:{{ $('Output_Cleaner').item.json.output.caption }}\n\n🏷️ Hashtags:{{ $('Output_Cleaner').item.json.output.hashtags }}",
"options": {},
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"credentials": {
"telegramApi": {
"id": "XlRHHnn2TcBwqM5f",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "8d6d5354-a999-4323-af58-ac79a9bbc62f",
"name": "Condition_Checker",
"type": "n8n-nodes-base.if",
"position": [
1920,
-624
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "3cc51b44-14da-43d9-8570-589b005b3f6b",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "bbd7ecd7-1053-4f40-bb8b-b2bae814fd13",
"name": "Product_Img2",
"type": "n8n-nodes-base.googleDrive",
"position": [
2144,
-720
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "url",
"value": "={{ $('Google Drive Trigger').item.json.webViewLink }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "sJQdyi6KBJuEPugK",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "ff462794-43e7-4411-b0fa-62e8e914fc27",
"name": "Regenerar/Descartar",
"type": "n8n-nodes-base.telegram",
"position": [
2144,
-528
],
"webhookId": "29f4a690-c04e-4cf0-b7ae-b5a9c8502b31",
"parameters": {
"chatId": "8259607814",
"message": "Confirm whether to regenerate or discard the image and stop the process.",
"options": {
"appendAttribution": false
},
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double",
"approveLabel": "Regenerate",
"disapproveLabel": "Discard"
}
}
},
"credentials": {
"telegramApi": {
"id": "XlRHHnn2TcBwqM5f",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "22a31f1e-955a-4572-a1c0-36e29cae08ba",
"name": "Condition_Checker_1",
"type": "n8n-nodes-base.if",
"position": [
2368,
-464
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "94fb861c-860c-4a15-95f2-7c851ed9554a",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "9a232c21-50a4-4a37-9011-7085ad36bfa0",
"name": "Enviar confirmación",
"type": "n8n-nodes-base.telegram",
"position": [
2816,
-720
],
"webhookId": "d8bef569-650b-4a21-9aa2-8e175e003f37",
"parameters": {
"text": "✅ Your tweet has been successfully posted!",
"chatId": "8259607814",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "XlRHHnn2TcBwqM5f",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "568bd433-fe2c-4419-8b63-07bdfd6d3df7",
"name": "Send_Confirmation1",
"type": "n8n-nodes-base.telegram",
"position": [
2592,
-464
],
"webhookId": "d8bef569-650b-4a21-9aa2-8e175e003f37",
"parameters": {
"text": "🗑️ The image has been discarded successfully.",
"chatId": "8259607814",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "XlRHHnn2TcBwqM5f",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "867b86ec-4366-400a-9830-83418c7c422e",
"name": "Solicitar ID de medio",
"type": "n8n-nodes-base.httpRequest",
"position": [
2368,
-720
],
"parameters": {
"url": "https://upload.twitter.com/1.1/media/upload.json",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "media",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
}
]
},
"nodeCredentialType": "twitterOAuth1Api"
},
"credentials": {
"twitterOAuth1Api": {
"id": "v0Oy6XOVO2zEjeqW",
"name": "X OAuth account"
}
},
"typeVersion": 4.2
},
{
"id": "5b4b11f5-b9d1-4bae-8ac7-4cc864fb5f16",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
2304,
-960
],
"parameters": {
"color": 4,
"height": 208,
"content": "## Request_Media_ID Node\nThis node is used to upload the image to twitter server and this request will return us with a **Media_ID**, which is used to display product image in tweet."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "3483bc19-d761-416e-a66a-1ac717124076",
"connections": {
"bdd0e1c4-2a5f-4423-8610-4a74815bb5e9": {
"main": [
[
{
"node": "ce801f5f-7bc4-4ff1-a8f8-3da3dcc1e75f",
"type": "main",
"index": 0
}
]
]
},
"da8e463b-fb76-4ff0-9d66-3cef9be9afec": {
"main": [
[
{
"node": "b7cc2b40-2e71-42c4-91cd-2cffd36bb240",
"type": "main",
"index": 0
}
]
]
},
"b7ad05f6-6e2a-4446-8e5a-4f25db47f53c": {
"main": [
[
{
"node": "3d0c332a-f6f7-48ab-bfa0-d9c8c7d6b10c",
"type": "main",
"index": 0
}
]
]
},
"01308a79-aead-4b1e-ad7e-52a26d0cd776": {
"main": [
[
{
"node": "9a232c21-50a4-4a37-9011-7085ad36bfa0",
"type": "main",
"index": 0
}
]
]
},
"bbd7ecd7-1053-4f40-bb8b-b2bae814fd13": {
"main": [
[
{
"node": "867b86ec-4366-400a-9830-83418c7c422e",
"type": "main",
"index": 0
}
]
]
},
"3d0c332a-f6f7-48ab-bfa0-d9c8c7d6b10c": {
"main": [
[
{
"node": "da8e463b-fb76-4ff0-9d66-3cef9be9afec",
"type": "main",
"index": 0
}
]
]
},
"65dd795d-c099-40b9-bef2-0b07e849bbdd": {
"main": [
[
{
"node": "bdd0e1c4-2a5f-4423-8610-4a74815bb5e9",
"type": "main",
"index": 0
}
]
]
},
"da917fdf-ad46-451b-808d-c72aca5a5560": {
"main": [
[
{
"node": "65dd795d-c099-40b9-bef2-0b07e849bbdd",
"type": "main",
"index": 0
}
]
]
},
"eea30874-a4da-458c-bb39-19bf306fb685": {
"main": [
[
{
"node": "da917fdf-ad46-451b-808d-c72aca5a5560",
"type": "main",
"index": 0
}
]
]
},
"ce801f5f-7bc4-4ff1-a8f8-3da3dcc1e75f": {
"main": [
[
{
"node": "8d6d5354-a999-4323-af58-ac79a9bbc62f",
"type": "main",
"index": 0
}
]
]
},
"b7cc2b40-2e71-42c4-91cd-2cffd36bb240": {
"main": [
[
{
"node": "eea30874-a4da-458c-bb39-19bf306fb685",
"type": "main",
"index": 0
}
]
]
},
"867b86ec-4366-400a-9830-83418c7c422e": {
"main": [
[
{
"node": "01308a79-aead-4b1e-ad7e-52a26d0cd776",
"type": "main",
"index": 0
}
]
]
},
"8d6d5354-a999-4323-af58-ac79a9bbc62f": {
"main": [
[
{
"node": "bbd7ecd7-1053-4f40-bb8b-b2bae814fd13",
"type": "main",
"index": 0
}
],
[
{
"node": "ff462794-43e7-4411-b0fa-62e8e914fc27",
"type": "main",
"index": 0
}
]
]
},
"ff462794-43e7-4411-b0fa-62e8e914fc27": {
"main": [
[
{
"node": "22a31f1e-955a-4572-a1c0-36e29cae08ba",
"type": "main",
"index": 0
}
]
]
},
"22a31f1e-955a-4572-a1c0-36e29cae08ba": {
"main": [
[
{
"node": "b7cc2b40-2e71-42c4-91cd-2cffd36bb240",
"type": "main",
"index": 0
}
],
[
{
"node": "568bd433-fe2c-4419-8b63-07bdfd6d3df7",
"type": "main",
"index": 0
}
]
]
},
"a6622083-d0bf-4d19-ac94-6483bb7e634f": {
"main": [
[
{
"node": "b7ad05f6-6e2a-4446-8e5a-4f25db47f53c",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Creación de contenido, IA Multimodal
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Ketan Sharma
@ketan1411Compartir este flujo de trabajo