LinkedIn投稿生成と承認の自動化
上級
これはAI, Marketing分野の自動化ワークフローで、18個のノードを含みます。主にIf, Set, Gmail, Switch, LinkedInなどのノードを使用、AI技術を活用したスマート自動化を実現。 OpenAI、Googleスプレッドシート、メール承認ワークフローを活用したAIによるLinkedIn投稿生成
前提条件
- •Googleアカウント + Gmail API認証情報
- •LinkedIn API認証情報
- •ターゲットAPIの認証情報が必要な場合あり
- •Google Sheets API認証情報
- •OpenAI API Key
使用ノード (18)
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "w9YVsuUtlNgXOEAQ",
"meta": {
"instanceId": "58a9e858b82757a75629d435ec0da2448ad5d9e906a9ce3b7dcbb64c90fda9fe",
"templateCredsSetupCompleted": true
},
"name": "LinkedIn Post Generation & Approval Automation",
"tags": [
{
"id": "3bzbXbpZW83y48aK",
"name": "content-approval",
"createdAt": "2025-05-13T18:45:19.225Z",
"updatedAt": "2025-05-13T18:45:19.225Z"
},
{
"id": "9SfWdyKRFVbPxrNL",
"name": "post-generator",
"createdAt": "2025-05-13T18:45:09.255Z",
"updatedAt": "2025-05-13T18:45:09.255Z"
},
{
"id": "VWnkUEKQKJB2WmbL",
"name": "linkedin",
"createdAt": "2025-05-13T18:45:04.175Z",
"updatedAt": "2025-05-13T18:45:04.175Z"
}
],
"nodes": [
{
"id": "d0f86395-aeec-4284-a2d5-26db2dfebd53",
"name": "画像取得",
"type": "n8n-nodes-base.httpRequest",
"position": [
1592,
2120
],
"parameters": {
"url": "={{ $('Get Data from Sheets').item.json.Image }}",
"options": {}
},
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "b8ca88a6-aaf1-4191-8b75-9a63b746af77",
"name": "スケジュールトリガー",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-260,
2595
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "8e4e294f-56d4-4317-aea8-ea258527f55a",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
268,
2815
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "7OVQwPA6RZRwFmwI",
"name": "OpenAI Account"
}
},
"typeVersion": 1.2
},
{
"id": "d262684e-7671-4602-ba77-4270441a69fb",
"name": "スプレッドシートからデータ取得",
"type": "n8n-nodes-base.googleSheets",
"position": [
-40,
2595
],
"parameters": {
"options": {
"returnFirstMatch": true
},
"filtersUI": {
"values": [
{
"lookupValue": "Pending",
"lookupColumn": "Status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1EAdLU9-l0ATGDa5_xwTwFO-rPhvZurM2BOSKjH2P-W8/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1EAdLU9-l0ATGDa5_xwTwFO-rPhvZurM2BOSKjH2P-W8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1EAdLU9-l0ATGDa5_xwTwFO-rPhvZurM2BOSKjH2P-W8/edit?usp=drivesdk",
"cachedResultName": "LinkedIn Post Automation"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Gs7mfT220sbLQ7PS",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "93d3e57f-a22d-4c04-9ccc-7ee655bedbdb",
"name": "投稿コンテンツ生成",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
180,
2595
],
"parameters": {
"text": "=# LinkedIn Post Generation\n\n## Post Description:\n{{ $json[\"Post Description\"] }}\n\n## Instructions:\n{{ $json[\"Instructions\"] }}\n\n---\n\n**Task:**\nUsing the information above, generate the content for a LinkedIn post:\n- Use the Description and Instructions to create a new post.\n- Ensure your output is positive, professional, clear, and follows all provided instructions and feedback.\n- Do not include any explanations, just the final post content only, ready to publish on LinkedIn.\n- Limit to 1300 characters.\n- If the user demands to keep the same post as the Post Descrioption (in the instructions), then keep the same post content as provided in the Post Description, and output it.",
"messages": {
"messageValues": [
{
"message": "=You are an expert social media and LinkedIn content writer.\n\nYou will be provided with:\n- A brief post description\n- Specific instructions from the user\n\nPlease follow these steps:\n\n1. Initial Creation:\nIf you are given a post description and instructions, write a polished, professionally worded LinkedIn post suitable for sharing. Strictly follow the instructions and ensure the message is engaging and succinct.\nIf instructed, add a call to action or particular phrase (for example, \"Connect with me\" at the bottom).\n\n2. Formatting:\nKeep the tone positive, inclusive, and professional.\nAdd relevant hashtags in small case.\nLimit the content to within 1300 characters.\nPlace the call to action or special instruction at the end if requested.\nOutput ONLY the final LinkedIn post content. Do NOT include any explanations, markdown, headings, or commentary—just the post text, ready to copy and share on LinkedIn."
}
]
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "6ea121f4-661c-4dd4-a0bc-7edb8a0b884a",
"name": "データフォーマット1",
"type": "n8n-nodes-base.set",
"position": [
556,
2595
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bded6f56-99e2-4f1a-be41-27a8dd417844",
"name": "Post Content",
"type": "string",
"value": "={{ $json.text }}"
},
{
"id": "c222c42e-b639-4a74-a1b0-7a3e6e141d55",
"name": "Post Description",
"type": "string",
"value": "={{ $('Get Data from Sheets').item.json['Post Description'] }}"
},
{
"id": "14775ff7-e005-4a86-9623-c322365f7d3a",
"name": "Instructions",
"type": "string",
"value": "={{ $('Get Data from Sheets').item.json.Instructions }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "a00ec081-07c0-4f8a-9139-6606a65236ff",
"name": "コンテンツ確認送信",
"type": "n8n-nodes-base.gmail",
"position": [
776,
2495
],
"webhookId": "29614d41-05c1-44af-93a6-4831a27f9331",
"parameters": {
"sendTo": "shindearyan179@gmail.com",
"message": "=Generated Post:\n{{ $json['Post Content'] }}\n\n----------\n\nPost Description:\n{{ $json['Post Description'] }}\n\n----------\n\nInstructions:\n{{ $json.Instructions }}",
"options": {},
"subject": "Approval for LinkedIn Post",
"operation": "sendAndWait",
"formFields": {
"values": [
{
"fieldType": "dropdown",
"fieldLabel": "Confirm Content?",
"fieldOptions": {
"values": [
{
"option": "Yes"
},
{
"option": "No"
},
{
"option": "Cancel"
}
]
},
"requiredField": true
},
{
"fieldType": "textarea",
"fieldLabel": "Any Changes?"
}
]
},
"responseType": "customForm"
},
"credentials": {
"gmailOAuth2": {
"id": "n47Kn2N5BwXYv6eA",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "5a1e8061-ef79-4974-888d-8670e60a1b0c",
"name": "コンテンツ確認ロジック",
"type": "n8n-nodes-base.switch",
"position": [
996,
2495
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Yes",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "99ec185e-80ac-451d-bb69-662f84a7cf52",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data['Confirm Content?'] }}",
"rightValue": "Yes"
}
]
},
"renameOutput": true
},
{
"outputKey": "No",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "77031007-a912-4b9b-9cca-846c57ffaec8",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data['Confirm Content?'] }}",
"rightValue": "No"
}
]
},
"renameOutput": true
},
{
"outputKey": "Cancel",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e94de530-6451-48aa-892c-924a9c41cfb0",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data['Confirm Content?'] }}",
"rightValue": "Cancel"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "c139fda0-4be1-4ad7-bb28-802b7150365d",
"name": "投稿コンテンツ再生成",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1216,
2670
],
"parameters": {
"text": "=Apply the modification requests on the following LinkedIn post. Besides applying the reqested modifications, return the same linkedin post.\n\nLinkedIn post:\n```\n{{ $('Data Formatting 1').item.json['Post Content'] }}\n```\n\nChange requests:\n{{ $('Send Content Confirmation').item.json.data['Any Changes?'] }}\n\n**Task:**\nUsing the information above, update the LinkedIn post content:\n- Do not include any explanations, just the final post content only (with all the change requests included in the post), ready to publish on LinkedIn.\n- Limit to 1300 characters.\n- If the user demands to keep the same post as the Post Description (in the instructions), then keep the same post content as provided in the Post Description, and output it.",
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "b8587578-03a6-4975-8907-667628dc958a",
"name": "画像提供時",
"type": "n8n-nodes-base.if",
"position": [
1294,
2220
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9a78220d-35f5-48b6-9ce3-faecaac24b74",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $('Get Data from Sheets').item.json.Image }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "30bf76c8-8420-4d77-bc2b-8a1c27fbf36a",
"name": "画像付き投稿",
"type": "n8n-nodes-base.linkedIn",
"position": [
1812,
2120
],
"parameters": {
"text": "={{ $('Data Formatting 1').item.json['Post Content'] }}",
"person": "pM247vR8Se",
"additionalFields": {},
"shareMediaCategory": "IMAGE"
},
"credentials": {
"linkedInOAuth2Api": {
"id": "Fg8i5E17dzZcPtMH",
"name": "LinkedIn account 2"
}
},
"typeVersion": 1
},
{
"id": "62bf9597-3e38-45ec-853c-aa2d77c40bc2",
"name": "画像なし投稿",
"type": "n8n-nodes-base.linkedIn",
"position": [
1812,
2320
],
"parameters": {
"text": "={{ $('Data Formatting 1').item.json['Post Content'] }}",
"person": "pM247vR8Se",
"additionalFields": {}
},
"credentials": {
"linkedInOAuth2Api": {
"id": "Fg8i5E17dzZcPtMH",
"name": "LinkedIn account 2"
}
},
"typeVersion": 1
},
{
"id": "0ddd307d-5e54-42cf-b65a-25f111fb4bea",
"name": "Google シート更新",
"type": "n8n-nodes-base.googleSheets",
"position": [
2032,
2320
],
"parameters": {
"columns": {
"value": {
"Output": "={{ $json.urn }}",
"Status": "=Completed",
"Post Link": "={{ $json.urn }}",
"row_number": "={{ $('Get Data from Sheets').item.json.row_number }}"
},
"schema": [
{
"id": "Post Description",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Post Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Instructions",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Instructions",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Image",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Output",
"type": "string",
"display": true,
"required": false,
"displayName": "Output",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Post Link",
"type": "string",
"display": true,
"required": false,
"displayName": "Post Link",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1EAdLU9-l0ATGDa5_xwTwFO-rPhvZurM2BOSKjH2P-W8/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1EAdLU9-l0ATGDa5_xwTwFO-rPhvZurM2BOSKjH2P-W8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1EAdLU9-l0ATGDa5_xwTwFO-rPhvZurM2BOSKjH2P-W8/edit?usp=drivesdk",
"cachedResultName": "LinkedIn Post Automation"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Gs7mfT220sbLQ7PS",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "c4a55beb-8459-4faa-b072-51c500562ae3",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-780,
2480
],
"parameters": {
"width": 420,
"height": 380,
"content": "## 1. Schedule & Sheet Data Retrieval\n\nThis workflow starts automatically on a defined schedule (e.g., daily or hourly).\n\nIt retrieves the next Google Sheet row marked as ‘Pending’.\n\nThe sheet should include columns like:\n1. Post Description\n2. Instructions\n3. Image\n4. Status\n5. row_number (required for updates)\n\nEnsure your Google Sheets credentials are correctly configured."
},
"typeVersion": 1
},
{
"id": "09dade5b-e26a-4b97-9b8a-a5c807cff937",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-220,
3040
],
"parameters": {
"width": 420,
"height": 240,
"content": "## 2. AI-Powered Post Generation & Formatting\n\nUses OpenAI GPT to generate a LinkedIn post based on the sheet’s Post Description and Instructions.\n\nYou can modify the prompt if needed.\nThe generated post is then formatted along with relevant data for easy reference and consistency."
},
"typeVersion": 1
},
{
"id": "f373dfd9-f971-4925-8e74-15201c8a47c4",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
440,
3040
],
"parameters": {
"width": 440,
"height": 240,
"content": "## 3. Gmail Approval Workflow\n\nSends the formatted post to an approver via Gmail.\n\nThe approver can respond with:\n✅ Yes – Approve\n✏️ No – Request changes\n❌ Cancel – Abort the post\n\nSet Gmail credentials and recipient email in the node."
},
"typeVersion": 1
},
{
"id": "66d51a35-262e-469b-bcd8-aca3cf60452c",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
3040
],
"parameters": {
"width": 440,
"height": 240,
"content": "## 4. Approval Handling & Regeneration\n\nHandles all approval responses:\n- If Yes, proceed to post.\n- If No, regenerate content based on the feedback and resend.\n- If Cancel, update the Google Sheet as Cancelled.\n\nThis ensures a complete review cycle before posting."
},
"typeVersion": 1
},
{
"id": "ad4023af-0e8b-4ec1-be1d-9313ec4f5ca7",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1800,
3040
],
"parameters": {
"width": 460,
"height": 320,
"content": "## 5. Image Check, Posting & Sheet Update\n\nChecks if an image URL is provided.\n- If present: Downloads the image and posts with it.\n- If not: Posts content without an image.\n\nAfter posting, it updates the Google Sheet with:\n- Status = Completed or Cancelled\n- LinkedIn post link/output\n\nUses row_number for precise sheet updates."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "65685909-274a-4d41-8f8a-fbba9442597b",
"connections": {
"d0f86395-aeec-4284-a2d5-26db2dfebd53": {
"main": [
[
{
"node": "30bf76c8-8420-4d77-bc2b-8a1c27fbf36a",
"type": "main",
"index": 0
}
]
]
},
"30bf76c8-8420-4d77-bc2b-8a1c27fbf36a": {
"main": [
[
{
"node": "0ddd307d-5e54-42cf-b65a-25f111fb4bea",
"type": "main",
"index": 0
}
]
]
},
"b8ca88a6-aaf1-4191-8b75-9a63b746af77": {
"main": [
[
{
"node": "d262684e-7671-4602-ba77-4270441a69fb",
"type": "main",
"index": 0
}
]
]
},
"6ea121f4-661c-4dd4-a0bc-7edb8a0b884a": {
"main": [
[
{
"node": "a00ec081-07c0-4f8a-9139-6606a65236ff",
"type": "main",
"index": 0
}
]
]
},
"b8587578-03a6-4975-8907-667628dc958a": {
"main": [
[
{
"node": "d0f86395-aeec-4284-a2d5-26db2dfebd53",
"type": "main",
"index": 0
}
],
[
{
"node": "62bf9597-3e38-45ec-853c-aa2d77c40bc2",
"type": "main",
"index": 0
}
]
]
},
"8e4e294f-56d4-4317-aea8-ea258527f55a": {
"ai_languageModel": [
[
{
"node": "93d3e57f-a22d-4c04-9ccc-7ee655bedbdb",
"type": "ai_languageModel",
"index": 0
},
{
"node": "c139fda0-4be1-4ad7-bb28-802b7150365d",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"62bf9597-3e38-45ec-853c-aa2d77c40bc2": {
"main": [
[
{
"node": "0ddd307d-5e54-42cf-b65a-25f111fb4bea",
"type": "main",
"index": 0
}
]
]
},
"d262684e-7671-4602-ba77-4270441a69fb": {
"main": [
[
{
"node": "93d3e57f-a22d-4c04-9ccc-7ee655bedbdb",
"type": "main",
"index": 0
}
]
]
},
"93d3e57f-a22d-4c04-9ccc-7ee655bedbdb": {
"main": [
[
{
"node": "6ea121f4-661c-4dd4-a0bc-7edb8a0b884a",
"type": "main",
"index": 0
}
]
]
},
"c139fda0-4be1-4ad7-bb28-802b7150365d": {
"main": [
[
{
"node": "6ea121f4-661c-4dd4-a0bc-7edb8a0b884a",
"type": "main",
"index": 0
}
]
]
},
"a00ec081-07c0-4f8a-9139-6606a65236ff": {
"main": [
[
{
"node": "5a1e8061-ef79-4974-888d-8670e60a1b0c",
"type": "main",
"index": 0
}
]
]
},
"5a1e8061-ef79-4974-888d-8670e60a1b0c": {
"main": [
[
{
"node": "b8587578-03a6-4975-8907-667628dc958a",
"type": "main",
"index": 0
}
],
[
{
"node": "c139fda0-4be1-4ad7-bb28-802b7150365d",
"type": "main",
"index": 0
}
],
[
{
"node": "0ddd307d-5e54-42cf-b65a-25f111fb4bea",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - 人工知能, マーケティング
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
GPT-4o、WordPress、LinkedInを使ってRSSから自動でブログ記事を投稿
GPT-4o、WordPress、LinkedInを使ってRSSコンテンツを自動のにブログ記事へ公開
If
Set
Code
+
If
Set
Code
40 ノードImmanuel
人工知能
AI、ElevenLabs、マルチプラットフォーム公開を使ってPOVビデオの作成と承認
AI、ElevenLabs、そしてマルチプラットフォーム公開を使ったPOVビデオの作成と承認(TikTok/IG/YT)
If
Set
Code
+
If
Set
Code
60 ノードImmanuel
デザイン
自動ニュース要約AIエージェントv13
AIニュース制作チーム:24/7リポート自動化+Perplexity引用
Set
Code
Gmail
+
Set
Code
Gmail
37 ノードDerek Cheung
プロダクト
AI、ElevenLabs、PIAPI Shotstack / Creatomate を使用して動画を作成し、YouTube に投稿
AI、ElevenLabs、PIAPI Shotstack/Creatomate を使用して動画を生成し、YouTube に投稿
If
Set
Code
+
If
Set
Code
79 ノードImmanuel
人工知能
OpenAI、Google Sheets、Jina AI、Slackを活用したAI駆動型情報監視
AIベースの情報監視ワークフローで、OpenAI、Google Sheets、Jina AI、Slackを統合
If
Set
Code
+
If
Set
Code
31 ノードDataki
営業
ブログ自動化テンプレート
Google スプレッドシートからブログ記事を執筆し、公開
If
Set
Code
+
If
Set
Code
35 ノードDaniel Nolde
人工知能