ブログコンテンツ作成の自動化にOpenAI、Google Sheets、メール審査プロセスを使用
これはAI, Marketing分野の自動化ワークフローで、22個のノードを含みます。主にSet, Gmail, Switch, GoogleSheets, Agentなどのノードを使用、AI技術を活用したスマート自動化を実現。 OpenAI、Google Sheets、メール承認フローでブログコンテンツ作成を自動化
- •Googleアカウント + Gmail API認証情報
- •Google Sheets API認証情報
- •OpenAI API Key
使用ノード (22)
{
"meta": {
"instanceId": "d1786ab0d745a7498abf13a9c2cdabb1374c006e889b79eef64ce0386b8f8a41",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "44e86584-788d-429b-b74c-87db2807ce5c",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-820,
40
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "efee3941-0589-4666-b2cb-43b221732b18",
"name": "Copywriter AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-160,
-40
],
"parameters": {
"text": "=You are an expert-level SEO content strategist and copywriter with years of experience writing high-performing blog posts.\n\nYour task is to:\n\n1. Improve the provided topic title by generating a better, SEO-optimized blog post title that is more attractive and ranks well on search engines.\n\n2. Write a complete blog post based on the improved title. The post must:\n- Be between 800–1200 words\n- Use a clear, conversational, and engaging tone\n- Be SEO-friendly with natural keyword integration\n- Start with a hooking introduction that introduces the topic smoothly\n- Use headings and subheadings (H1 for the title, H2 for main sections, H3 for supporting points)\n- Use bullet points or numbered lists where helpful\n- Have a strong conclusion that summarizes the key points and includes a call-to-action or final insight\n- Ensure smooth flow and concise, informative paragraphs\n\n3. Output the result as a JSON object with this format:\n\n```json\n{\n \"title\": \"Improved SEO-Optimized Title\",\n \"content\": \"Full blog post content in markdown format\"\n}\n```\n\nHere is the topic you should improve and write about:\n{{ $json.Topic }}\n\nGenerate the improved title and the full blog post now.\n",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.9
},
{
"id": "e50273d0-e7c4-4467-b91d-ff1c08128bd0",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-180,
260
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "MGwGMKEkdcjzlYCw",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "bb251d01-b847-475b-b5cf-79665cab92ad",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
20,
260
],
"parameters": {
"sessionKey": "={{ $('Get Topic from Google Sheets').item.json.Topic }}",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "8c0ff9a8-3484-41cd-a614-6880212fb4a2",
"name": "Copywriter Revision Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
340,
420
],
"parameters": {
"text": "=You are an expert-level copywriter with strong SEO knowledge and a clear, engaging writing style. Your task is to revise an existing blog post based on the given topic and user feedback.\n\nHere are your responsibilities:\n- Carefully apply all of the user's feedback to improve the blog post.\n- Preserve the good parts of the original content, but rewrite or adjust areas based on the feedback.\n- Keep the tone friendly, professional, and easy to read.\n- Organize the blog post with clear headings and subheadings.\n- Use bullet points or numbered lists when it makes the content clearer.\n- Ensure a strong hook in the introduction and a solid conclusion with a call-to-action or takeaway.\n- Aim for a length between 800–1200 words unless the feedback suggests otherwise.\n\nHere is the topic title:\n{{ $('Get Topic from Google Sheets').item.json.Topic }}\n\nHere is the user's feedback:\n{{ $('Send Content for Approval').item.json.data['Content Feedback'] }}\n\nHere is the original content:\n{{ $('Copywriter AI Agent').item.json.output }}\n\nNow, rewrite the blog post using this input, fully incorporating the feedback.\n",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.9
},
{
"id": "00a499d7-7897-4e47-8559-1fb78c49e1d6",
"name": "Set Data",
"type": "n8n-nodes-base.set",
"position": [
280,
-40
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "c4dbce1a-8b34-46b7-a740-b49339233e68",
"name": "Topic Title",
"type": "string",
"value": "={{ $json.output.title }}"
},
{
"id": "4924b496-db60-4618-bab7-a9d5e689c8eb",
"name": "Content",
"type": "string",
"value": "={{ $json.output.content }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "74287c5b-12a3-4a39-802c-40c98ab72bfa",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
120,
440
],
"parameters": {
"jsonSchemaExample": "{\n \"title\": \"Improved SEO-Optimized Title\",\n \"content\": \"Full blog post content in markdown format\"\n}"
},
"typeVersion": 1.2
},
{
"id": "c288be21-d948-4d10-87c9-795049c64ee3",
"name": "生成コンテンツをGoogleに追加",
"type": "n8n-nodes-base.googleSheets",
"position": [
1220,
-40
],
"parameters": {
"columns": {
"value": {
"Title": "={{ $('Set Data').item.json['Topic Title'] }}",
"Content": "={{ $('Set Data').item.json.Content }}",
"Generation Date": "={{ $now }}"
},
"schema": [
{
"id": "Title",
"type": "string",
"display": true,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content",
"type": "string",
"display": true,
"required": false,
"displayName": "Content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Generation Date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Generation Date",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1579104486,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1CyELzPxCDHAXJVu-p2_QRiGRGYwjPtJpeGwWXvlWjLw/edit#gid=1579104486",
"cachedResultName": "Generated Content"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1CyELzPxCDHAXJVu-p2_QRiGRGYwjPtJpeGwWXvlWjLw",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1CyELzPxCDHAXJVu-p2_QRiGRGYwjPtJpeGwWXvlWjLw/edit?usp=drivesdk",
"cachedResultName": "Content Topics"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ypmzFxQFfAacuVVC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "8c129e32-763c-4a7f-8e57-fec1fbbd89e4",
"name": "Googleでトピックのステータスを更新",
"type": "n8n-nodes-base.googleSheets",
"position": [
880,
-40
],
"parameters": {
"columns": {
"value": {
"Status": "Completed",
"row_number": "={{ $('Get Topic from Google Sheets').item.json.row_number }}"
},
"schema": [
{
"id": "Topic",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Topic",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Output",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Output",
"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/1CyELzPxCDHAXJVu-p2_QRiGRGYwjPtJpeGwWXvlWjLw/edit#gid=0",
"cachedResultName": "Topic List"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1CyELzPxCDHAXJVu-p2_QRiGRGYwjPtJpeGwWXvlWjLw",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1CyELzPxCDHAXJVu-p2_QRiGRGYwjPtJpeGwWXvlWjLw/edit?usp=drivesdk",
"cachedResultName": "Content Topics"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ypmzFxQFfAacuVVC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "066a262a-94f5-428e-b15e-a01e3b295cf7",
"name": "Googleからトピックを取得",
"type": "n8n-nodes-base.googleSheets",
"position": [
-480,
40
],
"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/1CyELzPxCDHAXJVu-p2_QRiGRGYwjPtJpeGwWXvlWjLw/edit#gid=0",
"cachedResultName": "Topic List"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1CyELzPxCDHAXJVu-p2_QRiGRGYwjPtJpeGwWXvlWjLw",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1CyELzPxCDHAXJVu-p2_QRiGRGYwjPtJpeGwWXvlWjLw/edit?usp=drivesdk",
"cachedResultName": "Content Topics"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ypmzFxQFfAacuVVC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "f38b1a69-b222-4232-a930-7cd4dab7805b",
"name": "承認のためコンテンツを送信",
"type": "n8n-nodes-base.gmail",
"position": [
440,
-40
],
"webhookId": "a23938a4-fc6c-4445-8dee-17e501e92e06",
"parameters": {
"sendTo": "replace_with_your_email@yopmail.com",
"message": "=Generated Title:\n{{ $json['Topic Title'] }}\n\nGenerated Content:\n{{ $json.Content }}",
"options": {},
"subject": "Approval Required for Blog Content",
"operation": "sendAndWait",
"formFields": {
"values": [
{
"fieldType": "dropdown",
"fieldLabel": "Approve Content?",
"fieldOptions": {
"values": [
{
"option": "Yes"
},
{
"option": "No"
},
{
"option": "Cancel"
}
]
},
"requiredField": true
},
{
"fieldType": "textarea",
"fieldLabel": "Content Feedback"
}
]
},
"responseType": "customForm"
},
"credentials": {
"gmailOAuth2": {
"id": "sWl7FFMkEUYBj0zM",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "67f16627-daf0-4af9-b01e-1e3fc1822e1d",
"name": "Approval Result",
"type": "n8n-nodes-base.switch",
"position": [
580,
-40
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Yes",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "317039f4-754e-4cb0-a674-eb8d26c9ed27",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data['Approve Content?'] }}",
"rightValue": "Yes"
}
]
},
"renameOutput": true
},
{
"outputKey": "No",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "caace3ea-4ca0-40de-84fb-5a8fd809a0eb",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data['Approve Content?'] }}",
"rightValue": "No"
}
]
},
"renameOutput": true
},
{
"outputKey": "Cancel",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "f93e5649-6a21-49a9-9993-85f1323139b0",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data['Approve Content?'] }}",
"rightValue": "Cancel"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "73207a91-a427-4f1a-a703-ce85aefc0dbe",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-920,
-140
],
"parameters": {
"color": 4,
"width": 320,
"height": 360,
"content": "🕒 WORKFLOW STARTER\nThis triggers the content generation process automatically.\n\nSetup Required:\n• Set your preferred trigger interval."
},
"typeVersion": 1
},
{
"id": "b058cff4-b0b2-4ee3-865c-2e3a43e91fb7",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-580,
-260
],
"parameters": {
"color": 4,
"width": 320,
"height": 480,
"content": "📊 TOPIC RETRIEVAL\nFetches the first \"Pending\" topic from your topic list.\n\nSetup Required:\n• Connect your Google account\n• Update Sheet ID in node settings\n• Ensure \"Topic List\" sheet exists with columns:\n - Topic (A), Status (B)\n\nOutput: Topic title + row number for tracking"
},
"typeVersion": 1
},
{
"id": "534cf5ed-a0dd-4e72-9809-33234dd82b1e",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1200,
-240
],
"parameters": {
"color": 4,
"width": 260,
"height": 460,
"content": "## SETUP REQUIRED\n\nGoogle Sheets Structure:\nSheet 1: \"Topic List\"\n• Column A: Topic\n• Column B: Status (\"Pending\", \"Completed\")\n\nSheet 2: \"Generated Content\"\n• Column A: Title\n• Column B: Content\n• Column C: Generation Date\n\nRequired Credentials:\n• OpenAI API Key\n• Google Sheets Credential\n• Gmail Credential"
},
"typeVersion": 1
},
{
"id": "b73b1fb1-6b9f-402d-8127-5386ab3129bd",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
-260
],
"parameters": {
"color": 4,
"width": 460,
"height": 800,
"content": "🤖 CONTENT CREATION\nAI writes SEO-optimized blog posts (800-1200 words).\n\nSetup Required:\n• Add OpenAI API key in credentials\n• Uses structured prompts for consistency\n\nOutput: JSON with title + content ready for review"
},
"typeVersion": 1
},
{
"id": "66a66e35-04e8-4b8f-a516-662153570419",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
260,
-260
],
"parameters": {
"color": 4,
"width": 440,
"height": 440,
"content": "📧 HUMAN REVIEW\nThis step sends the generated content via email for approval.\n\n✅ Update the To Email Field in the Gmail node with your own email address.\n\n⚠️ Note: The workflow will pause here until a response is received."
},
"typeVersion": 1
},
{
"id": "4836beb9-5ad7-4439-a99d-ffcdc2ef92ab",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
260,
200
],
"parameters": {
"color": 4,
"width": 440,
"height": 420,
"content": "✏️ CONTENT REVISION\nAI improves content based on human feedback.\n\nTriggered when: Approval = \"No\"\nUses: Original topic + feedback + original content\nSame AI model as initial generation\n\nOutput: Revised content incorporating feedback"
},
"typeVersion": 1
},
{
"id": "bb912715-f4e6-4907-881e-b8fc0c1a9e10",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
780,
-280
],
"parameters": {
"color": 4,
"width": 300,
"height": 480,
"content": "✅ TOPIC STATUS UPDATE\nUpdates topic status to \"Completed\" in tracking sheet.\n\nPurpose:\n• Prevents duplicate processing\n• Tracks workflow progress\n• Uses row number from initial fetch\n\nColumn Updated: Status (B) → \"Completed\"\n"
},
"typeVersion": 1
},
{
"id": "a9ca1a23-9156-4d33-9967-586374c4eca4",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
-280
],
"parameters": {
"color": 4,
"width": 300,
"height": 480,
"content": "💾 ADD GENERATED CONTENT\nSaves approved content to \"Generated Content\" sheet.\n\nSetup Required:\n• Ensure \"Generated Content\" sheet exists\n• Columns: Title (A), Content (B), Date (C)\n\nPurpose: Permanent storage for published content\n"
},
"typeVersion": 1
},
{
"id": "35400105-1c1a-44e4-8e6c-684de99da88d",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1200,
240
],
"parameters": {
"color": 5,
"width": 420,
"height": 420,
"content": "## 🚀 Automate Blog Content Creation with OpenAI, Google Sheets & Email Approval Workflow\n\nWhat This Template Does:\n- Automatically generates SEO-optimized blog posts\n- Uses AI (GPT-4) to write 800-1200 word articles\n- Includes human approval process for quality control\n- Manages topics via Google Sheets\n- Handles revisions based on feedback\n\nPerfect For:\n- Content marketers scaling blog production\n- Agencies managing multiple clients\n- Bloggers wanting consistent publishing\n- SEO professionals creating optimized content"
},
"typeVersion": 1
},
{
"id": "3a54ea70-bf4f-48b7-80f2-15c8b961b8b5",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-760,
240
],
"parameters": {
"color": 5,
"width": 500,
"height": 420,
"content": "## 📋 WORKFLOW PROCESS OVERVIEW\n\nStep 1: 📅 Schedule automatically starts process\nStep 2: 📊 Fetch pending topic from Google Sheets\nStep 3: 🤖 AI generates complete blog post\nStep 4: 📧 Send content to you for approval\nStep 5: ✅ You approve, request changes, or cancel\nStep 6: ✏️ AI revises content if changes requested\nStep 7: 💾 Save final content & mark topic complete\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"00a499d7-7897-4e47-8559-1fb78c49e1d6": {
"main": [
[
{
"node": "f38b1a69-b222-4232-a930-7cd4dab7805b",
"type": "main",
"index": 0
}
]
]
},
"bb251d01-b847-475b-b5cf-79665cab92ad": {
"ai_memory": [
[
{
"node": "efee3941-0589-4666-b2cb-43b221732b18",
"type": "ai_memory",
"index": 0
},
{
"node": "8c0ff9a8-3484-41cd-a614-6880212fb4a2",
"type": "ai_memory",
"index": 0
}
]
]
},
"67f16627-daf0-4af9-b01e-1e3fc1822e1d": {
"main": [
[
{
"node": "8c129e32-763c-4a7f-8e57-fec1fbbd89e4",
"type": "main",
"index": 0
}
],
[
{
"node": "8c0ff9a8-3484-41cd-a614-6880212fb4a2",
"type": "main",
"index": 0
}
],
[
{
"node": "8c129e32-763c-4a7f-8e57-fec1fbbd89e4",
"type": "main",
"index": 0
}
]
]
},
"44e86584-788d-429b-b74c-87db2807ce5c": {
"main": [
[
{
"node": "066a262a-94f5-428e-b15e-a01e3b295cf7",
"type": "main",
"index": 0
}
]
]
},
"e50273d0-e7c4-4467-b91d-ff1c08128bd0": {
"ai_languageModel": [
[
{
"node": "efee3941-0589-4666-b2cb-43b221732b18",
"type": "ai_languageModel",
"index": 0
},
{
"node": "8c0ff9a8-3484-41cd-a614-6880212fb4a2",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"efee3941-0589-4666-b2cb-43b221732b18": {
"main": [
[
{
"node": "00a499d7-7897-4e47-8559-1fb78c49e1d6",
"type": "main",
"index": 0
}
]
]
},
"74287c5b-12a3-4a39-802c-40c98ab72bfa": {
"ai_outputParser": [
[
{
"node": "efee3941-0589-4666-b2cb-43b221732b18",
"type": "ai_outputParser",
"index": 0
},
{
"node": "8c0ff9a8-3484-41cd-a614-6880212fb4a2",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"8c0ff9a8-3484-41cd-a614-6880212fb4a2": {
"main": [
[
{
"node": "00a499d7-7897-4e47-8559-1fb78c49e1d6",
"type": "main",
"index": 0
}
]
]
},
"f38b1a69-b222-4232-a930-7cd4dab7805b": {
"main": [
[
{
"node": "67f16627-daf0-4af9-b01e-1e3fc1822e1d",
"type": "main",
"index": 0
}
]
]
},
"066a262a-94f5-428e-b15e-a01e3b295cf7": {
"main": [
[
{
"node": "efee3941-0589-4666-b2cb-43b221732b18",
"type": "main",
"index": 0
}
]
]
},
"8c129e32-763c-4a7f-8e57-fec1fbbd89e4": {
"main": [
[
{
"node": "c288be21-d948-4d10-87c9-795049c64ee3",
"type": "main",
"index": 0
}
]
]
}
}
}このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - 人工知能, マーケティング
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
Billy Christi
@billyI'm a professional software engineer and n8n expert with a passion for building scalable, no-code and low-code automation workflows. I specialize in creating seamless integrations between APIs, CRMs, and everyday tools to help businesses save time, reduce manual work, and operate smarter. Whether it's automating marketing pipelines, backend systems, or approval processes, I turn complex logic into simple, powerful workflows with n8n.
このワークフローを共有