8
n8n 中文网amn8n.com

使用Google Gemini和Google Sheets的Shopify产品AI博客生成器

高级

这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 22 个节点。主要使用 If, Code, Limit, Shopify, HttpRequest 等节点。 使用Google Gemini和Google Sheets的Shopify产品AI博客生成器

前置要求
  • Shopify Admin API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "818217039c98483edc5f2e50a5e7ea3ae47b57a621c9a4429b9c0454fe5f315c",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "f8ecb7bb-88d1-445b-b33d-d35fe3151234",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1776,
        -480
      ],
      "parameters": {
        "width": 1728,
        "height": 416,
        "content": "# Shopify 产品转博客自动化(使用 AI 和 Google Sheets)"
      },
      "typeVersion": 1
    },
    {
      "id": "a660e92e-f367-4187-98b4-754c14c008b8",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1776,
        -32
      ],
      "parameters": {
        "width": 1728,
        "height": 480,
        "content": "Emelia 触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "83e6e157-fb98-4bad-a9e9-c043d6f7db16",
      "name": "开始创建",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1088,
        -240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "701f86cb-5169-4b09-9d74-2f1d7ac445af",
      "name": "获取所有产品详情",
      "type": "n8n-nodes-base.shopify",
      "position": [
        -864,
        -240
      ],
      "parameters": {
        "resource": "product",
        "operation": "getAll",
        "returnAll": true,
        "authentication": "accessToken",
        "additionalFields": {}
      },
      "credentials": {
        "shopifyAccessTokenApi": {
          "id": "UYgX73aiHW2gyQq6",
          "name": "Admin_Manish"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "db453c4b-34ac-4a59-91be-51fde818984f",
      "name": "产品详情到表格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -640,
        -240
      ],
      "parameters": {
        "columns": {
          "value": {
            "title": "={{ $('Get All Product Details').item.json.title }}",
            "Images": "={{ $('Get All Product Details').item.json.images }}",
            "handle": "={{ $('Get All Product Details').item.json.handle }}",
            "product_id": "={{ $('Get All Product Details').item.json.id }}",
            "description": "={{ $('Get All Product Details').item.json.body_html }}"
          },
          "schema": [
            {
              "id": "product_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "product_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "handle",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "handle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Images",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Images",
              "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/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit#gid=0",
          "cachedResultName": "row_data"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit?usp=drivesdk",
          "cachedResultName": "shopify_blog_n8n"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GL43UggUq5EHLIyU",
          "name": "n8n.verified@gmail.com"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "c9653b2e-3560-4986-8459-8632aecd557b",
      "name": "修复输入格式",
      "type": "n8n-nodes-base.code",
      "position": [
        -416,
        -240
      ],
      "parameters": {
        "jsCode": "// Function to process ALL input items (multiple products)\nconst allItems = $input.all();\nconst processedItems = [];\n\n// Function to process a single product\nfunction processProductData(inputData) {\n  try {\n    const result = {\n      product_id: null,\n      title: null,\n      handle: null,\n      description: '',        // keep original HTML\n      cleanDescription: '',   // plain text\n      imageSources: [],       // Always an array\n      totalImages: 0,\n      error: null\n    };\n\n    // Add fields as is\n    if (inputData.product_id !== undefined && inputData.product_id !== null) {\n      result.product_id = inputData.product_id;\n    }\n    if (inputData.title !== undefined && inputData.title !== null) {\n      result.title = inputData.title;\n    }\n    if (inputData.handle !== undefined && inputData.handle !== null) {\n      result.handle = inputData.handle;\n    }\n\n    // Process description\n    if (inputData.description) {\n      // 1. Keep original HTML (Shopify supports this)\n      result.description = inputData.description;\n\n      // 2. Generate plain text version\n      let cleanDescription = inputData.description\n        .replace(/<[^>]*>/g, '') // strip tags\n        .replace(/&amp;/g, '&')\n        .replace(/&lt;/g, '<')\n        .replace(/&gt;/g, '>')\n        .replace(/&quot;/g, '\"')\n        .replace(/&#39;/g, \"'\")\n        .replace(/&nbsp;/g, ' ')\n        .replace(/\\n+/g, '\\n')\n        .replace(/[ \\t]+/g, ' ')\n        .replace(/\\n /g, '\\n')\n        .trim();\n\n      // escape for JSON safety\n      cleanDescription = cleanDescription\n        .replace(/\\\\/g, '\\\\\\\\')\n        .replace(/\"/g, '\\\\\"')\n        .replace(/\\n/g, '\\\\n');\n\n      result.cleanDescription = cleanDescription;\n    }\n\n    // Process images - ENSURE IT'S AN ARRAY\n    if (inputData.Images && Array.isArray(inputData.Images)) {\n      result.imageSources = inputData.Images\n        .filter(image => image && image.src && image.src.trim() !== '')\n        .map(image => image.src.trim())\n        .filter((src, index, array) => array.indexOf(src) === index);\n\n      result.totalImages = result.imageSources.length;\n    }\n    // Handle case where Images might be a string\n    else if (inputData.Images && typeof inputData.Images === 'string') {\n      try {\n        const parsedImages = JSON.parse(inputData.Images);\n        if (Array.isArray(parsedImages)) {\n          result.imageSources = parsedImages\n            .filter(image => image && image.src && image.src.trim() !== '')\n            .map(image => image.src.trim())\n            .filter((src, index, array) => array.indexOf(src) === index);\n\n          result.totalImages = result.imageSources.length;\n        }\n      } catch (parseError) {\n        console.log('Error parsing Images string:', parseError);\n        result.imageSources = [];\n        result.totalImages = 0;\n      }\n    }\n\n    return result;\n\n  } catch (error) {\n    return {\n      product_id: inputData.product_id || null,\n      title: inputData.title || null,\n      handle: inputData.handle || null,\n      description: '',\n      cleanDescription: '',\n      imageSources: [],\n      totalImages: 0,\n      error: error.message\n    };\n  }\n}\n\n// Process each item\nfor (let i = 0; i < allItems.length; i++) {\n  const processedItem = processProductData(allItems[i].json);\n  processedItems.push({ json: processedItem });\n}\n\n// Return all processed items\nreturn processedItems;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "da3c0cba-80d7-4ebb-a9fc-91d1dc900fcd",
      "name": "更新表格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -192,
        -240
      ],
      "parameters": {
        "columns": {
          "value": {
            "title": "={{ $json.title }}",
            "handle": "={{ $json.handle }}",
            "Image_1": "={{ $json.imageSources[0] }}",
            "Image_2": "={{ $json.imageSources[1] }}",
            "Image_3": "={{ $json.imageSources[2] }}",
            "Image_4": "={{ $json.imageSources[3] }}",
            "blog_id": "118631235877",
            "product_id": "={{ $json.product_id }}",
            "blog_status": "unused",
            "description": "={{ $json.cleanDescription }}"
          },
          "schema": [
            {
              "id": "product_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "product_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "blog_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "blog_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "blog_status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "blog_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "handle",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "handle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image_1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Image_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image_2",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Image_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image_3",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Image_3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image_4",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Image_4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "product_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 25757113,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit#gid=25757113",
          "cachedResultName": "refined_input"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit?usp=drivesdk",
          "cachedResultName": "shopify_blog_n8n"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GL43UggUq5EHLIyU",
          "name": "n8n.verified@gmail.com"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a9a6b7b7-2948-4827-ac71-6abd55da8b5a",
      "name": "过滤重复项",
      "type": "n8n-nodes-base.if",
      "position": [
        -1664,
        32
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "9e037f0f-ed95-41e5-b229-80befb372ff7",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.blog_status }}",
              "rightValue": "=unused"
            },
            {
              "id": "55aa4e25-b574-4c48-97f8-80ff6b402724",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.blog_status }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "3f421a55-3e62-44ff-8f75-822691bb0a03",
      "name": "魔法房间",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1216,
        16
      ],
      "parameters": {
        "text": "=Input fields provided:  \n- Title: {{ $json.title }}\n- Description: {{ $json.description }}",
        "options": {
          "systemMessage": "=You are an expert content writer who creates concise, high-converting product blog posts for Shopify stores. \n\nYour output must follow this exact structure, using HTML tags for formatting, and adhering to ideal word/character counts for readability and engagement.\n\nWrite a blog post using the following structure:\n\n1. **Title** (within <h1> tags)  \n- Make it catchy and relevant to the product title, approximately 8–12 words and 50–70 characters.  \n\n2. **Introduction** (within <p> tags)  \n- Write 40–60 words (250–350 characters) that hook the reader by highlighting a relatable problem, followed by a quick product benefit summary.\n\n3. **Key Features** (within <ul> and <li> tags)  \n- List the top 4–6 features in short, scannable bullet points totaling 50–100 words (300–600 characters).\n\n4. **Customer Reviews / Experience** (within <blockquote> or <div> tags)  \n- Include 2–3 short, authentic-sounding customer testimonials or experiences, total 80–120 words (450–700 characters).\n\n5. **Use Case Callout** (within <p> tags, optionally with <strong>)  \n- Briefly define who the product is ideal for, in 40–60 words (250–350 characters).\n\n6. **Call to Action** (within <p> tags)  \n- Close with a clear invitation to buy or learn more, about 20–40 words (120–250 characters).\n\nAdditionally, at the end of the output provide:  \n- An excerpt summary (max 160 characters) without tags  \n- A page title suitable for SEO (under 60 characters)  \n- A meta description (140–160 characters) summarizing the blog content for search engines  \n\n---\n\nOutput the content with proper HTML markup and all requested fields exactly like this JSON:  \n\n{\n  \\\"blog_title\\\": \\\"[Your formatted <h1> title here without tags]\\\",\n  \\\"content\\\": \\\"[Full HTML content as a string with tags as per the structure above]\\\",\n  \\\"excerpt\\\": \\\"[SEO-friendly excerpt summary]\\\",\n  \\\"page_title\\\": \\\"[SEO page title]\\\",\n  \\\"meta_description\\\": \\\"[SEO meta description]\\\"  \n}\n\nWrite the response ONLY as this JSON object without any additional commentary or text.\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "a22f016d-fc40-4b8f-8d63-55c888175601",
      "name": "Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1456,
        304
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "rJcvhJlIc3a5dpyu",
          "name": "gimini_myFirstProject_manipritraj"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4d2eacd5-3f48-4c63-898b-3246c7a118d3",
      "name": "输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1344,
        304
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"blog_title\": \"blog_title\",\n  \"content\": \"content_html\",\n  \"excerpt\": \"excerpt\",\n  \"page_title\": \"page_title\",\n  \"meta_description\": \"meta_description\"\n}\n"
      },
      "typeVersion": 1.3
    },
    {
      "id": "41194322-ba19-45b8-acb8-b5b9cb9dbebd",
      "name": "Gemini1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1072,
        304
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "rJcvhJlIc3a5dpyu",
          "name": "gimini_myFirstProject_manipritraj"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c7623b7a-0575-4ab9-b4cb-6647374aa87d",
      "name": "限制 = 1",
      "type": "n8n-nodes-base.limit",
      "position": [
        -1440,
        16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a615f9c7-7adf-4b9c-8188-f26f4d5407e9",
      "name": "更新博客内容",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -832,
        16
      ],
      "parameters": {
        "columns": {
          "value": {
            "content": "={{ $json.output.content }}",
            "excerpt": "={{ $json.output.excerpt }}",
            "blog_title": "={{ $json.output.blog_title }}",
            "page_title": "={{ $json.output.page_title }}",
            "product_id": "={{ $('Limit = 1').item.json.product_id }}",
            "URL _handle": "={{ $('Limit = 1').item.json.handle }}",
            "blog_status": "generated",
            "meta_description": "={{ $json.output.meta_description }}"
          },
          "schema": [
            {
              "id": "product_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "product_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "blog_title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "blog_title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "content",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "excerpt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "excerpt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "page_title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "page_title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "meta_description",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "meta_description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "URL _handle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "URL _handle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "blog_status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "blog_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "article_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "product_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1548183235,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit#gid=1548183235",
          "cachedResultName": "blog_post"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit?usp=drivesdk",
          "cachedResultName": "shopify_blog_n8n"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GL43UggUq5EHLIyU",
          "name": "n8n.verified@gmail.com"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "c4f97660-c407-4b82-80e9-1fb3a5057bfe",
      "name": "修复内容格式",
      "type": "n8n-nodes-base.code",
      "position": [
        -640,
        16
      ],
      "parameters": {
        "jsCode": "// Get input JSON\nlet input = $input.first().json;\n\n// Function to convert raw HTML into Shopify-safe JSON string\nfunction makeJsonSafe(html) {\n  return html\n    .replace(/\\\\/g, \"\\\\\\\\\")    // escape backslashes\n    .replace(/\"/g, '\\\\\"')      // escape quotes\n    .replace(/\\n/g, \"\\\\n\")     // escape line breaks\n    .replace(/\\r/g, \"\");       // remove carriage returns (Windows line breaks)\n}\n\n// Process body_html\nlet safeContent = makeJsonSafe(input.content);\n\n// Return all fields in correct JSON structure\nreturn {\n  json: {\n    blog_title: input.blog_title,\n    excerpt: input.excerpt,\n    page_title: input.page_title,\n    meta_description: input.meta_description,\n    \"URL _handle\": input[\"URL _handle\"],\n    blog_status: input.blog_status,\n    body_html: safeContent\n  }\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "29e2dedd-1eae-414e-a6b7-ea5824547e58",
      "name": "博客创建",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -416,
        16
      ],
      "parameters": {
        "url": "https://p7wqck-r7.myshopify.com/admin/api/2025-07/blogs/118631235877/articles.json",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"article\": {\n    \"title\": \"{{ $json.blog_title }}\",\n    \"author\": \"Manish Kumar\",\n    \"tags\": \"Electronics\",\n    \"body_html\": \"{{ $json.body_html }}\",\n    \"published_at\": \"{{$now}}\"\n  }\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "shopifyAccessTokenApi"
      },
      "credentials": {
        "shopifyAccessTokenApi": {
          "id": "UYgX73aiHW2gyQq6",
          "name": "Admin_Manish"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5cc50b49-1adb-4598-8fd4-9e9e2d710912",
      "name": "状态更新",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -192,
        16
      ],
      "parameters": {
        "columns": {
          "value": {
            "article_id": "={{ $json.article.id }}",
            "product_id": "={{ $('Update Blog Content').item.json.product_id }}",
            "blog_status": "posted"
          },
          "schema": [
            {
              "id": "product_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "product_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "blog_title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "blog_title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "content",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "excerpt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "excerpt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "page_title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "page_title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "meta_description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "meta_description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "URL _handle",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "URL _handle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "blog_status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "blog_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "article_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "product_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1548183235,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit#gid=1548183235",
          "cachedResultName": "blog_post"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit?usp=drivesdk",
          "cachedResultName": "shopify_blog_n8n"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GL43UggUq5EHLIyU",
          "name": "n8n.verified@gmail.com"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a976c2f9-2ad3-4d9c-8eaf-8d4be4887a16",
      "name": "无",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1664,
        304
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "759af36b-3460-4a4e-8ca6-c3ee970babbd",
      "name": "无1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -400,
        288
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0753ecfb-4571-4bb8-9f30-c8c9f7689462",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2288,
        -480
      ],
      "parameters": {
        "color": 6,
        "width": 480,
        "height": 928,
        "content": "# 工作流用户指南"
      },
      "typeVersion": 1
    },
    {
      "id": "ebd6d255-ffef-457f-b568-39a1f3bb3641",
      "name": "更新输入表",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -816,
        288
      ],
      "parameters": {
        "columns": {
          "value": {
            "product_id": "={{ $('Limit = 1').item.json.product_id }}",
            "blog_status": "used"
          },
          "schema": [
            {
              "id": "product_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "product_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "blog_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "blog_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "blog_status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "blog_status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "description",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "handle",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "handle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image_1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Image_1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image_2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Image_2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image_3",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Image_3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image_4",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Image_4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "product_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 25757113,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit#gid=25757113",
          "cachedResultName": "refined_input"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/110yQOPnce7Sx4My18yaG5gye9x5qAB_oZZaKXF0bBh8/edit?usp=drivesdk",
          "cachedResultName": "shopify_blog_n8n"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GL43UggUq5EHLIyU",
          "name": "n8n.verified@gmail.com"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "17dbeb60-6a41-4b44-9a20-1ae4d185f4f9",
      "name": "便签说明4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2800,
        -480
      ],
      "parameters": {
        "color": 6,
        "width": 480,
        "height": 928,
        "content": "# 作者详情"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {
    "Magic Room": [
      {
        "output": {
          "content": "<h1>Breathe Easy Anywhere: Discover AuraWave Portable Air Purifier</h1>\n<p>Is stale, allergen-filled air making you uncomfortable? Whether at home, the office, or traveling, poor air quality can impact your well-being. Introducing the AuraWave Portable Air Purifier – your silent solution for cleaner, fresher air. This compact device uses advanced HEPA filtration to eliminate dust, allergens, and odors, ensuring you breathe better, wherever you are.</p>\n<ul>\n<li><strong>True HEPA Filtration:</strong> Captures 99.97% of particles as tiny as 0.3 microns, including dust, pollen, and pet dander.</li>\n<li><strong>Whisper-Quiet Operation:</strong> Enjoy undisturbed peace; perfect for bedrooms, nurseries, or quiet workspaces.</li>\n<li><strong>Cordless Convenience:</strong> USB rechargeable battery provides ultimate portability and freedom from outlets.</li>\n<li><strong>Compact & Lightweight:</strong> Easily fits into any bag or desk, making it your ideal travel companion.</li>\n<li><strong>Odor Elimination:</strong> Effectively removes unpleasant smells, leaving your space fresh and clean.</li>\n<li><strong>Allergy & Asthma Relief:</strong> Creates a safer environment for sufferers by reducing airborne triggers.</li>\n</ul>\n<div>\n<blockquote>\n<p>\"I suffer from severe allergies, and the AuraWave has been a game-changer! I keep it on my nightstand, and I've noticed a significant reduction in my morning congestion. Plus, it's so quiet I barely know it's there.\" – Sarah L.</p>\n</blockquote>\n<blockquote>\n<p>\"Working in a small office, the air often feels stuffy. Since getting the AuraWave, my concentration has improved, and I feel much more energized. It's incredibly discreet and powerful for its size.\" – Mark T.</p>\n</blockquote>\n<blockquote>\n<p>\"We took our AuraWave on our last road trip, and it made such a difference in hotel rooms. It's small enough not to be a hassle and ensures we always have clean air, no matter where we are.\" – Jessica R.</p>\n</blockquote>\n</div>\n<p><strong>Who is the AuraWave for?</strong> This portable air purifier is perfect for anyone seeking to improve their personal air quality. It's an essential for allergy and asthma sufferers, remote workers, students in dorms, frequent travelers, or simply anyone who desires a fresh, clean breathing space, anytime, anywhere.</p>\n<p>Ready to experience the difference clean air makes? Elevate your environment and breathe easier with the AuraWave Portable Air Purifier. Click here to shop now and start your journey to a healthier, fresher you!</p>",
          "excerpt": "Breathe cleaner, fresher air anywhere with AuraWave, the silent and compact portable air purifier. Removes dust, allergens, and odors with HEPA filtration.",
          "blog_title": "Breathe Easy Anywhere: Discover AuraWave Portable Air Purifier",
          "page_title": "AuraWave Portable Air Purifier - Clean Air Anywhere",
          "meta_description": "Discover AuraWave, the compact & silent portable air purifier. Features HEPA filtration for dust, allergens, and odor removal. Breathe fresh air at home, office, or travel."
        }
      }
    ],
    "Start Creation": [
      {}
    ]
  },
  "connections": {
    "Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Magic Room",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Gemini1": {
      "ai_languageModel": [
        [
          {
            "node": "Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Limit = 1": {
      "main": [
        [
          {
            "node": "Magic Room",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Magic Room": {
      "main": [
        [
          {
            "node": "Update Input table",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update Blog Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blog Creation": {
      "main": [
        [
          {
            "node": "Status Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Magic Room",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Status Update": {
      "main": [
        [
          {
            "node": "Nothing1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Creation": {
      "main": [
        [
          {
            "node": "Get All Product Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update the sheet": {
      "main": [
        [
          {
            "node": "Filter Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Duplicates": {
      "main": [
        [
          {
            "node": "Limit = 1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fix Content Format": {
      "main": [
        [
          {
            "node": "Blog Creation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Blog Content": {
      "main": [
        [
          {
            "node": "Fix Content Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fix the input format": {
      "main": [
        [
          {
            "node": "Update the sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Product Details": {
      "main": [
        [
          {
            "node": "Product Details to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product Details to Sheet": {
      "main": [
        [
          {
            "node": "Fix the input format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 杂项, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量22
分类2
节点类型12
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
MANISH KUMAR

MANISH KUMAR

@manipritraj

Automation Architect | n8n Expert I turn repetition into magic! Building workflows for: - Content creation (YouTube/social media) - Business ops (CRM/data pipelines) - Personal productivity (AI/smart home) Superpowers: API integrations • Debugging • Scalable solutions Featured: YouTube Shorts Automator • AI Report Generator • Custom ChatGPT+n8n "Automation should adapt to humans" 📧 manipritraj@gmail.com Fun fact: Automated my coffee+news+cat feeder! ☕🐈

外部链接
在 n8n.io 查看

分享此工作流