8
n8n 中文网amn8n.com

Wordpress 文章

高级

这是一个Content Creation, Miscellaneous, Multimodal AI领域的自动化工作流,包含 20 个节点。主要使用 Set, Xml, Code, Wordpress, HttpRequest 等节点。 基于Google Trends、GPT-4、Pexels和WordPress的自动化博客发布

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "cY0Ei2ol8P7LYNPR",
  "meta": {
    "instanceId": "892a3df6372a84492288244766349ba713f7f5de4e6f4fc66a0a8b2d3a313ed4",
    "templateCredsSetupCompleted": true
  },
  "name": "Wordpress 文章",
  "tags": [],
  "nodes": [
    {
      "id": "2d730ee3-48d6-4732-9cc3-39d250c6acbc",
      "name": "主配置",
      "type": "n8n-nodes-base.set",
      "notes": "config",
      "position": [
        -256,
        -48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "25d7e553-9678-40ad-bb69-e4eb4bce4d11",
              "name": "min_traffic",
              "type": "number",
              "value": 500
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "da1376eb-342b-4628-aa80-4b738ec5e3a8",
      "name": "Google 趋势",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        -48
      ],
      "parameters": {
        "url": "https://trends.google.it/trending/rss",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "geo",
              "value": "US"
            }
          ]
        }
      },
      "executeOnce": true,
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "b8244b2e-0110-4754-b062-463bdfd33489",
      "name": "XML",
      "type": "n8n-nodes-base.xml",
      "position": [
        96,
        -48
      ],
      "parameters": {
        "options": {
          "normalize": false,
          "explicitArray": false
        }
      },
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "e1f20a6f-2569-4aa4-8e26-430414f12e20",
      "name": "筛选抓取的关键词",
      "type": "n8n-nodes-base.code",
      "position": [
        272,
        -48
      ],
      "parameters": {
        "jsCode": "const min_traffic = $('Main Config').first().json.min_traffic;\n\nconst items = $('XML').first().json.rss.channel.item;\nconst trafficKey = Object.keys(items[0]).find(key => key.includes(\"approx_traffic\"));\nconst parseTraffic = (traffic) => parseInt(traffic.replace('+', ''), 10);\n\nconst newItems = items.map(item => {\n    const links = Array.isArray(item[\"ht:news_item\"]) ? item[\"ht:news_item\"].slice(0, 3) : [];\n\n    const flattenedLinks = links.reduce((acc, news, index) => {\n        acc[`title_${index + 1}`] = news[\"ht:news_item_title\"];\n        return acc;\n    }, {});\n\n    return {\n        trending_keyword: item.title,\n        approx_traffic: parseTraffic(item[trafficKey]),\n        pubDate: item.pubDate,\n        ...flattenedLinks,\n    };\n})\n// Filter by min_traffic AND check if not already in sheet\n.filter(item => \n    item.approx_traffic >= min_traffic\n);\n\nlet sortedItems = newItems.sort((a, b) => b.approx_traffic - a.approx_traffic);\nreturn sortedItems;"
      },
      "typeVersion": 2,
      "alwaysOutputData": false
    },
    {
      "id": "b26c064b-389f-4312-80dd-358b3eb24e0d",
      "name": "在表格中追加或更新行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -144,
        176
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{Math.floor(Math.random()*999999999)}}",
            "Date": "={{ $json.pubDate }}",
            "Keyword": "={{ $json.trending_keyword }}",
            "Traffic": "={{ $json.approx_traffic }}",
            "Example Title 1": "={{ $json.title_1 }}",
            "Example Title 2": "={{ $json.title_2 }}",
            "Example Title 3": "={{ $json.title_3 }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Keyword",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Traffic",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Traffic",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Example Title 1",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Example Title 1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Example Title 2",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Example Title 2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Example Title 3",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Example Title 3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Keyword"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u5xhVq3QL5CSiWN8zUVGFnp-GE7Ss-2avAzzUjl4-BM/edit#gid=0",
          "cachedResultName": "Keywords"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1u5xhVq3QL5CSiWN8zUVGFnp-GE7Ss-2avAzzUjl4-BM",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u5xhVq3QL5CSiWN8zUVGFnp-GE7Ss-2avAzzUjl4-BM/edit?usp=drivesdk",
          "cachedResultName": "Main Wordpress"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "PxND4adnuEQ3xOeZ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "a94ac3fe-f896-4339-928a-762cd88b15f9",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -416,
        176
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "74be89ac-e914-462d-acd4-c39f97e7d16c",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        496,
        -48
      ],
      "parameters": {
        "text": "=You are a seasoned content writer and SEO expert specializing in crafting compelling, human-like blog posts for WordPress. Your goal is to produce articles that feel authentic, conversational, and engaging, as if written by a passionate human author with a unique voice. Generate a high-quality, SEO-optimized article based on these inputs:\n\nKeyword: {{ $json.Keyword }}\nDate: {{ $json.Date }}\nExample Titles: \n1. {{ $json['Example Title 1'] }}\n2. {{ $json['Example Title 2'] }}\n3. {{ $json['Example Title 3'] }}\n\nBest Practices and Guidelines:\n- Adopt a natural, relatable tone: Write like you're chatting with a friend use contractions (e.g., \"you're\" instead of \"you are\"), varied sentence lengths, rhetorical questions, personal anecdotes or hypothetical scenarios to draw readers in, and subtle humor where it fits. Avoid stiff, robotic phrasing; make it flow like everyday conversation while staying professional.\n- Craft a magnetic, SEO-friendly title: Draw inspiration from the example titles, incorporating the main keyword naturally near the beginning. Aim for 50-60 characters to encourage clicks, and make it benefit-oriented or curiosity-driven (e.g., \"How [Keyword] Can Transform Your [Benefit] in 2025\").\n- Create a meta description: Write a concise, enticing summary around 140-160 characters that includes the keyword, highlights key benefits, and ends with a call-to-action to subscribe on our newsletter \n- Hook with an introduction: Start with 2-3 engaging sentences that pose a problem, share a surprising fact, or tell a quick story related to the keyword and date for timeliness.\n- Structure for readability and SEO: Organize into logical sections with H2 headings (use <h2> tags) that include variations of the keyword or related terms. Use H3 subheadings (<h3> tags) for deeper breakdowns. Incorporate short paragraphs (3-5 sentences max), bullet points (<ul> or <ol>), bold (<strong>) or italic (<em>) text for emphasis, and numbered lists where helpful.\n- Optimize for SEO without stuffing: Weave the main keyword naturally (aim for 1-2% density), plus related long-tail variations, in the intro, headings, and conclusion. If relevant, do not include any image.\n- Enhance engagement: Add calls-to-action (e.g., \"What do you think? Share in the comments!\"), questions to prompt reflection, and transitions like \"But wait, there's more...\" to keep readers scrolling. Ensure the content is original, insightful, and backed by logical reasoning or general knowledge avoid fluff or repetition.\n- Word count: Target 800-1,200 words for in-depth value, making it comprehensive yet skimmable.\n- WordPress optimization: Output the content as clean, valid HTML ready for the WordPress editor. Use semantic tags like <p> for paragraphs, <ul>/<li> for lists, and avoid unnecessary divs or styles WordPress will handle themes.\n- Do not include any image.\n- Do not include any refer to another website.\n- Do not use —, “”, ‘’ or any non human writing.\n\nGenerate the full article without any code blocks or extraneous notes.\n\nOutput Format:\n{\n\t\"title\": \"Your Catchy Title Here (50-60 characters)\",\n    \"description\": \"Engaging meta description here (140-160 characters)\",\n\t\"content\": \"The full HTML body content of the article, starting with the intro <p> and including all headings, paragraphs, lists, and links.\",\n    \"images_query\": \"The query string to search images based on article. Max 3-4 words\"\n}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "ba329d0d-06bc-4fac-a31c-2e64b4b45d4e",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        656,
        160
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"title\": \"Title of article 50 characters\",\n    \"description\": \"Description around 140 characters\",\n\t\"content\": \"The html body content of article\",\n    \"images_query\": \"The query string to search images based on article. Max 3-4 words\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "ac744a00-645a-4054-ac7a-5ec389908bb3",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        480,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "3L3deymUEbToIsPg",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "537693df-e3f0-4119-b0b0-a800b794dd93",
      "name": "抓取一个随机关键词",
      "type": "n8n-nodes-base.code",
      "position": [
        320,
        176
      ],
      "parameters": {
        "jsCode": "const allItems = $input.all();\nconst processingItems = allItems.filter(item => \n    item.json.Status === \"processing\" && \n    item.json.Keyword && item.json.Keyword.trim() !== \"\" &&\n    item.json['Example Title 1'] && item.json['Example Title 1'].trim() !== \"\"\n);\n\nlet selectedItem = null;\nif (processingItems.length > 0) {\n    const randomIndex = Math.floor(Math.random() * processingItems.length);\n    selectedItem = processingItems[randomIndex];\n}\n\nreturn selectedItem ? [selectedItem] : [];"
      },
      "typeVersion": 2
    },
    {
      "id": "2cf7053e-ea11-4766-a9ad-36b4d329b594",
      "name": "在工作表中更新行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        832,
        -48
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "done",
            "Keyword": "={{ $('Grab one random keyword').item.json.Keyword }}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Keyword",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Traffic",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Traffic",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Example Title 1",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Example Title 1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Example Title 2",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Example Title 2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Example Title 3",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Example Title 3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "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": [
            "Keyword"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u5xhVq3QL5CSiWN8zUVGFnp-GE7Ss-2avAzzUjl4-BM/edit#gid=0",
          "cachedResultName": "Keywords"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1u5xhVq3QL5CSiWN8zUVGFnp-GE7Ss-2avAzzUjl4-BM",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u5xhVq3QL5CSiWN8zUVGFnp-GE7Ss-2avAzzUjl4-BM/edit?usp=drivesdk",
          "cachedResultName": "Main Wordpress"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "PxND4adnuEQ3xOeZ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "32cfda7c-0176-4043-87c5-3fd03ed72306",
      "name": "搜索 Pexels 图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        832,
        144
      ],
      "parameters": {
        "url": "=https://api.pexels.com/v1/search?query={{ encodeURIComponent($('AI Agent').item.json.output.images_query)}}&per_page=1",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "rglUlDGgH0ngalAE",
          "name": "Header Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "2353d1f9-93d4-4260-a32e-046360ecaf04",
      "name": "在 Wordpress 上创建文章",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        1216,
        -32
      ],
      "parameters": {
        "title": "={{ $('AI Agent').item.json.output.title }}",
        "additionalFields": {
          "status": "draft",
          "content": "={{ $json.output.content }}",
          "categories": [
            4
          ],
          "pingStatus": "open"
        }
      },
      "credentials": {
        "wordpressApi": {
          "id": "GJiiJg78GQtmhj7o",
          "name": "Wordpress account"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "1c1ddb04-e797-47a0-98a4-440a0e7cf7dc",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -448,
        -48
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 25
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cc9a4bc5-77b6-4883-8b9a-e7cf11c1ad10",
      "name": "为文章设置图片 ID",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        368
      ],
      "parameters": {
        "url": "=https://clipmint.pro/wp-json/wp/v2/posts/{{ $('Create posts on Wordpress').item.json.id }}",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "featured_media",
              "value": "={{ $json.id }}"
            }
          ]
        },
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "GJiiJg78GQtmhj7o",
          "name": "Wordpress account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "abbd05e2-f704-44da-bb07-4aa6bc1f4435",
      "name": "清理 AI",
      "type": "n8n-nodes-base.code",
      "position": [
        1008,
        144
      ],
      "parameters": {
        "jsCode": "// List of common \"extra\" characters writers add\nconst cleanupChars = [\n  '—',  // em dash\n  '–',  // en dash\n  '—',\n  '…',  // ellipsis\n  '“', '”', '‘', '’',  // fancy quotes\n  '\\u200B', // zero-width space\n  '\\u00A0', // non-breaking space\n];\n\n// Function to clean HTML content but keep tags\nfunction cleanHtml(html) {\n  if (!html) return html;\n  \n  let cleaned = html;\n\n  // Remove unwanted characters\n  cleanupChars.forEach(char => {\n    cleaned = cleaned.split(char).join('');\n  });\n\n  // Collapse multiple spaces/newlines (but preserve tags)\n  cleaned = cleaned.replace(/>\\s+</g, '><') // remove spaces between tags\n                   .replace(/\\s{2,}/g, ' ') // collapse multiple spaces\n                   .trim();\n\n  return cleaned;\n}\n\n// Process each item\nreturn items.map(item => {\n  const newItem = { ...item };\n\n  // Replace this with your actual HTML field\n  const htmlContent = $('AI Agent').first().json.output.content;\n\n  if (htmlContent) {\n    newItem.json.output = newItem.json.output || {};\n    newItem.json.output.content = cleanHtml(htmlContent);\n  }\n\n  return newItem;\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "7c370688-3048-4e1d-b4ad-b6baa62d9dee",
      "name": "更新图片元数据",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        528,
        368
      ],
      "parameters": {
        "url": "=https://clipmint.pro/wp-json/wp/v2/media/{{ $('Upload media').item.json.id }}",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"title\": \"{{ $('AI Agent').item.json.output.title }}\",\n  \"alt_text\": \"{{ $('AI Agent').item.json.output.title }} image\",\n  \"description\": \"{{ $('AI Agent').item.json.output.description }}\"\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "GJiiJg78GQtmhj7o",
          "name": "Wordpress account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4f0d2e31-38a9-425b-add0-31e1f6909493",
      "name": "获取表格中的行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        96,
        176
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "processing",
              "lookupColumn": "Status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u5xhVq3QL5CSiWN8zUVGFnp-GE7Ss-2avAzzUjl4-BM/edit#gid=0",
          "cachedResultName": "Keywords"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1u5xhVq3QL5CSiWN8zUVGFnp-GE7Ss-2avAzzUjl4-BM",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u5xhVq3QL5CSiWN8zUVGFnp-GE7Ss-2avAzzUjl4-BM/edit?usp=drivesdk",
          "cachedResultName": "Main Wordpress"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "PxND4adnuEQ3xOeZ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "04b604e7-8abb-4e93-9ff1-10e357bae66e",
      "name": "上传媒体",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        96,
        368
      ],
      "parameters": {
        "url": "https://clipmint.pro/wp-json/wp/v2/media",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Disposition",
              "value": "=attachment; filename=\"{{ $('AI Agent').item.json.output.images_query }}.jpg\""
            }
          ]
        },
        "inputDataFieldName": "data",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "GJiiJg78GQtmhj7o",
          "name": "Wordpress account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "73410038-05fe-47b5-ac04-7a058c68a4fd",
      "name": "为图片添加水印",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1216,
        160
      ],
      "parameters": {
        "url": "https://quickchart.io/watermark",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "mainImageUrl",
              "value": "={{ $('Search Pexels Image').item.json.photos[0].src.landscape }}"
            },
            {
              "name": "markImageUrl",
              "value": "https://clipmint.pro/wp-content/uploads/2025/09/Clipmintlogotext-300x68.png"
            },
            {
              "name": "markRatio",
              "value": "0.25"
            }
          ]
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7464cde1-320c-4374-b5e7-2bbcfdf36460",
  "connections": {
    "XML": {
      "main": [
        [
          {
            "node": "Filter Scraped Keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Main Config": {
      "main": [
        [
          {
            "node": "GoogleTrends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GoogleTrends": {
      "main": [
        [
          {
            "node": "XML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media": {
      "main": [
        [
          {
            "node": "Set image ID for the post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cleanup the AI": {
      "main": [
        [
          {
            "node": "Create posts on Wordpress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Get row in sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row in sheet": {
      "main": [
        [
          {
            "node": "Grab one random keyword",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Main Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Search Pexels Image": {
      "main": [
        [
          {
            "node": "Cleanup the AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Search Pexels Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add watermark to image": {
      "main": [
        [
          {
            "node": "Upload media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Scraped Keywords": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Grab one random keyword": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Create posts on Wordpress": {
      "main": [
        [
          {
            "node": "Add watermark to image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set image ID for the post": {
      "main": [
        [
          {
            "node": "Update image metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 内容创作, 杂项, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
高级
节点数量20
分类3
节点类型11
难度说明

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

作者
Cojocaru David

Cojocaru David

@cojo

Junior Full Stack Developer specializing in modern web technologies. Expert in React, Node.js, TypeScript, and cloud development. Read my latest tech tutorials, project insights, and programming tips on web development, DevOps, and software engineering best practices.

外部链接
在 n8n.io 查看

分享此工作流