8
n8n 中文网amn8n.com

使用AI处理LinkedIn的RSS

高级

这是一个AI, Marketing领域的自动化工作流,包含 43 个节点。主要使用 If, Set, Code, Sort, Limit 等节点,结合人工智能技术实现智能自动化。 使用Gemini AI和RSS源自动化LinkedIn新闻发布

前置要求
  • LinkedIn API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "LC0IcmbjYuCMHZod",
  "meta": {
    "instanceId": "8c2c429dd3943ee62e07d4501247518aac7a4e0ac2348a289df368ce47041939",
    "templateCredsSetupCompleted": true
  },
  "name": "使用AI处理LinkedIn的RSS",
  "tags": [
    {
      "id": "gvVTOTyDYvE5GHF0",
      "name": "autoreboot",
      "createdAt": "2025-05-05T20:28:22.814Z",
      "updatedAt": "2025-05-05T20:28:22.814Z"
    }
  ],
  "nodes": [
    {
      "id": "8b3652a8-6b3c-477d-8636-8fbfe9b3c8c2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -500,
        660
      ],
      "parameters": {
        "text": "={{ $json.prompt}}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "f9bdcc21-02ec-4ad6-afc8-b16b40c6c57e",
      "name": "Google Gemini 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -500,
        860
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.0-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9KMVOu6vEVg8Q1M3",
          "name": "Google Gemini(PaLM) Api CIAP"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7b30aa2a-c6b4-42cc-b714-8c1e6744b4e6",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -3180,
        860
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                2,
                3,
                4,
                0
              ],
              "triggerAtHour": 15
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f8ee49fd-aaab-4366-8b5d-3be59c5a08ca",
      "name": "RSS阅读测试目录",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -2960,
        1060
      ],
      "parameters": {
        "url": "https://www.testingcatalog.com/rss/",
        "options": {
          "ignoreSSL": true
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "a8285394-b8b4-42a4-8be3-45dbfc7ed1e3",
      "name": "日期转换",
      "type": "n8n-nodes-base.set",
      "position": [
        -2520,
        860
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9aec0a09-4b6f-4fca-98e6-789abd5fdc51",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "56277e54-31a0-4804-ad23-c9ee6d244641",
              "name": "content",
              "type": "string",
              "value": "={{ $json.contentSnippet }}"
            },
            {
              "id": "a3586a80-588e-42d1-9780-370a956ddf6b",
              "name": "link",
              "type": "string",
              "value": "={{ $json.link }}"
            },
            {
              "id": "58f01618-8014-4685-9192-d15d596ffcd9",
              "name": "timestampDate",
              "type": "number",
              "value": "={{ new Date($json.isoDate).getTime() }}"
            },
            {
              "id": "716bb078-8df3-4d96-8a1b-4aec4f8cf206",
              "name": "categories",
              "type": "array",
              "value": "={{ $json.categories }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5c5392e3-65d9-44f6-b4f2-03bfb6c5ba49",
      "name": "按日期筛选(超过7天)",
      "type": "n8n-nodes-base.filter",
      "position": [
        -2300,
        780
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e7cf09fb-af35-495d-a840-341f8d0ddcd8",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.timestampDate}}",
              "rightValue": "={{ Date.now() - 7 * 24 * 60 * 60 * 1000 }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "db4bedbb-c84e-4acb-83dc-fbb97ca6c2ca",
      "name": "按日期排序",
      "type": "n8n-nodes-base.sort",
      "position": [
        -2080,
        780
      ],
      "parameters": {
        "options": {},
        "sortFieldsUi": {
          "sortField": [
            {
              "order": "descending",
              "fieldName": "timestampDate"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4842aae7-e5f3-4fcb-8b47-eac954182cde",
      "name": "限制新闻数量为x",
      "type": "n8n-nodes-base.limit",
      "position": [
        -1860,
        780
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f9a0b527-30b3-4f65-8845-b1ae584d7b76",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2740,
        860
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3
    },
    {
      "id": "1e26c489-cfe1-4b36-9071-4d41bbe1a82a",
      "name": "RSS阅读marktechpost",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -2960,
        860
      ],
      "parameters": {
        "url": "https://www.marktechpost.com/feed/",
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "44b400c2-6404-488b-8d84-e24cf66445ee",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3060,
        540
      ],
      "parameters": {
        "color": 4,
        "width": 500,
        "height": 660,
        "content": "## RSS来源"
      },
      "typeVersion": 1
    },
    {
      "id": "cd5c4246-01f9-434a-8b38-9514e4e5b0d4",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2340,
        520
      ],
      "parameters": {
        "color": 5,
        "width": 640,
        "height": 420,
        "content": "## 新闻时效性与数量"
      },
      "typeVersion": 1
    },
    {
      "id": "bd10d075-b967-4633-9ba2-25dbf0b2869e",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1520,
        640
      ],
      "parameters": {
        "text": "=Analyze the news article below. Identify and summarize these elements: core innovation, main goal, problem addressed, benefits, context, significance, key entities. For each element, output one line in plain text using a hyphen, the element name, a colon, and the description. Do not use any markdown formatting, bold, italics, or nested lists. Return only the list.\n\nTitle: {{ $json.title }}\nContent: {{ $json.content }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "ab1c0a4d-01e8-4100-a62a-886587526299",
      "name": "Google Gemini聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1520,
        840
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.0-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9KMVOu6vEVg8Q1M3",
          "name": "Google Gemini(PaLM) Api CIAP"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e76371ee-84cc-41f0-8959-7d0741354ffa",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1620,
        440
      ],
      "parameters": {
        "color": 3,
        "width": 680,
        "height": 560,
        "content": "# AI阶段:使用Gemini API"
      },
      "typeVersion": 1
    },
    {
      "id": "24a564ad-32d3-42b9-aaca-4c9d8d77fb46",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        440
      ],
      "parameters": {
        "color": 3,
        "width": 680,
        "height": 560,
        "content": "# AI阶段:使用Gemini API"
      },
      "typeVersion": 1
    },
    {
      "id": "0092b8e8-c0d3-4d9c-a790-8617e93e43db",
      "name": "信息",
      "type": "n8n-nodes-base.merge",
      "position": [
        -160,
        180
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition",
        "numberInputs": 3
      },
      "typeVersion": 3.1
    },
    {
      "id": "a57550da-78ec-4d54-a416-622859ed017d",
      "name": "信息2",
      "type": "n8n-nodes-base.set",
      "position": [
        -1700,
        180
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a87eedc7-035a-4672-8f4b-025603473aa0",
              "name": "Enlace",
              "type": "string",
              "value": "={{ $json.link }}"
            },
            {
              "id": "586747c1-cdde-46b2-b504-50721e22c7e1",
              "name": "Fecha_sinFormato",
              "type": "string",
              "value": "={{ $json.timestampDate}}"
            },
            {
              "id": "891b44a6-7e36-4bfc-97c2-73defa2e4aef",
              "name": "Titulo_original",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "0549ed91-6247-45d7-b165-c7ece53accc9",
              "name": "Contenido",
              "type": "string",
              "value": "={{ $json.content }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7876cd0d-cc88-4912-815c-c43ea2d25448",
      "name": "信息3",
      "type": "n8n-nodes-base.set",
      "position": [
        -1360,
        1240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "341ed383-56fc-4ebb-a76a-3c5ad97da091",
              "name": "Categorias",
              "type": "string",
              "value": "={{ $json.categories }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6ce78f24-fa0d-4843-b9e2-6321beb262ff",
      "name": "代码1",
      "type": "n8n-nodes-base.code",
      "position": [
        -700,
        660
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Accede a los datos del merge\nconst analysis = $json.output.trim();\nconst categories = JSON.parse($json.Categorias);\n\n// Construye el prompt de ingeniería avanzada\nconst prompt = `Based on the analysis: ${analysis} and these categories: ${categories.join(', ')}, select the most relevant keywords to convert into LinkedIn hashtags. Choose only those closely related to the topic, popular within the AI community, innovative, and attention-grabbing. Generate five hashtags minimum. Return only the list of hashtags formatted with “#” and separated by commas, with no additional text or line breaks. Example: #AI, #Langchain, #ModelContextProtocols.`;\n\n// Devuelve el prompt para usarlo en el siguiente nodo\nreturn { prompt };"
      },
      "typeVersion": 2
    },
    {
      "id": "025824b0-92b1-4fef-896e-ed659a31259c",
      "name": "信息1",
      "type": "n8n-nodes-base.merge",
      "position": [
        -880,
        660
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1
    },
    {
      "id": "3f479d20-69eb-42f1-9de3-94fafe0cfea9",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        -800,
        300
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "516a13eb-fd6d-4524-870f-937bd0c8a4ec",
              "name": "Analisis",
              "type": "string",
              "value": "={{ $json.output }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "466fb541-3a67-422e-94cc-79ff7aa564a1",
      "name": "LinkedIn",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        3080,
        260
      ],
      "parameters": {
        "text": "={{ $('AI Agent2').item.json.output }}",
        "postAs": "organization",
        "organization": "=89339025",
        "authentication": "communityManagement",
        "additionalFields": {},
        "shareMediaCategory": "IMAGE"
      },
      "credentials": {
        "linkedInCommunityManagementOAuth2Api": {
          "id": "1Wx2ujF9qglMVHJi",
          "name": "LinkedIn Community Management account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b65ea250-f029-43c8-9aa2-4da538b468c5",
      "name": "便签说明5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2860,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 540,
        "content": "# 阶段:LinkedIn发布"
      },
      "typeVersion": 1
    },
    {
      "id": "7e668a0d-99fa-42f4-9609-cad6a02b844c",
      "name": "便签 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3540,
        0
      ],
      "parameters": {
        "color": 2,
        "width": 900,
        "height": 540,
        "content": "# 二维码生成"
      },
      "typeVersion": 1
    },
    {
      "id": "afa9677c-283e-45c7-817c-98ef5147bab9",
      "name": "转换为LinkedIn链接",
      "type": "n8n-nodes-base.set",
      "position": [
        3620,
        260
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"link\": \"https://www.linkedin.com/feed/update/{{ $json.urn }}\"\n} "
      },
      "typeVersion": 3.4
    },
    {
      "id": "25a8647e-093e-4f95-bdcc-002b36d52704",
      "name": "生成二维码",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3920,
        260
      ],
      "parameters": {
        "url": "https://api.qrserver.com/v1/create-qr-code/",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "data",
              "value": "={{ $json.link }}"
            },
            {
              "name": "size",
              "value": "300x300"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1f482175-4527-44d7-899b-c59ffcf0dd33",
      "name": "写入文件",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        4200,
        260
      ],
      "parameters": {
        "options": {},
        "fileName": "qr.png"
      },
      "typeVersion": 1
    },
    {
      "id": "9f2f06d6-c200-43c9-87ca-3bac64f6a752",
      "name": "转换为文件",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        2500,
        260
      ],
      "parameters": {
        "options": {},
        "operation": "toBinary",
        "sourceProperty": "candidates[0].content.parts[0].inlineData.data"
      },
      "typeVersion": 1.1
    },
    {
      "id": "7e842770-c617-4adc-a0cd-e0c6295d2e2e",
      "name": "便签10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 680,
        "height": 540,
        "content": "# AI阶段:图像生成"
      },
      "typeVersion": 1
    },
    {
      "id": "0f7f43ab-c827-43fe-9daf-f6b659fb060f",
      "name": "图像生成1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2220,
        260
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp-image-generation:generateContent",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"contents\": [\n    {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"text\": \"{{ $json.output.slice(0, -2) }}\"\n        }\n      ]\n    }\n  ],\n  \"generationConfig\": {\n    \"responseModalities\": [\"Text\", \"Image\"]\n  }\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googlePalmApi"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "4oDRxTpOIr5AefZt",
          "name": "Google Gemini(PaLM) Api account 2"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "559ade49-80f1-4fab-9388-bbd32d1cdca0",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3940,
        600
      ],
      "parameters": {
        "columns": {
          "value": {
            "Title": "={{ $('Information').item.json.Titulo_original }}",
            "Link_pub": "={{ $json.link }}",
            "Link_raw": "={{ $('Information').item.json.Enlace }}"
          },
          "schema": [
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Link_raw",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Link_raw",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Link_pub",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Link_pub",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/13Q6dJDpnuQBYiPvXRWElkhKT0c7MvfmeDmG8Gbz-1Cs/edit#gid=0",
          "cachedResultName": "Hoja 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/13Q6dJDpnuQBYiPvXRWElkhKT0c7MvfmeDmG8Gbz-1Cs/edit?usp=sharing"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "gHDZ1bBcTv3KGueR",
          "name": "Google Sheets account 2"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "63b9cc44-abac-4a07-8a7b-4e7809af1cc6",
      "name": "Google Sheets1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        40,
        180
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.Enlace }}",
              "lookupColumn": "Link_raw"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/13Q6dJDpnuQBYiPvXRWElkhKT0c7MvfmeDmG8Gbz-1Cs/edit#gid=0",
          "cachedResultName": "Hoja 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/13Q6dJDpnuQBYiPvXRWElkhKT0c7MvfmeDmG8Gbz-1Cs/edit?usp=sharing"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "gHDZ1bBcTv3KGueR",
          "name": "Google Sheets account 2"
        }
      },
      "typeVersion": 4.5,
      "alwaysOutputData": true
    },
    {
      "id": "937c68b8-9f9a-46bc-89ca-966c638e1f68",
      "name": "如果存在",
      "type": "n8n-nodes-base.if",
      "position": [
        240,
        180
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "04a473df-24f7-4dd6-aa55-0960263caa71",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.Link_raw }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "68c4d695-bad7-41e4-b88a-fbd5d8cb0867",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        600,
        200
      ],
      "parameters": {
        "jsCode": "// Acceder a todas las entradas fusionadas del nodo \"Information\" (Merge)\nconst outputs = $('Information').all();  // Accede a todas las salidas fusionadas\n\n// Extraer la información de la noticia desde la primera entrada (índice 0)\nconst informacion = outputs[0].json[\"Contenido\"] || \"No disponible\";  // Información (noticia)\n\n// Extraer los hashtags desde la tercera entrada (índice 2)\nconst hashtags = outputs[0].json[\"output\"] || \"No disponibles\";  // Hashtags\n\n// Extraer los datos adicionales de la tercera entrada (índice 2)\nconst enlace = outputs[0].json[\"Enlace\"] || \"No disponible\";  // Enlace\nconst titulo_original = outputs[0].json[\"Titulo_original\"] || \"No disponible\";  // Título original\nconst analisis = outputs[0].json[\"Analisis\"] || \"No disponible\";  // Análisis\n\n// Construir el prompt final con toda la información y estructura requerida\nconst prompt = `\n\nYour Input Fields:\n- News Title: ${titulo_original}\n- News Content: ${informacion}\n- News Analysis: ${analisis}\n- Suggested Hashtags: ${hashtags}\n- Article Link: ${enlace}\n\nPost Structure:\n1. Attractive title with emoji: create a catchy title using a relevant emoji (for example, 🚀, 💡, 🔍). The title should be concise and appropriate for LinkedIn, but it should not be the same as the news title. Make it appealing to grab the readers' attention.\n\n2. Initial summary (max. 3 lines): write a clear and direct summary that introduces the core of the news. Use professional, simple language. Avoid unnecessary technical terms.\n\n3. Relevance of the Advancement (mandatory, 3 bullet points exactly): emphasize the potential impact of the advancement and how it could shape future developments. Avoid repeating information already presented in the title or summary. This section is the most persuasive part of the post, so it must be compelling and informative. Do not use hashtags or similar elements in the opening question or bullet points. \n\n- Opening question: the opening question should introduce the significance of the advancement and prompt curiosity, directly tying it to the topic and analysis of the news. This question should smoothly lead into the 3 key points. Ensureis not too long. Ensure the opening question are shorter than a line and concise. \n\n- Bullet points: provide context (AI, science, industry, etc.) and explain its significance. Capture attention by illustrating the benefits, implications, or future potential of the advancement. Ensure the bullet points are shorter than a line and concise, avoiding excessive detail. You can use emojis if necessary, but avoid overusing them.\n\n4. Call to Action (CTA – topic-related): end the post with a short, clever question or comment directly related to the topic. It must encourage reflection or interaction. Place it as the final line, after the article link\n\n5. Link to full article: add this line right before the closing *conoce más de esta noticia en el artículo completo: ${enlace}*\n\n6. Hashtags: choose 5 to 7 hashtags from the provided list. Include only those highly relevant to the topic and professional community.\n`;\n\n// Retornar solo el prompt\nreturn { \"prompt\": prompt };"
      },
      "typeVersion": 2
    },
    {
      "id": "879ad0d7-6c0e-481d-b203-5637ef6cd580",
      "name": "AI 智能体2",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        820,
        200
      ],
      "parameters": {
        "text": "={{ $json.prompt }}",
        "options": {
          "systemMessage": "=You are a professional content creator preparing a LinkedIn post in Spanish based on the news provided. The post must be concise (approx. 1200 characters), visually structured, and written in a professional and accessible tone. Follow the format and constraints below exactly."
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "99792b7b-919f-42d2-9ac4-75f4512e5eaf",
      "name": "Google Gemini聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        820,
        380
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.0-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9KMVOu6vEVg8Q1M3",
          "name": "Google Gemini(PaLM) Api CIAP"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d145c813-7366-45f4-b35c-1606c5323277",
      "name": "便签说明4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        520,
        20
      ],
      "parameters": {
        "color": 3,
        "width": 680,
        "height": 540,
        "content": "# AI阶段:使用Gemini API"
      },
      "typeVersion": 1
    },
    {
      "id": "aa78a09e-53a2-45ca-8603-7ab8d2071c0c",
      "name": "AI代理4",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1620,
        220
      ],
      "parameters": {
        "text": "=Create a prompt that generates only one response with no comments and no line breaks: a clean professional image for a LinkedIn news post based on the following news {{ $json.text }}. Ensure it reflects the core message conveying trust innovation and professionalism with space for overlay text. Do not use quotation marks, apostrophes, or any other punctuation marks.",
        "options": {
          "systemMessage": "=1. Title Placement: place the provided title in Spanish at the upper center of the image. The title must be legible and appropriately sized. It should integrate smoothly into the design without overpowering other visual elements. Ensure it clearly reflects the core message of the news without disrupting the overall balance.\n\n2. Color Palette: choose a color palette that aligns with the theme of the news. Use colors that enhance the core message—such as blue or gray for technology or business, earth tones for sustainability, or neutral tones for leadership. The colors should work together harmoniously, supporting the message without causing distractions or overwhelming the design.\n\n3. Core Message Visualization: visualize the core message through minimalistic and relevant visuals. Use abstract symbols, icons, or relevant imagery that represent the key concepts of the article, ensuring the visuals enhance the message. Avoid overcrowding the design, maintaining a professional, clean appearance.\n\n4. Overlay Text Space: ensure clear space for overlay text (e.g., subtitles or keywords). The text should be legible, well-integrated into the design, and should not obscure important visual elements or the main message. The design should be balanced and allow the text to enhance the image, not overpower it.\n\n5. Composition: maintain a minimalist, balanced composition that adheres to LinkedIn’s professional standards. All elements—title, visuals, and text—should work harmoniously together. Ensure that nothing feels cluttered, and the layout directs the viewer’s attention in a clear, logical flow. The design should feel polished and professional.\n\n6. Output Format: the image must be designed to fit LinkedIn’s standard post dimensions. Ensure the resolution is high enough for clarity and sharpness across both desktop and mobile devices, maintaining high visual quality while fitting LinkedIn’s specifications.\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "5e15478c-cef0-4f33-ad76-5ac9e4970680",
      "name": "Google Gemini聊天模型4",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1620,
        420
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.0-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9KMVOu6vEVg8Q1M3",
          "name": "Google Gemini(PaLM) Api CIAP"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "68fd37f9-c871-410a-b533-9da3d5599d40",
      "name": "便签 9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1340,
        -20
      ],
      "parameters": {
        "width": 640,
        "height": 600,
        "content": "# AI阶段:图像提示词"
      },
      "typeVersion": 1
    },
    {
      "id": "83afd162-9160-4a0e-8ac4-deee4e65690c",
      "name": "新闻内容清理1",
      "type": "n8n-nodes-base.code",
      "position": [
        1400,
        220
      ],
      "parameters": {
        "jsCode": "let texto = $input.first().json.output\n  .replace(/[\\n\\r\\t]/g, \" \")  // Reemplaza saltos de línea, retorno de carro y tabulaciones por espacio\n  .replace(/['\"\\\\]/g, \"\")      // Elimina comillas simples, dobles y barras invertidas\n  .replace(/\\s+/g, \" \")        // Reemplaza múltiples espacios por un solo espacio\n  .trim();                     // Elimina los espacios en blanco al inicio y al final\n\nreturn {\n  text: texto\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "93bae040-4a3b-415d-80d6-fd3c8dac97a3",
      "name": "RSS LatinxinAI",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -2960,
        660
      ],
      "parameters": {
        "url": "https://medium.com/feed/latinxinai",
        "options": {}
      },
      "typeVersion": 1.1
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "timezone": "America/Guayaquil",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "e0a1c8c3-bece-4ab6-ae4f-cd83e486d413",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "AI Agent2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Transform date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Information",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "LinkedIn": {
      "main": [
        [
          {
            "node": "Conversión a enlace de LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Information1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent2": {
      "main": [
        [
          {
            "node": "Limpieza de contenido de Noticia1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent4": {
      "main": [
        [
          {
            "node": "Generación de Imagen1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If exists": {
      "main": [
        [],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generar QR": {
      "main": [
        [
          {
            "node": "Escribir archivo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Information",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Information": {
      "main": [
        [
          {
            "node": "Google Sheets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information1": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information2": {
      "main": [
        [
          {
            "node": "Information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information3": {
      "main": [
        [
          {
            "node": "Information1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Sort by date": {
      "main": [
        [
          {
            "node": "Limit news to x",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        []
      ]
    },
    "Google Sheets1": {
      "main": [
        [
          {
            "node": "If exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS LatinxinAI": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform date": {
      "main": [
        [
          {
            "node": "Filter by date (more than 7 days)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit news to x": {
      "main": [
        [
          {
            "node": "Information2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Information3",
            "type": "main",
            "index": 0
          },
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "RSS Read Testing Catalog",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Read marktechpost",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS LatinxinAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read marktechpost": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Generación de Imagen1": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read Testing Catalog": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent2",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Conversión a enlace de LinkedIn": {
      "main": [
        [
          {
            "node": "Generar QR",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by date (more than 7 days)": {
      "main": [
        [
          {
            "node": "Sort by date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limpieza de contenido de Noticia1": {
      "main": [
        [
          {
            "node": "AI Agent4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 人工智能, 营销

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量43
分类2
节点类型17
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Club de Inteligencia Artificial Politécnico CIAP

Club de Inteligencia Artificial Politécnico CIAP

@ciap
外部链接
在 n8n.io 查看

分享此工作流