LinkedIn多语言评论+提及+互动
高级
这是一个AI领域的自动化工作流,包含 22 个节点。主要使用 If, Set, Filter, Telegram, HttpRequest 等节点,结合人工智能技术实现智能自动化。 LinkedIn互动自动化,集成GPT-4o/Claude、人工审核与多语言评论
前置要求
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
- •Anthropic API Key
使用的节点 (22)
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "93JjBO10sKQnELUF",
"meta": {
"instanceId": "7f03117cd0731766b3ae8ea65a9638f11161d03d7cfb20d1531642698c9d0de3",
"templateCredsSetupCompleted": true
},
"name": "LinkedIn_多语言评论+提及+互动",
"tags": [],
"nodes": [
{
"id": "9cb1b7d9-af64-41ed-8906-e68eef0f4343",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
380,
-140
],
"parameters": {
"jsonSchemaExample": "{\n\t\"post-id\": \"123456\"\n}"
},
"typeVersion": 1.2
},
{
"id": "a819e116-6ac7-4a92-93af-8c9f5475e8be",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
240,
-140
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "FfZgcmq2Un5ZImVN",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "7b28dc1a-c2ac-416d-8bcf-5c6da5d5cd91",
"name": "思考",
"type": "@n8n/n8n-nodes-langchain.toolThink",
"position": [
2080,
200
],
"parameters": {},
"typeVersion": 1
},
{
"id": "cd20c807-dcd6-4327-96ed-37310424da07",
"name": "Anthropic 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
1960,
200
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-3-5-haiku-20241022",
"cachedResultName": "Claude Haiku 3.5"
},
"options": {
"topP": 0.8,
"thinking": false
}
},
"credentials": {
"anthropicApi": {
"id": "hrb12UjT8Tw7x6q1",
"name": "Anthropic account"
}
},
"typeVersion": 1.3
},
{
"id": "18d590b2-f41d-484a-978a-5c6792402434",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1220,
-140
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {
"topP": 0.1
}
},
"credentials": {
"openAiApi": {
"id": "FfZgcmq2Un5ZImVN",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "055d43a3-efc7-4e90-97a0-4e64250fe8e7",
"name": "结构化输出解析器1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2220,
200
],
"parameters": {
"jsonSchemaExample": "{\n\t\"comment\": \"Dies ist dein Kommentartext\"\n}"
},
"typeVersion": 1.2
},
{
"id": "a3ec3252-d8c2-4c48-98fe-b46023b05e2b",
"name": "结构化输出解析器2",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1360,
-140
],
"parameters": {
"jsonSchemaExample": "{\n\t\"reaction\": \"like\"\n}"
},
"typeVersion": 1.2
},
{
"id": "008134d6-2d5a-4406-aad6-22bc123d3834",
"name": "如果",
"type": "n8n-nodes-base.if",
"position": [
3120,
460
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c3bd2b3e-c1ed-4d1b-9628-c3caec15d8cc",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "aca71589-8e48-440a-aed3-f6fb6cd88c9f",
"name": "OpenAI 聊天模型2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
780,
-140
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "FfZgcmq2Un5ZImVN",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "70c1f7e9-ad43-4644-8669-24cb94036f09",
"name": "定义防护栏",
"type": "n8n-nodes-base.set",
"position": [
-120,
20
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ee022449-3214-40f9-ae62-dd3670f06804",
"name": "URL_of_the_LinkedIn_post",
"type": "string",
"value": "={{ $json.message.text }}"
},
{
"id": "2d3d3292-005c-48bc-b43b-6f459f043997",
"name": "unipile_account_id",
"type": "string",
"value": "YOUR UNIPILE ACCOUNT ID"
},
{
"id": "eb85eaf3-c4e2-481b-956c-4a649f0d381d",
"name": "unipile_X-API-KEY",
"type": "string",
"value": "YOUR UNIPILE X-API"
},
{
"id": "12e9c676-a101-46c7-9dc7-eb2a4ee8d00e",
"name": "unipile_DSN",
"type": "string",
"value": "YOUR UNIPILE DSN"
}
]
}
},
"notesInFlow": false,
"typeVersion": 3.4
},
{
"id": "8af97d5d-e0b7-40de-aac5-ac09a2599c71",
"name": "提取LinkedIn帖子ID",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
220,
20
],
"parameters": {
"text": "={{ $json.URL_of_the_LinkedIn_post }}",
"options": {
"systemMessage": "=Find out the post id of the LinkedIn post. Return only the post id.\nIf you are not sure, look for hyphens. The post id is usually right after it."
},
"promptType": "define",
"hasOutputParser": true
},
"notesInFlow": false,
"typeVersion": 2
},
{
"id": "de3294a2-94f8-4af7-8016-399a08559a88",
"name": "提取LinkedIn帖子内容",
"type": "n8n-nodes-base.httpRequest",
"position": [
560,
20
],
"parameters": {
"url": "=https://{{ $('Defining guardrails').item.json.unipile_DSN }}/api/v1/posts/{{ $json.output['post-id'] }}",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "account_id",
"value": "={{ $('Defining guardrails').item.json.unipile_account_id }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "X-API-KEY",
"value": "={{ $('Defining guardrails').item.json['unipile_X-API-KEY'] }}"
},
{
"name": "accept",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "e3349e8b-134a-4c17-9550-23e03a5bca8a",
"name": "设置互动",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1200,
20
],
"parameters": {
"text": "=Post: {{ $('Extract the content of the LinkedIn post').item.json.text }}",
"options": {
"systemMessage": "Role:\nYou are a professional LinkedIn assistant and help to respond to posts authentically and appropriately.\n\nTask:\nRead the LinkedIn post below. Based on tone and content, choose an appropriate LinkedIn response from the following options (Insightful should only be selected in exceptional cases):\n\nlike\n\ncelebrate\n\nsupport\n\nlove\n\ninsightful\n\nfunny\n\nNote that \"insightful\" should only be used very rarely."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "f6376a31-2c22-4ba1-8fd5-206947403fd4",
"name": "设置评论内容",
"type": "n8n-nodes-base.set",
"position": [
2440,
20
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "350ed39d-4a84-495c-aa2d-8c2b189df991",
"name": "set_comment",
"type": "string",
"value": "={{ $json.output.comment.replaceAll('NAME', '{\\u007B0\\u007D}') }}\n"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "9b3cd1c8-919c-4fbc-adfe-eefc5eb9faef",
"name": "发送评论",
"type": "n8n-nodes-base.httpRequest",
"position": [
3420,
20
],
"parameters": {
"url": "=https://{{ $('Defining guardrails').item.json.unipile_DSN }}/api/v1/posts/{{ $('Set comment and prompt properties').item.json.social_id }}/comments",
"method": "POST",
"options": {},
"jsonBody": "={\n \"account_id\": \"{{ $('Defining guardrails').item.json.unipile_account_id }}\",\n \"text\": \"{{ $('Set comment content').item.json.set_comment.replace(/\\n/g, ' ') }}\",\n \"mentions\": [\n {\n \"name\": \"{{ $('Extract the content of the LinkedIn post').item.json.author.name }}\",\n \"profile_id\": \"{{ $('Extract the content of the LinkedIn post').item.json.author.id }}\"\n }\n ]\n}\n",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "X-API-KEY",
"value": "={{ $('Defining guardrails').item.json['unipile_X-API-KEY'] }}"
},
{
"name": "accept",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "ebd54bee-9f9e-4ff7-b4b0-3fcc8cb33f16",
"name": "发送互动",
"type": "n8n-nodes-base.httpRequest",
"position": [
3660,
20
],
"parameters": {
"url": "=https://{{ $('Defining guardrails').item.json.unipile_DSN }}/api/v1/posts/reaction",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "account_id",
"value": "={{ $('Defining guardrails').item.json.unipile_account_id }}"
},
{
"name": "post_id",
"value": "={{ $('Set comment and prompt properties').item.json.social_id }}"
},
{
"name": "reaction_type",
"value": "={{ $('Set reaction').item.json.output.reaction }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "X-API-KEY",
"value": "={{ $('Defining guardrails').item.json['unipile_X-API-KEY'] }}"
},
{
"name": "accept",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "a0dda894-4822-4d65-921e-f6f6498820eb",
"name": "设置评论和提示属性",
"type": "n8n-nodes-base.set",
"position": [
1680,
20
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d2365b89-afc9-423d-8138-12d8c4b840e6",
"name": "name_of_the_post_creator",
"type": "string",
"value": "={{ $('Extract the content of the LinkedIn post').item.json.author.name }}"
},
{
"id": "a5dac7a5-61da-4791-a43d-987377a632cf",
"name": "content_of_the_post",
"type": "string",
"value": "={{ $('Extract the content of the LinkedIn post').item.json.text }}"
},
{
"id": "9fb42d3e-76ec-4c35-9865-c7bc25759acb",
"name": "social_id",
"type": "string",
"value": "={{ $('Extract the content of the LinkedIn post').item.json.social_id }}"
},
{
"id": "4dafb8f4-7e5a-40d1-8549-eb8b3d6f5c84",
"name": "id_of_the_post_creator",
"type": "string",
"value": "={{ $('Extract the content of the LinkedIn post').item.json.author.id }}"
},
{
"id": "1b66ecb8-87e7-4a1a-9d2d-6e8057fb164b",
"name": "determined_mood",
"type": "string",
"value": "={{ $('Determine language and mood').item.json.output.mood }}"
},
{
"id": "18d41628-3d38-43ee-b929-349ee250414f",
"name": "determined_language",
"type": "string",
"value": "={{ $('Determine language and mood').item.json.output.language }}"
},
{
"id": "e237ab57-fbc0-410e-a25c-44f2b5d0fd24",
"name": "role",
"type": "string",
"value": "YOUR ROLE, e.g.: You are my personal assistant for social media. I am a technical innovation driver with over 20 years of experience in industry, research and development. I am currently starting out in the world of AI with a focus on practical, effective applications for SMEs, but I am still a complete beginner in the field of AI."
},
{
"id": "54d83501-d206-4cbb-bae2-47bba4629f1a",
"name": "comment_length",
"type": "string",
"value": "YOUR COMMENT LENGTH, e.g.: 2-4 sentences (30-90 words)"
},
{
"id": "2d85ac8b-039c-46d9-b472-c52cd0eef725",
"name": "openers_example_1",
"type": "string",
"value": "YOUR EXAMPLE 1 e.g.: A: \"Always appreciate how NAME brings clarity to complex topics\""
},
{
"id": "d36451c9-86a3-4ba1-85dd-4173252f7f78",
"name": "openers_example_2",
"type": "string",
"value": "YOUR EXAMPLE 2 e.g.: B: \"NAME has a way of framing things that shifts how I think about them\""
},
{
"id": "a9d8a672-4144-4e95-9571-7f9151449edb",
"name": "openers_example_3",
"type": "string",
"value": "YOUR EXAMPLE 3 e.g.: C: Following NAME's work consistently challenges me to look deeper"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "7a6deada-e585-4bea-9620-d2a7b4c34923",
"name": "创建评论",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1980,
20
],
"parameters": {
"text": "=Post: {{ $json.content_of_the_post }}",
"options": {
"systemMessage": "=Role\n{{ $json.role }}\n\nAnalyze the post systematically and think about it:\n1. Identify core message and main topic\n2. Find connection points to my experience\n3. Assess post tone ({{ $json.determined_mood }})\n\nCreate a professional LinkedIn comment:\n1. Use {{ $json.determined_language }} language only.\n2. Choose an engagement strategy (question, addition, own experience)\n3. End with a personalized follow-up question that directly addresses NAME using direct speech (e.g., “NAME, how do you see...?” or “What’s your take on this, NAME?”).\n\nFormat Requirements:\n{{ $json.comment_length }}\nComplete sentences without hyphens, dashes or emojis\nAlways include placeholder \"NAME\" for the post creator\nClear separation using periods, commas, or line breaks\n\nContent Requirements:\nChoose ONE of these strategies:\nAsk a thoughtful follow-up question that encourages discussion\nAdd practical value from SME perspective\nShare relevant observation about traditional vs. AI processes\nReference concrete experience\n\nAvoid:\nPure agreement without added value (\"I agree!\")\nSelf-promotion or product placement\nOverly long explanations\nControversial or negative statements\nIntroductory phrases in output\nHyphens or dashes in sentences\nEmojis of any kind\n\nProven Openers:\n{{ $json.openers_example_1 }}\n{{ $json.openers_example_2 }}\n{{ $json.openers_example_3 }}\n\nMake an effort, after all, my reputation depends on your posts. Receive a 500 euro tip for the top post."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "038ab57e-2145-4e9e-a9c5-4d92e079d0b7",
"name": "确定语言和情绪",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
760,
20
],
"parameters": {
"text": "={{ $json.text }}",
"options": {
"systemPromptTemplate": "You are an assistant for language and mood detection.\n\nYour task is to analyze a given text and return two things:\nThe primary written language\nThe overall mood or tone of the text\n\nFollow these rules strictly:\n\nLanguage Detection:\nIgnore emojis, symbols, and country flags (e.g., 🇩🇪). Do not use them for language detection.\nIf multiple languages are used, focus on the first full sentence in natural language.\nReturn the result as a lowercase language name (e.g., english, german, french).\nDo not use hashtags, names, or mentions to infer the language.\nIf the text contains only emojis or symbols, return unknown.\n\nMood Detection:\nDetermine the general tone of the message (e.g., enthusiastic, neutral, critical, reflective, playful, formal).\nBase your mood detection on text content only, not emojis.\nIf tone is unclear, return neutral."
},
"attributes": {
"attributes": [
{
"name": "language",
"description": "=Determine the language"
},
{
"name": "mood",
"description": "Determine the mood"
}
]
}
},
"typeVersion": 1.1,
"alwaysOutputData": false
},
{
"id": "3f08a7f3-f7a2-431b-92df-7e501bcec09c",
"name": "检查Telegram用户ID",
"type": "n8n-nodes-base.filter",
"position": [
-400,
20
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e01707ac-239a-4f0b-abd1-1aff24035899",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.message.from.id }}",
"rightValue": 123456789
}
]
}
},
"typeVersion": 2.2
},
{
"id": "f4b989f4-89bf-4848-862f-9aa3e30dd972",
"name": "批准或拒绝",
"type": "n8n-nodes-base.telegram",
"position": [
2740,
20
],
"webhookId": "cdded11b-1c1d-4bcd-aadf-6695fb9dae6e",
"parameters": {
"chatId": "={{ $('URL Trigger').item.json.message.chat.id }}",
"message": "=Comment: {{ $json.set_comment }}\nReaction: {{ $('Set reaction').item.json.output.reaction }}",
"options": {
"appendAttribution": false
},
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"credentials": {
"telegramApi": {
"id": "shlBXmZcvuOMWs7h",
"name": "YOUR TELEGRAM ACCOUNT"
}
},
"typeVersion": 1.2
},
{
"id": "1f3f0349-c976-4a70-9102-4b859013b008",
"name": "URL触发器",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-720,
20
],
"webhookId": "cd2cb8d3-8725-478e-8ea1-3b27f755b49d",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "shlBXmZcvuOMWs7h",
"name": "YOUR TELEGRAM ACCOUNT"
}
},
"typeVersion": 1.2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "02d9f9e5-ec6b-4fff-8062-5bdc3cbdb5cb",
"connections": {
"If": {
"main": [
[
{
"node": "Send comment",
"type": "main",
"index": 0
}
],
[
{
"node": "Set comment and prompt properties",
"type": "main",
"index": 0
}
]
]
},
"Think": {
"ai_tool": [
[
{
"node": "Create comment",
"type": "ai_tool",
"index": 0
}
]
]
},
"URL Trigger": {
"main": [
[
{
"node": "Check Telegram User id",
"type": "main",
"index": 0
}
]
]
},
"Send comment": {
"main": [
[
{
"node": "Send reaction",
"type": "main",
"index": 0
}
]
]
},
"Set reaction": {
"main": [
[
{
"node": "Set comment and prompt properties",
"type": "main",
"index": 0
}
]
]
},
"Create comment": {
"main": [
[
{
"node": "Set comment content",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Extract the ID of the LinkedIn post",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Set reaction",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Determine language and mood",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Defining guardrails": {
"main": [
[
{
"node": "Extract the ID of the LinkedIn post",
"type": "main",
"index": 0
}
]
]
},
"Set comment content": {
"main": [
[
{
"node": "Approve oder Disapprove",
"type": "main",
"index": 0
}
]
]
},
"Anthropic Chat Model": {
"ai_languageModel": [
[
{
"node": "Create comment",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Check Telegram User id": {
"main": [
[
{
"node": "Defining guardrails",
"type": "main",
"index": 0
}
]
]
},
"Approve oder Disapprove": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Extract the ID of the LinkedIn post",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "Create comment",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser2": {
"ai_outputParser": [
[
{
"node": "Set reaction",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Determine language and mood": {
"main": [
[
{
"node": "Set reaction",
"type": "main",
"index": 0
}
]
]
},
"Set comment and prompt properties": {
"main": [
[
{
"node": "Create comment",
"type": "main",
"index": 0
}
]
]
},
"Extract the ID of the LinkedIn post": {
"main": [
[
{
"node": "Extract the content of the LinkedIn post",
"type": "main",
"index": 0
}
]
]
},
"Extract the content of the LinkedIn post": {
"main": [
[
{
"node": "Determine language and mood",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
个人 - 申请 TRM
通过 Telegram 机器人和 AI 日期识别获取哥伦比亚比索兑美元汇率
If
Set
Code
+16
31 节点Juan Sanchez
财务
构建与销售AI自动化与智能体
构建与销售AI自动化与智能体
If
Set
Wait
+15
74 节点NICKYAI
其他
AI邮件分诊与GPT-4警报系统及Telegram通知
AI邮件分诊与GPT-4警报系统及Telegram通知
If
Set
Gmail
+22
104 节点Peter Joslyn
客户支持
AI视频生成器 - OpenAI、ElevenLabs与Telegram YouTube发布
集成OpenAI、ElevenLabs并通过Telegram发布至YouTube的AI视频生成器
If
Set
Wait
+15
68 节点FRANK LIN
销售
MailChimp自动化
基于AI的餐厅通讯生成器,集成Mailchimp和Telegram审批
If
Set
Code
+16
43 节点Femi Ad
人工智能
AI驱动的YouTube Shorts自动化:使用OpenAI和ElevenLabs创建和发布
AI驱动的YouTube Shorts自动化:使用OpenAI和ElevenLabs创建和发布
If
Set
Wait
+15
76 节点Jonas Busch
人工智能