This workflow corresponds to n8n.io template #5164 β we link there as the canonical source.
This workflow follows the Agent β HTTP Request recipe pattern β see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide β
{
"id": "93JjBO10sKQnELUF",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "LinkedIn_Multilanguage_Comment+Mention+Reaction",
"tags": [],
"nodes": [
{
"id": "9cb1b7d9-af64-41ed-8906-e68eef0f4343",
"name": "Structured Output Parser",
"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 Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
240,
-140
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "7b28dc1a-c2ac-416d-8bcf-5c6da5d5cd91",
"name": "Think",
"type": "@n8n/n8n-nodes-langchain.toolThink",
"position": [
2080,
200
],
"parameters": {},
"typeVersion": 1
},
{
"id": "cd20c807-dcd6-4327-96ed-37310424da07",
"name": "Anthropic Chat Model",
"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": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "18d590b2-f41d-484a-978a-5c6792402434",
"name": "OpenAI Chat Model1",
"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": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "055d43a3-efc7-4e90-97a0-4e64250fe8e7",
"name": "Structured Output Parser1",
"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": "Structured Output Parser2",
"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": "If",
"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 Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
780,
-140
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "70c1f7e9-ad43-4644-8669-24cb94036f09",
"name": "Defining guardrails",
"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": "Extract the ID of the LinkedIn post",
"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": "Extract the content of the LinkedIn post",
"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": "Set reaction",
"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": "Set comment content",
"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": "Send comment",
"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": "Send reaction",
"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": "Set comment and prompt properties",
"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": "Create comment",
"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., \u201cNAME, how do you see...?\u201d or \u201cWhat\u2019s your take on this, NAME?\u201d).\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": "Determine language and mood",
"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., \ud83c\udde9\ud83c\uddea). 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": "Check Telegram User 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": "Approve oder Disapprove",
"type": "n8n-nodes-base.telegram",
"position": [
2740,
20
],
"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": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "1f3f0349-c976-4a70-9102-4b859013b008",
"name": "URL Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-720,
20
],
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
}
],
"active": false,
"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
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing β you'll add your own.
anthropicApiopenAiApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Automate LinkedIn engagement without sounding like a bot. This workflow: π Detects language & tone (German / English) π Chooses the right reaction (like / celebrate / support β¦) π£ Generates a personalised comment in your voice and mentions the author π² Optional Telegram review ββ¦
Source: https://n8n.io/workflows/5164/ β original creator credit. Request a take-down β
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
π― Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes β all on autopilot.
Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.
RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.
Creators, marketers, and brands that want to turn a single product photo into premium motion clips, then optionally publish to Instagram/TikTok/YouTube via LATE. No editing skills required.
Product to Social Video (xCodeWraith Edition). Uses telegram, agentTool, telegramTrigger, httpRequest. Event-driven trigger; 83 nodes.