LinkedIn-Gruppen-Beiträge
Dies ist ein AI, Marketing-Bereich Automatisierungsworkflow mit 13 Nodes. Hauptsächlich werden If, Code, Limit, HttpRequest, GoogleSheets und andere Nodes verwendet, kombiniert mit KI-Technologie für intelligente Automatisierung. Automatisches Veröffentlichen von LinkedIn-Updates aus Tabellenblatt-Themen mit GPT-4o
- •Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
- •Google Sheets API-Anmeldedaten
- •OpenAI API Key
Verwendete Nodes (13)
Kategorie
{
"id": "MDqbZwyjpy48Ytl0",
"meta": {
"instanceId": "260491e02302632e6a217f5c83135ad573c31ec4f93b05d79785a77df9c4a7e5"
},
"name": "Linkedin Post with Group",
"tags": [],
"nodes": [
{
"id": "511707c0-2e6b-4223-b126-454cf9f4ea11",
"name": "Begrenzen",
"type": "n8n-nodes-base.limit",
"position": [
-1440,
-200
],
"parameters": {},
"typeVersion": 1
},
{
"id": "fd6b4832-3a29-475b-8019-470ebf51c501",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-1072,
10
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"post\": {\n\t\t\t\"type\": \"string\"\n\t\t}\t\t\n\t}\n}"
},
"typeVersion": 1.2
},
{
"id": "0c8eea04-25b4-452c-917f-d989aeaa89f7",
"name": "OpenAI-Chat-Modell",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-1192,
10
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "O2czYITX17GGksaO",
"name": "OPENAI_ACCOUNT"
}
},
"typeVersion": 1.2
},
{
"id": "1a02780a-f95e-44f3-932c-c4aa635f9861",
"name": "Linkedin-Post-Thema",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-1880,
-210
],
"parameters": {
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/147NIoP4NAZtmXdjciHyKdOWqpPvJ9ifoS8P6HJxikY8/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "147NIoP4NAZtmXdjciHyKdOWqpPvJ9ifoS8P6HJxikY8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/147NIoP4NAZtmXdjciHyKdOWqpPvJ9ifoS8P6HJxikY8/edit?usp=drivesdk",
"cachedResultName": "Linkedin Post"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"id": "5RtjOrwI9CDHwaz1",
"name": "Google Sheets Trigger account 3"
}
},
"typeVersion": 1
},
{
"id": "5a6c2f81-1375-4d45-b383-0bdeacb3f32a",
"name": "Validate-Status",
"type": "n8n-nodes-base.if",
"position": [
-1660,
-210
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ddab9b1e-0de2-4eb9-8d7b-b9f0846eb496",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Status }}",
"rightValue": "Pending"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "1c0a2c6d-c2e7-474b-88e0-8b15edb290e4",
"name": "Linkedin-Post-Creator",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1220,
-210
],
"parameters": {
"text": "=You are a LinkedIn post writer. You will be given a title and your task is to create an engaging LinkedIn post based on that title.\n\nYour post should:\n\nBegin with a compelling hook related to the title\n\nInclude 3-4 paragraphs of informative content\n\nEnd with a question to encourage engagement\n\nInclude 4-6 relevant hashtags\n\nUse appropriate emojis in between\n\nImportant formatting requirements:\n\nFormat all paragraphs with proper newline characters (\\n\\n) between them\n\nEnsure the text is properly escaped for JSON\n\nDo not use double quote (\") in response or any special character\n\nDo not put asterisk\n\nKeep the overall length appropriate for LinkedIn (under 3000 characters)\n\nNow, create a LinkedIn post based on the following title:\n{{ $('Linkedin-Post-Topic').item.json['Linkedin Post Title'] }}",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.9
},
{
"id": "72e79e7b-1e76-44f8-8893-bac589a46004",
"name": "Format-Content",
"type": "n8n-nodes-base.code",
"position": [
-844,
-210
],
"parameters": {
"jsCode": "const items = $input.all();\n\n\n\n\n//const postData = $('Limit').first().json.ID;\n\n// Store this value in a workflow variable that can be accessed by other nodes\n//$variables.PostId = postData;\n\n//$workflow.setContext('postContent', postData);\n\n// Also store it in a more persistent variable if needed across workflows\n//$variables.set('postData', postData);\n\n\n\n const updatedItems = items.map((item) => {\n item.json.output.post = JSON.stringify(item.json.output.post);\n return item;\n});\nreturn updatedItems; \n\n\n"
},
"typeVersion": 2
},
{
"id": "50b46b9f-8250-47e4-bba5-379bfeb441ee",
"name": "Linkedin-User-Detail",
"type": "n8n-nodes-base.httpRequest",
"position": [
-624,
-210
],
"parameters": {
"url": "https://api.linkedin.com/v2/userinfo",
"options": {
"response": {
"response": {}
}
},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{}
]
},
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "ZIlbEIFkMIFXYBav",
"name": "Header Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "63ea9ba8-4c38-4fee-b6eb-e382b3d90bdb",
"name": "Linkedin-Post",
"type": "n8n-nodes-base.httpRequest",
"position": [
-404,
-210
],
"parameters": {
"url": "https://api.linkedin.com/v2/ugcPosts",
"method": "POST",
"options": {},
"jsonBody": "={\n \"author\": \"urn:li:person:{{ $('Linkedin-User-Detail').item.json.sub }}\",\n \"lifecycleState\": \"PUBLISHED\",\n \"specificContent\": {\n \"com.linkedin.ugc.ShareContent\": {\n \"shareCommentary\": {\n \"text\": {{ $('Format-Content').item.json.output.post }}\n },\n \"shareMediaCategory\": \"NONE\"\n }\n },\n \"visibility\": {\n \"com.linkedin.ugc.MemberNetworkVisibility\": \"PUBLIC\"\n }\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "ZIlbEIFkMIFXYBav",
"name": "Header Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "cf99dfae-35b1-48d1-a369-3ba9dd7ed974",
"name": "Get-Group-id",
"type": "n8n-nodes-base.googleSheets",
"position": [
-184,
-210
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1240468053,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/147NIoP4NAZtmXdjciHyKdOWqpPvJ9ifoS8P6HJxikY8/edit#gid=1240468053",
"cachedResultName": "Groups"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "147NIoP4NAZtmXdjciHyKdOWqpPvJ9ifoS8P6HJxikY8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/147NIoP4NAZtmXdjciHyKdOWqpPvJ9ifoS8P6HJxikY8/edit?usp=drivesdk",
"cachedResultName": "Linkedin Post"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "kV7R8M5Wq888iCSq",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "9d23f626-39ea-47fd-ac54-90520e96700d",
"name": "Pick 1 by 1",
"type": "n8n-nodes-base.splitInBatches",
"position": [
36,
-210
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "165b45ec-f13e-45f5-b64e-0eb9b93af68f",
"name": "Post-Linkedin-Groups",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
256,
-160
],
"parameters": {
"url": "https://api.linkedin.com/v2/ugcPosts",
"method": "POST",
"options": {},
"jsonBody": "={\n \"author\": \"urn:li:person:{{ $('Linkedin-User-Detail').item.json.sub }}\",\n \"containerEntity\": \"urn:li:group:{{ $json.GroupIds }}\",\n \"lifecycleState\": \"PUBLISHED\",\n \"specificContent\": {\n \"com.linkedin.ugc.ShareContent\": {\n \"shareCommentary\": {\n \"text\": {{ $('Format-Content').item.json.output.post }}\n },\n \"shareMediaCategory\": \"NONE\"\n }\n },\n \"visibility\": {\n \"com.linkedin.ugc.MemberNetworkVisibility\": \"PUBLIC\"\n }\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "xZXXbTFNsITteRvV",
"name": "Header Auth account 2"
}
},
"typeVersion": 4.2
},
{
"id": "ad781a4b-9905-4028-984c-8949f6f10136",
"name": "Update-Status",
"type": "n8n-nodes-base.googleSheets",
"position": [
256,
-360
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Limit').item.json.ID }}",
"Status": "Posted"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Linkedin Post Title",
"type": "string",
"display": true,
"required": false,
"displayName": "Linkedin Post Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Path",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Image Path",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/147NIoP4NAZtmXdjciHyKdOWqpPvJ9ifoS8P6HJxikY8/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "147NIoP4NAZtmXdjciHyKdOWqpPvJ9ifoS8P6HJxikY8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/147NIoP4NAZtmXdjciHyKdOWqpPvJ9ifoS8P6HJxikY8/edit?usp=drivesdk",
"cachedResultName": "Linkedin Post"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "kV7R8M5Wq888iCSq",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "ea122424-0676-4423-985d-b72b0841837c",
"connections": {
"Limit": {
"main": [
[
{
"node": "1c0a2c6d-c2e7-474b-88e0-8b15edb290e4",
"type": "main",
"index": 0
}
]
]
},
"9d23f626-39ea-47fd-ac54-90520e96700d": {
"main": [
[
{
"node": "ad781a4b-9905-4028-984c-8949f6f10136",
"type": "main",
"index": 0
}
],
[
{
"node": "165b45ec-f13e-45f5-b64e-0eb9b93af68f",
"type": "main",
"index": 0
}
]
]
},
"cf99dfae-35b1-48d1-a369-3ba9dd7ed974": {
"main": [
[
{
"node": "9d23f626-39ea-47fd-ac54-90520e96700d",
"type": "main",
"index": 0
}
]
]
},
"63ea9ba8-4c38-4fee-b6eb-e382b3d90bdb": {
"main": [
[
{
"node": "cf99dfae-35b1-48d1-a369-3ba9dd7ed974",
"type": "main",
"index": 0
}
]
]
},
"72e79e7b-1e76-44f8-8893-bac589a46004": {
"main": [
[
{
"node": "50b46b9f-8250-47e4-bba5-379bfeb441ee",
"type": "main",
"index": 0
}
]
]
},
"5a6c2f81-1375-4d45-b383-0bdeacb3f32a": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "1c0a2c6d-c2e7-474b-88e0-8b15edb290e4",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"1a02780a-f95e-44f3-932c-c4aa635f9861": {
"main": [
[
{
"node": "5a6c2f81-1375-4d45-b383-0bdeacb3f32a",
"type": "main",
"index": 0
}
]
]
},
"1c0a2c6d-c2e7-474b-88e0-8b15edb290e4": {
"main": [
[
{
"node": "72e79e7b-1e76-44f8-8893-bac589a46004",
"type": "main",
"index": 0
}
]
]
},
"50b46b9f-8250-47e4-bba5-379bfeb441ee": {
"main": [
[
{
"node": "63ea9ba8-4c38-4fee-b6eb-e382b3d90bdb",
"type": "main",
"index": 0
}
]
]
},
"165b45ec-f13e-45f5-b64e-0eb9b93af68f": {
"main": [
[
{
"node": "9d23f626-39ea-47fd-ac54-90520e96700d",
"type": "main",
"index": 0
}
]
]
},
"fd6b4832-3a29-475b-8019-470ebf51c501": {
"ai_outputParser": [
[
{
"node": "1c0a2c6d-c2e7-474b-88e0-8b15edb290e4",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Fortgeschritten - Künstliche Intelligenz, Marketing
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
Amit Mehta
@amitswbaI'm a workflow automation expert with 15+ years in IT industry. I build smart, scalable n8n workflows for AI automation, marketing, CRM, and SaaS integrations. My focus is on simplifying business processes with tools like OpenAI, WhatsApp, Gmail, and Airtable. I help teams and solopreneurs automate smarter, reduce manual tasks, and grow faster—one workflow at a time.
Diesen Workflow teilen