Shopify製品リストAIブログジェネレーター:GPT-4oとGoogleスプレッドシートの使用
これはAI, Marketing分野の自動化ワークフローで、19個のノードを含みます。主にIf, Set, Shopify, SplitOut, ManualTriggerなどのノードを使用、AI技術を活用したスマート自動化を実現。 Shopify製品一覧AIブログジェネレーター:GPT-4oとGoogleシートの使用
- •Shopify Admin API認証情報
- •ターゲットAPIの認証情報が必要な場合あり
- •OpenAI API Key
- •Google Sheets API認証情報
使用ノード (19)
{
"meta": {
"instanceId": "d73282515b90623d4a8783919a2d772c706425d649e1512792f37ac51e07e4a8",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "096ccd11-0ae4-4e3d-aeac-d180c09512ae",
"name": "ワークフローをテストする際にクリック",
"type": "n8n-nodes-base.manualTrigger",
"position": [
300,
180
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c95491ab-6e4e-4671-bfaf-b8a362d2ec01",
"name": "Shopify",
"type": "n8n-nodes-base.shopify",
"position": [
580,
180
],
"parameters": {
"resource": "product",
"operation": "getAll",
"returnAll": true,
"authentication": "accessToken",
"additionalFields": {}
},
"credentials": {
"shopifyAccessTokenApi": {
"id": "oPLCxaUiftgs7Mna",
"name": "Shopify Access Token account"
}
},
"typeVersion": 1
},
{
"id": "1620e19b-cd01-4798-858c-8f2fb3d58087",
"name": "分割出力",
"type": "n8n-nodes-base.splitOut",
"position": [
840,
180
],
"parameters": {
"options": {},
"fieldToSplitOut": "images"
},
"typeVersion": 1
},
{
"id": "944ab8ba-6e41-4e04-b442-9468ff341ba0",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1060,
180
],
"parameters": {
"text": "=You are an expert OCR and nutrition facts extractor. You carefully extract only the exact nutritional data present in the image without fabricating or guessing. You can recognize nutritional facts tables, and you know how to distinguish between actual nutrition data and promotional or partial text. You return null if no clear nutrition facts table or readable nutritional information is present.\n\n\nYou will analyze an image containing a product's nutritional information. Extract all nutritional data exactly as shown in the image, including nutrient names, amounts, units, and daily values if present.\n\n- If the image clearly contains a nutritional facts table or full nutritional data, output it in clean JSON format, where each nutrient is a key and the value contains the amount, unit, and daily value if available.\n- If the image shows only partial, blurry, or promotional text like \"20% protein\" or any incomplete nutritional data, do NOT fabricate any values; instead, return null.\n- If there is no clear nutritional facts table or nutritional data visible in the image, return null.\n- Do not guess or invent any numbers.\n- Only include information that is confidently present and readable in the image.\n\nExample output when nutrition facts are present:\n\n{\n \"Calories\": \"190\",\n \"Total Fat\": {\n \"amount\": \"8g\",\n \"daily_value\": \"10%\"\n },\n \"Cholesterol\": {\n \"amount\": \"0mg\",\n \"daily_value\": \"0%\"\n },\n ...\n}\n\nExample output when no valid nutritional facts table or data is visible:\n\nnull\n",
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {
"detail": "auto",
"maxTokens": 900
},
"resource": "image",
"imageUrls": "={{ $json.src }}",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"id": "OizdHUANhz9NIHyd",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "390bd7e4-b7bc-4575-9fe4-36a81445c7d3",
"name": "OpenAIチャットモデル",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1480,
580
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "OizdHUANhz9NIHyd",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "de84b88d-e96e-4c3c-a9f9-71cfc413022e",
"name": "条件分岐",
"type": "n8n-nodes-base.if",
"position": [
1240,
180
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6aa4dfe1-d907-47e8-b97e-3a77bb30c1d0",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.content }}",
"rightValue": "null"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "9ef20e21-7ad8-409f-a13e-e1088ec4e4a3",
"name": "何も操作せず",
"type": "n8n-nodes-base.noOp",
"position": [
1240,
440
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0cfadf47-06c7-4b00-b660-87241cc4bf4c",
"name": "ブログID作成",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
2500,
620
],
"parameters": {
"url": "=https://smartworkflow.myshopify.com/admin/api/2024-01/blogs.json",
"method": "POST",
"options": {},
"jsonBody": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JSON', ``, 'json') }}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "shopifyAccessTokenApi"
},
"credentials": {
"shopifyAccessTokenApi": {
"id": "oPLCxaUiftgs7Mna",
"name": "Shopify Access Token account"
}
},
"typeVersion": 4.2
},
{
"id": "059199d7-0f80-40fc-9f45-ee4ef8d6475b",
"name": "記事作成",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
2060,
620
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
"method": "POST",
"options": {},
"jsonBody": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JSON', ``, 'json') }}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "shopifyAccessTokenApi"
},
"credentials": {
"shopifyAccessTokenApi": {
"id": "oPLCxaUiftgs7Mna",
"name": "Shopify Access Token account"
}
},
"typeVersion": 4.2
},
{
"id": "60d74f7d-cc66-4af6-bb8d-686c3eb320cb",
"name": "スプレッドシート読み取り",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
1880,
600
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8/edit#gid=0",
"cachedResultName": "blog_details"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8/edit?usp=drivesdk",
"cachedResultName": "Blog update sheet"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "0RSJGMBcFzxY9GkS",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "75976a59-7017-4e2c-ab12-d2e3448b6566",
"name": "スプレッドシート更新",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
2280,
600
],
"parameters": {
"columns": {
"value": {
"Error": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Error', ``, 'string') }}",
"Retry": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Retry', ``, 'string') }}",
"Blog url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Blog_url', ``, 'string') }}",
"Blog Html": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Blog_Html', ``, 'string') }}",
"Timestamp": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Timestamp', ``, 'string') }}",
"Product Id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Product_Id', ``, 'string') }}",
"Blog title ": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Blog_title_', ``, 'string') }}",
"Proudct name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Proudct_name', ``, 'string') }}"
},
"schema": [
{
"id": "Timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Product Id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Proudct name",
"type": "string",
"display": true,
"required": false,
"displayName": "Proudct name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Blog title ",
"type": "string",
"display": true,
"required": false,
"displayName": "Blog title ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Blog url",
"type": "string",
"display": true,
"required": false,
"displayName": "Blog url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Blog Html",
"type": "string",
"display": true,
"required": false,
"displayName": "Blog Html",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Retry",
"type": "string",
"display": true,
"required": false,
"displayName": "Retry",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Error",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Error",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Product Id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8/edit#gid=0",
"cachedResultName": "blog_details"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8/edit?usp=drivesdk",
"cachedResultName": "Blog update sheet"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "0RSJGMBcFzxY9GkS",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "49448095-a73a-4fdb-9354-f3e442f100b4",
"name": "簡易メモリ",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1700,
580
],
"parameters": {
"sessionKey": "={{ $('Main Product info').item.json.id }}",
"sessionIdType": "customKey",
"contextWindowLength": 20
},
"typeVersion": 1.3
},
{
"id": "adc154d2-a1b0-4f27-b1fd-689484132308",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
500,
40
],
"parameters": {
"width": 260,
"height": 360,
"content": "## Get Products \n\n\nIt get all the product details from the shopify store"
},
"typeVersion": 1
},
{
"id": "d7de0bdd-2544-45fd-b4ac-264fed0d6c25",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
780,
-80
],
"parameters": {
"color": 3,
"height": 500,
"content": "## Fetches Product Image url \n\nEach Product can have multiple images it fetches image url for further step."
},
"typeVersion": 1
},
{
"id": "f51c03f3-a137-48ae-9b44-dee4505d1bb8",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
-80
],
"parameters": {
"color": 6,
"width": 380,
"height": 500,
"content": "## OCR :\nCollects Nutrients Facts \n\n* It collects Nutrients information from the product image and outputs in json format and send along the true branch of the if node.\n\n* If the image doesn't contain any related info it returns null."
},
"typeVersion": 1
},
{
"id": "486be3b5-dc25-4c5a-bde7-daaeff56308e",
"name": "主要製品情報",
"type": "n8n-nodes-base.set",
"position": [
1540,
160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "93cb8cc0-cdcd-44da-8187-9df85b770293",
"name": "title",
"type": "string",
"value": "={{ $('Shopify').item.json.title }}"
},
{
"id": "95990abc-b64d-4cb4-8d4e-88145395a3fc",
"name": "id",
"type": "number",
"value": "={{ $('Shopify').item.json.id }}"
},
{
"id": "d833cfa1-9abf-4a9d-86ed-a713acbc1974",
"name": "body_html",
"type": "string",
"value": "={{ $('Shopify').item.json.body_html }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "894b47e8-7da2-4a3c-b6ec-afe2e4d6f4cf",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1460,
-140
],
"parameters": {
"color": 4,
"width": 920,
"height": 460,
"content": "## Shopify Products Blog Mechanism:\n\n\n* It creates Seo Freindly Blog and Blog Title and post the content or article after creating blog of a \n specific category which can be seen on the Shopify blog section inside the store via http calls.\n\n* It first checks whether the product is already available or not in the sheet then checks whether \n there is need to retry the posting if there is any error. If there is error it retries posting it \n change the retry value as no.\n* It takes two http tool call to make a blog one is Blog id creation and other is article posting via \n Create Articles inside that particular Id.\n* Once the blog is posted all the details are updated via Update Sheet tool. If there is any error it updates it accordingly with the error message in error column"
},
"typeVersion": 1
},
{
"id": "6d708bbb-9c9c-419a-883b-d7e48e89e82a",
"name": "AIブログ投稿機",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1760,
160
],
"parameters": {
"text": "=Product id : {{ $json.id }}\nProduct title : {{ $json.title }} \n\nProduct Description html : {{ $json.body_html }}\n\nProduct Nutrition Facts : {{ $json.content }}\n\n",
"options": {
"systemMessage": "=You are an AI agent responsible for automating blog creation for Shopify products using Google Sheets as a tracking system.\n\n## Step-by-step Workflow:\n\n### 1. Read Google Sheet\nBefore doing anything, call the Read Sheet tool to check if a blog has already been created for the Product ID. The sheet contains columns:\n\n- Timestamp\n- Product Id\n- Product name\n- Blog title\n- Blog url\n- Blog Html\n- Retry\n- Error\n\nCall this tool first and look up the row with the same Product Id.\n\n### 2. Check Conditions:\n- If the Product Id exists and Retry = No, skip this item.\n- If Retry = Yes, retry blog creation from Step 3.\n- If the Product Id is not found, proceed to Step 3 to generate and post a new blog.\n\n---\n\n### 3. Generate Blog Content\nBased on the following provided in the user message:\n- Product ID\n- Product Title\n- Product Description HTML\n- Product Nutrition Facts \n\nGenerate:\n- SEO-Friendly Blog Title\n- Meta Description\n- Formatted Blog Content in clean, structured HTML:\n - Introduction summary\n - H2/H3 subheadings\n - Bullet points (key benefits, nutrients)\n - Nutrient callouts or tables (if available)\n - Closing paragraph or CTA\n - Add internal keywords (tags)\n\n---\n\n### 4. Create Blog (HTTP Tool Call)\nCall the Shopify API to create a blog:\n\njson\n{\n \"tool_call\": {\n \"tool\": \"http\",\n \"name\": \"Create Blog\",\n \"method\": \"POST\",\n \"url\": \"https://smartworkflow.myshopify.com/admin/api/2024-01/blogs.json\",\n \"body\": {\n \"blog\": {\n \"title\": \"[SEO Blog Title]\"\n }\n }\n }\n}\nOnce the blog.id is returned, post the article to:\n\n\nhttps://smartworkflow.myshopify.com/admin/api/2024-01/blogs/{{blog.id}}/articles.json\njson\nCopy\nEdit\n{\n \"tool_call\": {\n \"tool\": \"http\",\n \"name\": \"Create Article\",\n \"method\": \"POST\",\n \"url\": \"https://smartworkflow.myshopify.com/admin/api/2024-01/blogs/{{blog.id}}/articles.json\",\n \"body\": {\n \"article\": {\n \"title\": \"[Same Blog Title]\",\n \"body_html\": \"[Generated HTML content]\",\n \"tags\": \"nutrition, wellness, product, shopify\",\n \"published\": false\n }\n }\n }\n}\n6. Update Google Sheet\nIf Blog is Posted Successfully\nCall Update Sheet tool and set:\n\n\n{\n \"Timestamp\":{{ $now }} ,\n \"Product Id\": \"{{ $json.id }}\",\n \"Product name\": \"{{ $json.title }}\",\n \"Blog title\": \"[SEO Blog Title]\",\n \"Blog url\": \"[Generated URL from blog.id and article.id]\",\n \"Blog Html\": \"[Generated HTML]\",\n \"Retry\": \"No\",\n \"Error\": \"\"\n}\nIf Blog or Article Fails\nLog the error in Error column and set Retry = Yes.\n\n\n{\n \"Product Id\": \"{{ $json.id }}\",\n \"Retry\": \"Yes\",\n \"Error\": \"[Detailed error message]\"\n}\n\nNotes:\nAlways call Read Sheet first before blog generation.\n\nRetry logic is based strictly on the Retry column.\n\nAll tool call responses should be handled using proper try-catch/error-check patterns.\n\nEnsure HTML is clean and includes correct spacing, paragraphs, H2s, bullet lists, and optionally nutrient tables.\n"
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "3538388e-7222-48e1-bec8-daf882e8c316",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-100
],
"parameters": {
"color": 4,
"width": 380,
"height": 520,
"content": "## Author \n## Kumar Shivam\n\n\nI'm an automation specialist who helps startups, agencies, and growth teams save time and scale faster using n8n. I design smart, reliable workflows that connect tools like HubSpot, Slack, OpenAI, Claude, Pipedrive, Google Ads, and vector databases (Qdrant, Pinecone). Whether it's auto-assigning leads, generating AI-powered reports, triggering Slack alerts, or syncing APIs — I build automations that just work. Let’s turn your manual processes into automated systems that scale.\n\nContact for any business enquiries :\n\nhttps://kumarshivam.link"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"de84b88d-e96e-4c3c-a9f9-71cfc413022e": {
"main": [
[
{
"node": "486be3b5-dc25-4c5a-bde7-daaeff56308e",
"type": "main",
"index": 0
}
],
[
{
"node": "9ef20e21-7ad8-409f-a13e-e1088ec4e4a3",
"type": "main",
"index": 0
}
]
]
},
"944ab8ba-6e41-4e04-b442-9468ff341ba0": {
"main": [
[
{
"node": "de84b88d-e96e-4c3c-a9f9-71cfc413022e",
"type": "main",
"index": 0
}
]
]
},
"c95491ab-6e4e-4671-bfaf-b8a362d2ec01": {
"main": [
[
{
"node": "1620e19b-cd01-4798-858c-8f2fb3d58087",
"type": "main",
"index": 0
}
]
]
},
"1620e19b-cd01-4798-858c-8f2fb3d58087": {
"main": [
[
{
"node": "944ab8ba-6e41-4e04-b442-9468ff341ba0",
"type": "main",
"index": 0
}
]
]
},
"60d74f7d-cc66-4af6-bb8d-686c3eb320cb": {
"ai_tool": [
[
{
"node": "6d708bbb-9c9c-419a-883b-d7e48e89e82a",
"type": "ai_tool",
"index": 0
}
]
]
},
"75976a59-7017-4e2c-ab12-d2e3448b6566": {
"ai_tool": [
[
{
"node": "6d708bbb-9c9c-419a-883b-d7e48e89e82a",
"type": "ai_tool",
"index": 0
}
]
]
},
"49448095-a73a-4fdb-9354-f3e442f100b4": {
"ai_memory": [
[
{
"node": "6d708bbb-9c9c-419a-883b-d7e48e89e82a",
"type": "ai_memory",
"index": 0
}
]
]
},
"0cfadf47-06c7-4b00-b660-87241cc4bf4c": {
"ai_tool": [
[
{
"node": "6d708bbb-9c9c-419a-883b-d7e48e89e82a",
"type": "ai_tool",
"index": 0
}
]
]
},
"059199d7-0f80-40fc-9f45-ee4ef8d6475b": {
"ai_tool": [
[
{
"node": "6d708bbb-9c9c-419a-883b-d7e48e89e82a",
"type": "ai_tool",
"index": 0
}
]
]
},
"486be3b5-dc25-4c5a-bde7-daaeff56308e": {
"main": [
[
{
"node": "6d708bbb-9c9c-419a-883b-d7e48e89e82a",
"type": "main",
"index": 0
}
]
]
},
"390bd7e4-b7bc-4575-9fe4-36a81445c7d3": {
"ai_languageModel": [
[
{
"node": "6d708bbb-9c9c-419a-883b-d7e48e89e82a",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"096ccd11-0ae4-4e3d-aeac-d180c09512ae": {
"main": [
[
{
"node": "c95491ab-6e4e-4671-bfaf-b8a362d2ec01",
"type": "main",
"index": 0
}
]
]
}
}
}このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - 人工知能, マーケティング
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
Kumar Shivam
@shivam840708I'm an automation specialist who helps startups, agencies, and growth teams save time and scale faster using n8n. I design smart, reliable workflows that connect tools like HubSpot, Slack, OpenAI, Claude, Pipedrive, Google Ads, and vector databases (Qdrant, Pinecone). Whether it's auto-assigning leads, generating AI-powered reports, triggering Slack alerts, or syncing APIs — I build automations that just work. Let’s turn your manual processes into automated systems that scale.
このワークフローを共有