Publicación automática en LinkedIn (con contenido GPT-4o, generación de imágenes + recordatorios de Telegram)

Intermedio

Este es unSocial Media, Multimodal AIflujo de automatización del dominio deautomatización que contiene 7 nodos.Utiliza principalmente nodos como Set, Code, LinkedIn, Telegram, ManualTrigger. Publicación automática en LinkedIn con contenido e imágenes generados por GPT-4o, con recordatorios de Telegram

Requisitos previos
  • Credenciales de API de LinkedIn
  • Bot Token de Telegram
  • Clave de API de OpenAI
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "meta": {
    "instanceId": "559fe524ea9daad79a07a81fd3f64f8e3eeddd635511642951eaee3bf4d5ad7a",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "4a83a2f6-f6ab-4657-ab2a-c5594cc13aa7",
      "name": "make Linkedin post",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        432,
        -48
      ],
      "parameters": {
        "text": "={{ $('Generate Post Content').item.json.message.content.content }}",
        "person": "SKNqCfgpq4",
        "additionalFields": {
          "visibility": "PUBLIC"
        },
        "shareMediaCategory": "IMAGE"
      },
      "credentials": {
        "linkedInOAuth2Api": {
          "id": "VHltapEwLBeLEZ0g",
          "name": "LinkedIn account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "276f682f-15cb-4ecb-93f2-fb07f92603e7",
      "name": "Enviar el estado",
      "type": "n8n-nodes-base.telegram",
      "position": [
        688,
        -48
      ],
      "webhookId": "9373d46a-d5ad-40f4-93c0-7a44ff5fea37",
      "parameters": {
        "text": "=LinkedIn Post Sent Successfully  \n\nTag - {{ $('Get a random Tag').item.json.value }}\n\nURL - https://www.linkedin.com/feed/update/{{ $json.urn }}\n\nPosted At - {{ DateTime.now() }}",
        "chatId": "7281360444",
        "replyMarkup": "inlineKeyboard",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "snxgmnTv52eI8TSD",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "65b044fc-8595-4d00-9bbc-6f67a39a8d05",
      "name": "Al hacer clic en 'Ejecutar flujo de trabajo'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -784,
        -48
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1f6d49f5-4d49-4769-bd4a-2cdb5e28e125",
      "name": "Generar una imagen",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        192,
        -48
      ],
      "parameters": {
        "model": "gpt-image-1",
        "prompt": "={{ $json.message.content.prompt }}",
        "options": {},
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "id": "eXO8FZmhMVDhTRz9",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "1fbd87ae-52ac-48e0-95d1-833ffc885a8b",
      "name": "Obtener una etiqueta aleatoria",
      "type": "n8n-nodes-base.code",
      "position": [
        -560,
        -48
      ],
      "parameters": {
        "jsCode": "const devToTags = [\n  \"llm\",\n  \"ai\",\n  \"devops\",\n  \"cloudnative\",\n  \"observability\",\n  \"automation\",\n  \"opensource\",\n  \"cybersecurity\",\n  \"scalability\"\n];\n\nfunction getRandomValuesAsObjects(list, count) {\n  const randomValues = [];\n  for (let i = 0; i < count; i++) {\n    const randomIndex = Math.floor(Math.random() * list.length);\n    randomValues.push({ json: { value: list[randomIndex] } });\n  }\n  return randomValues;\n}\n\nreturn getRandomValuesAsObjects(devToTags, 1);\n"
      },
      "typeVersion": 2
    },
    {
      "id": "35d5303a-48a9-4b2b-945b-ca929e400553",
      "name": "Agregar ejemplos para definir el estilo de escritura",
      "type": "n8n-nodes-base.set",
      "position": [
        -352,
        -48
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "{\n  \"posts\": [\n  \"Redis is open source YET AGAIN! But does it matter anymore? Here's the story: • 2009: Redis launched as open-source (BSD license). • 2018: Redis Labs introduced RSAL for modules like Redis Search, Graph etc. • 2024: Redis switched to a commercial license, as cloud providers copied Redis code without contributing back. • 2025: Redis is open source again with AGPL v3. But why? Big players like AWS, Google, and Oracle backed the Valkey fork—a fully open-source Redis alternative now under the Linux Foundation. Check out Valkey—\",\n  \"10x Faster Typescript COMPILER!!! Still there is an ongoing debate on why Microsoft didn't choose Rust or their own C# for this rewrite. Although, according to the team, Go was a better choice as it provided a similar structure and seamless transition. Had it been a ground-up rewrite and not a migration, Rust or C# would have been a better choice.\",\n  \"I recently started working on a Teams to Signal messenger bot after realizing that so many people outright hate using MS Teams, but since it's an industry standard, they cannot directly ditch it. My current goal is to support forwarding incoming text messages on Teams to a messenger like Signal. The second will be to give support for the reply mechanism from Signal and sync it to Teams. Coming to the technical stuff, I am thinking of using automation tools like Cypress or Playwright to do this. But it all boils down to the availability of public APIs of both messengers. I will try to document my progress here, as I might fail trying, like a lot of other times 😅 Let's see how it pans out. How would you approach this kind of problem?\",\n    \"Do you know about the require cache in Node.js? Lets say you have a js module that you have imported in a js file using require statement. It is highly possible that after a few iterations to your module code, the changes wont reflect even after you have reloaded the api server/modules. This happens because there is a module cache that happens. You need to invalidate it in order for the new changes to reflect. More on this here -\",\n    \"How important is Out-of-Box experience for an open source contributor? Nowadays I have been working on creating a seamless out-of-box experience for the new contributors of Sparrow API Tool. A poor app setup experience or hard-to-understand README file can be a serious dealbreaker for the community. I am emphasizing on the following things to make the setup as smooth as possible: 1) Created and hosted Docker images for various microservices like api-service and auth-service on DockerHub. 2) Created an all-in-one docker-compose file to set up everything from database to queue service in one command. 3) Created a migration script that generates a test user on app start—bypassing auth flow for instant contribution. 4) Documented multiple setup methods (Docker and non-Docker). 5) Pre-filled example .env files with required variables for copy-paste convenience. Let me know if you have suggestions to improve this further—I’m open to feedback!\"\n]\n}\n",
        "includeOtherFields": true
      },
      "typeVersion": 3.4,
      "alwaysOutputData": false
    },
    {
      "id": "7eaf45b6-e58f-41f5-83e6-ed168f039301",
      "name": "Generar contenido de la publicación",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -160,
        -48
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "id",
          "value": "gpt-4o"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=Role: You are my LinkedIn content assistant. Your job is to write perfectly formatted LinkedIn posts that align with my brand voice, tone, and style (based on provided examples). Each post must revolve around a single keyword/tag and avoid unsupported formatting.\n\nCritical Formatting Rules:\n\nDont use bold, italics or bullets.\n\nWhenever you want to add points, use emojis or simple \"- \" before the start of each pointer \n\nDont use big hyphens that AI usually uses while generating content. Instead use comma(,)\n\nStructure:\n\nAn Engaging Hook\n\nPersonal POV (first-person: \"I’ve seen…\")\n\nInsights (trends/tools/case studies)\n\nClear spacing + new line wherever needed\n\nCTA/question (\"What’s your take?\")\n\nRelavant 4-5 treding hashtags\n\nTrends: \nTie to recent news, tools, or debates (no generic advice).\n\nImage Prompt Rules:\nSuggest an AI image prompt related to the post. Based on the post context, it can be:\n- App interface or UX concept\n- Visual metaphor (e.g. “scaling servers as rocket engines”)\n- Stack or architecture illustration\n- Abstract concept visuals (e.g. speed, chaos, control, balance)\n- Tech-product mockups or feature highlights\n- Flowcharts, only suggest if explaining a process, framework, or system\n\nResponse Format (Strictly JSON):\n```json\n{\n  \"content\": \"<LinkedIn-ready post with proper formatting and no markdown symbols>\",\n  \"prompt\": \"<AI image generation prompt – relevant, visual, descriptive>\"\n}"
            },
            {
              "role": "system",
              "content": "=Examples of my past writings. Use them to align the new post with my brand voice, tone, and style,\n\n{{ $json.posts.join(\"\\n\\n\") }}"
            },
            {
              "content": "=Use this tag to write a new article for Linkedin that follows my brand voice, style of writing, and tone. \nTag: {{ $json.value }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "eXO8FZmhMVDhTRz9",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    }
  ],
  "pinData": {},
  "connections": {
    "1fbd87ae-52ac-48e0-95d1-833ffc885a8b": {
      "main": [
        [
          {
            "node": "35d5303a-48a9-4b2b-945b-ca929e400553",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1f6d49f5-4d49-4769-bd4a-2cdb5e28e125": {
      "main": [
        [
          {
            "node": "4a83a2f6-f6ab-4657-ab2a-c5594cc13aa7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4a83a2f6-f6ab-4657-ab2a-c5594cc13aa7": {
      "main": [
        [
          {
            "node": "276f682f-15cb-4ecb-93f2-fb07f92603e7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7eaf45b6-e58f-41f5-83e6-ed168f039301": {
      "main": [
        [
          {
            "node": "1f6d49f5-4d49-4769-bd4a-2cdb5e28e125",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "35d5303a-48a9-4b2b-945b-ca929e400553": {
      "main": [
        [
          {
            "node": "7eaf45b6-e58f-41f5-83e6-ed168f039301",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "65b044fc-8595-4d00-9bbc-6f67a39a8d05": {
      "main": [
        [
          {
            "node": "1fbd87ae-52ac-48e0-95d1-833ffc885a8b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿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?

Intermedio - Redes sociales, 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.

Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos7
Categoría2
Tipos de nodos6
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor

Hi, I’m Punit a DevOps & Cloud Engineer with a strong focus on automation and workflow orchestration using n8n. I specialize in building robust, scalable workflows that connect APIs, services, and internal tools to automate business processes end-to-end. Whether you need help setting up complex logic, integrating third-party tools, or deploying n8n in production, I’m here to help. Let’s work together to bring your automation ideas to life.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34