LinkedIn グループ投稿
中級
これはAI, Marketing分野の自動化ワークフローで、13個のノードを含みます。主にIf, Code, Limit, HttpRequest, GoogleSheetsなどのノードを使用、AI技術を活用したスマート自動化を実現。 GPT-4o を使って エクセルシートのテーマから LinkedIn 更新を自動投稿
前提条件
- •ターゲットAPIの認証情報が必要な場合あり
- •Google Sheets API認証情報
- •OpenAI API Key
使用ノード (13)
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "MDqbZwyjpy48Ytl0",
"meta": {
"instanceId": "260491e02302632e6a217f5c83135ad573c31ec4f93b05d79785a77df9c4a7e5"
},
"name": "Linkedin Post with Group",
"tags": [],
"nodes": [
{
"id": "511707c0-2e6b-4223-b126-454cf9f4ea11",
"name": "Limit",
"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 Model",
"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 投稿トピック",
"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 投稿作成",
"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": "コンテンツ整形",
"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 ユーザー詳細",
"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 投稿内容",
"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": {
"511707c0-2e6b-4223-b126-454cf9f4ea11": {
"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": "511707c0-2e6b-4223-b126-454cf9f4ea11",
"type": "main",
"index": 0
}
]
]
},
"0c8eea04-25b4-452c-917f-d989aeaa89f7": {
"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
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - 人工知能, マーケティング
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
AIとSlack承認を用いたLinkedIn投稿の自動化
LinkedIn投稿の自動化:AI(GPT-4o)による生成とSlack承認
If
Set
Code
+
If
Set
Code
32 ノードAmit Mehta
人工知能
GPT-4を使用して、自動のにLinkedInの投稿を生成し、プロフィールとグループに配信する
GPT-4 を使って LinkedIn の投稿を自動生成してプロフィールとグループへ配信する
If
Code
Limit
+
If
Code
Limit
14 ノードYaron Been
人工知能
GPT-4o、WordPress、LinkedInを使ってRSSから自動でブログ記事を投稿
GPT-4o、WordPress、LinkedInを使ってRSSコンテンツを自動のにブログ記事へ公開
If
Set
Code
+
If
Set
Code
40 ノードImmanuel
人工知能
AI YouTube分析アシスタント:コメント分析とインサイトレポート
AI YouTube分析アシスタント:コメント分析ツールとインサイトレポート生成ツール
If
Set
Code
+
If
Set
Code
19 ノードYaron Been
人工知能
LinkedIn オートメーション - Archit Jain
GPT-4 と Google Sheets を使って Twitter AI 投稿から LinkedIn コンテンツを自動作成
Code
Wait
Limit
+
Code
Wait
Limit
35 ノードArchit Jain
人工知能
HDWリードジェットバグ
AIエージェントを使用した自動LinkedInリード生成、スコアリング、コミュニケーション
If
Code
Sort
+
If
Code
Sort
86 ノードAndrey
営業
ワークフロー情報
難易度
中級
ノード数13
カテゴリー2
ノードタイプ10
作成者
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.
外部リンク
n8n.ioで表示 →
このワークフローを共有