8
n8n 中文网amn8n.com

Khaisa工作室 - Polylang

高级

这是一个AI领域的自动化工作流,包含 25 个节点。主要使用 Code, Wordpress, HttpRequest, ManualTrigger, Agent 等节点,结合人工智能技术实现智能自动化。 使用OpenAI生成多语言博客文章,支持Yoast和Polylang

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "lLLiZbtro1xcBfAJ",
  "meta": {
    "instanceId": "6195cc49af3fb53a44d2c88f9d4452644fc510eb857dcef9b6afe681b0ea8916",
    "templateCredsSetupCompleted": true
  },
  "name": "Khaisa studio - Polylang",
  "tags": [],
  "nodes": [
    {
      "id": "d26ca442-3d74-44ba-b776-f6a1be6418b4",
      "name": "手动触发器",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        1640,
        3620
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "044f8c00-f7dd-4122-a7e7-4d698dd7d924",
      "name": "获取最新文章",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1860,
        3340
      ],
      "parameters": {
        "url": "https://<yourweb.site>/wp-json/wp/v2/posts?per_page=5",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "9a011830-5d59-439f-a847-6d328109d3c2",
      "name": "获取所有分类法",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1860,
        3500
      ],
      "parameters": {
        "url": "https://yourweb.site>/wp-json/wp/v2/taxonomies",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4a75282b-a4dd-44a4-97bc-a11db56e0b07",
      "name": "获取文章架构",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1860,
        3660
      ],
      "parameters": {
        "url": "https://yourweb.site>/wp-json/wp/v2/posts",
        "method": "OPTIONS",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "eea71bad-e20a-45dc-a75c-abd6cc1c0854",
      "name": "获取 API 路由",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1860,
        3820
      ],
      "parameters": {
        "url": "https://<yourweb.site>/wp-json",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f525a26a-2716-4530-80d9-3e3c9fcc523d",
      "name": "获取单篇文章详情",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2060,
        3340
      ],
      "parameters": {
        "url": "=https://yourweb.site>/wp-json/wp/v2/posts/{{ $json.id }}?_embed",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5321b73e-b7ae-44b9-9a4f-43c81ee40aac",
      "name": "检查语言端点",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2060,
        3500
      ],
      "parameters": {
        "url": "https://yourweb.site>/wp-json/wp/v2/language",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        },
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0cb03306-bb18-4326-8249-ec94982dd3e3",
      "name": "检查 PLL 端点",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2060,
        3660
      ],
      "parameters": {
        "url": "https://<yourweb.site>/wp-json/pll/v1",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        },
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "47fd2403-fdfb-4e17-8518-b7ef4545df0f",
      "name": "获取分类项",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2060,
        3820
      ],
      "parameters": {
        "url": "https://<yourweb.site>/wp-json/wp/v2/terms",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        },
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "65f55a1c-9027-4a52-8352-006bb7169cef",
      "name": "分析文章结构",
      "type": "n8n-nodes-base.code",
      "position": [
        2260,
        3340
      ],
      "parameters": {
        "jsCode": "// Analyze a single post to understand Polylang structure\nconst results = {\n  discovery: [],\n  polylangFields: [],\n  languageHandling: '',\n  recommendations: [],\n  rawData: {}\n};\n\n// Get the post data\nconst items = $input.all();\nif (items.length === 0) {\n  return {\n    error: 'No input data received',\n    recommendation: 'Check if the previous nodes executed successfully'\n  };\n}\n\nconst postData = items[0].json;\nresults.rawData.sample = postData;\n\n// Look for language fields in the post\nif (postData) {\n  for (const key in postData) {\n    if (key.toLowerCase().includes('lang') || \n        key.toLowerCase().includes('locale') ||\n        key.toLowerCase().includes('translation')) {\n      results.polylangFields.push({\n        field: key,\n        value: postData[key],\n        type: typeof postData[key]\n      });\n    }\n  }\n  \n  // Check _links for language info\n  if (postData._links) {\n    for (const rel in postData._links) {\n      if (rel.includes('translation') || \n          rel.includes('language') ||\n          rel.includes('pll')) {\n        results.polylangFields.push({\n          field: `_links.${rel}`,\n          value: postData._links[rel],\n          type: 'link relation'\n        });\n      }\n    }\n  }\n  \n  // Check _embedded for language data\n  if (postData._embedded) {\n    for (const embed in postData._embedded) {\n      if (embed.includes('term') || embed.includes('language')) {\n        results.discovery.push({\n          type: 'embedded',\n          field: embed,\n          data: postData._embedded[embed]\n        });\n      }\n    }\n  }\n  \n  // Check meta fields\n  if (postData.meta) {\n    for (const metaKey in postData.meta) {\n      if (metaKey.toLowerCase().includes('lang') || \n          metaKey.toLowerCase().includes('locale')) {\n        results.polylangFields.push({\n          field: `meta.${metaKey}`,\n          value: postData.meta[metaKey],\n          type: 'meta field'\n        });\n      }\n    }\n  }\n}\n\n// Generate recommendations\nif (results.polylangFields.length > 0) {\n  results.languageHandling = 'Polylang fields detected in REST API';\n  results.recommendations.push('Language fields found: ' + results.polylangFields.map(f => f.field).join(', '));\n  results.recommendations.push('Use these fields when creating posts');\n} else {\n  results.languageHandling = 'No obvious Polylang fields in post data';\n  results.recommendations.push('Language might be handled through custom taxonomies or separate API calls');\n  results.recommendations.push('Check the taxonomies and routes endpoints for more information');\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "65c41cb1-b943-4222-9f1f-99627f59c3dc",
      "name": "分析分类法",
      "type": "n8n-nodes-base.code",
      "position": [
        2260,
        3500
      ],
      "parameters": {
        "jsCode": "// Analyze taxonomies for language handling\nconst results = {\n  languageTaxonomies: [],\n  allTaxonomies: [],\n  recommendations: []\n};\n\nconst items = $input.all();\nif (items.length === 0 || !items[0].json) {\n  return { error: 'No taxonomy data received' };\n}\n\nconst taxonomies = items[0].json;\n\n// List all taxonomies\nfor (const taxSlug in taxonomies) {\n  const tax = taxonomies[taxSlug];\n  results.allTaxonomies.push({\n    slug: taxSlug,\n    name: tax.name,\n    restBase: tax.rest_base\n  });\n  \n  // Check for language-related taxonomies\n  if (taxSlug.includes('language') || \n      taxSlug.includes('translation') ||\n      taxSlug === 'lang' ||\n      tax.name?.toLowerCase().includes('language')) {\n    results.languageTaxonomies.push({\n      slug: taxSlug,\n      details: tax\n    });\n  }\n}\n\n// Generate recommendations\nif (results.languageTaxonomies.length > 0) {\n  results.recommendations.push('Language taxonomy found: ' + results.languageTaxonomies[0].slug);\n  results.recommendations.push('Use this taxonomy when creating posts by adding it to the taxonomies parameter');\n} else {\n  results.recommendations.push('No dedicated language taxonomy found');\n  results.recommendations.push('Language might be handled through post meta or custom fields');\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "598642ca-a558-4425-820a-760aad33dca7",
      "name": "分析 API 路由",
      "type": "n8n-nodes-base.code",
      "position": [
        2260,
        3820
      ],
      "parameters": {
        "jsCode": "// Check API routes for Polylang endpoints\nconst results = {\n  polylangRoutes: [],\n  allNamespaces: [],\n  recommendations: []\n};\n\nconst items = $input.all();\nif (items.length === 0 || !items[0].json) {\n  return { error: 'No route data received' };\n}\n\nconst apiData = items[0].json;\n\n// Check namespaces\nif (apiData.namespaces) {\n  results.allNamespaces = apiData.namespaces;\n  \n  // Look for Polylang namespace\n  const pllNamespaces = apiData.namespaces.filter(ns => \n    ns.includes('pll') || \n    ns.includes('polylang') || \n    ns.includes('language')\n  );\n  \n  if (pllNamespaces.length > 0) {\n    results.polylangRoutes = pllNamespaces;\n    results.recommendations.push('Polylang API namespace found: ' + pllNamespaces.join(', '));\n    results.recommendations.push('Explore these endpoints for language management');\n  }\n}\n\n// Check routes\nif (apiData.routes) {\n  for (const route in apiData.routes) {\n    if (route.includes('pll') || \n        route.includes('language') || \n        route.includes('translation')) {\n      results.polylangRoutes.push({\n        route: route,\n        methods: apiData.routes[route].methods\n      });\n    }\n  }\n}\n\nif (results.polylangRoutes.length === 0) {\n  results.recommendations.push('No dedicated Polylang routes found');\n  results.recommendations.push('Language handling is likely integrated into standard WP endpoints');\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "1e8935ab-e3b9-41ff-942a-7ed8e5d38350",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        3300
      ],
      "parameters": {
        "width": 980,
        "height": 720,
        "content": "## Polylang 调试"
      },
      "typeVersion": 1
    },
    {
      "id": "1fd3b081-5185-416f-af0d-925630fcafd0",
      "name": "OpenAI 模型 - 文章1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3200,
        3520
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {
          "maxTokens": 2500,
          "temperature": 0.8
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "TFeNsOhMdVKP8DCw",
          "name": "Akhsan"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c719ee7d-315a-44cf-bc48-c7fc86c6bb02",
      "name": "解析主题 JSON1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3020,
        3520
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"category\": \"F-1 Visa\",\n  \"categoryId\": 4794,\n  \"language\": \"en\",\n  \"topic\": \"F-1 visa interview preparation\",\n  \"title\": \"Essential F-1 Visa Interview Tips for International Students\",\n  \"slug\": \"f1-visa-interview-tips-international-students\",\n  \"metaDescription\": \"Master your F-1 visa interview with proven tips and common questions. Get expert guidance for international students applying to US universities.\",\n  \"focusKeyphrase\": \"F-1 visa interview tips\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "df2f35e8-1e1a-45b0-bbf1-b36eca0df6dc",
      "name": "OpenAI 模型 - 主题1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2860,
        3520
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {
          "temperature": 0.7
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "TFeNsOhMdVKP8DCw",
          "name": "Akhsan"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cc908638-83dd-4d5f-9742-d05227bdbacd",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2580,
        3300
      ],
      "parameters": {
        "width": 1200,
        "height": 720,
        "content": "## 文章生成器"
      },
      "typeVersion": 1
    },
    {
      "id": "27d4da14-3360-4af6-a312-31874554b401",
      "name": "每周计划",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        2680,
        3380
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                3
              ],
              "triggerAtHour": 10
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "27869c0f-c7f0-49f7-84d4-34f08bb87102",
      "name": "生成主题和元数据",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2860,
        3380
      ],
      "parameters": {
        "text": "=You are an expert content strategist for <yourweb.site> specializing in visa and education content. Generate ONE blog post topic.\n\n1. Select ONE category from these available WordPress categories:\n   - \n2. Select a target language from: en (English), tr (Turkish), fa (Farsi)\n\n3. Create an engaging topic and metadata for a blog post.\n\n4. Format your response EXACTLY like this:\n{\n  \"category\": \"[WordPress category name]\",\n  \"categoryId\": [category ID number],\n  \"language\": \"[language code: en, tr, or fa]\",\n  \"topic\": \"[specific topic]\",\n  \"title\": \"[engaging SEO-friendly title]\",\n  \"slug\": \"[url-friendly-slug-lowercase-with-hyphens]\",\n  \"metaDescription\": \"[meta description under 160 characters]\",\n  \"focusKeyphrase\": \"[main keyword phrase]\"\n}\n\nIMPORTANT:\n- Topics should be practical and helpful\n- Keep titles clear and engaging\n- Meta descriptions should be compelling and under 160 characters\n- Slug should be lowercase with hyphens, no special characters\n- Randomly select different languages to ensure content diversity\n- If selecting tr or fa, still generate the content in English (it will be translated later)",
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.6
    },
    {
      "id": "4126e8f8-8cc1-42e7-8b50-d818ee1e1857",
      "name": "生成文章内容",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3200,
        3380
      ],
      "parameters": {
        "text": "=You are an expert content writer for<yourweb.site>, a visa consultation company. Write a comprehensive article based on:\n\nTopic: {{ $json.output.topic }}\nTitle: {{ $json.output.title }}\nCategory: {{ $json.output.category }}\nFocus Keyphrase: {{ $json.output.focusKeyphrase }}\n\nCRITICAL Requirements:\n\nWrite between 1000-1500 words\nUse a clear, simple, helpful tone – avoid technical jargon\nDo NOT provide legal advice or interpret immigration law\nFocus on practical guidance and general information\nInclude useful tips especially for international students\n\nStructure with one <h1> (for the title, handled by WordPress), then use <h2> for main sections and <p> or <strong>/<ul> for subpoints — avoid excessive use of <h3> unless necessary\nMake content SEO-friendly by using the focus keyphrase naturally\nEnd with EXACTLY this CTA in a separate paragraph: \"Reach out to us for personalized consultation based on your specific requirements.\"\n\nStructure:\nIntroduction (engage the reader)\n3–4 main content sections with <h2> headings\nSubpoints within sections should be in <p>, <ul>, <strong> or similar semantic tags — use <h3> only if really needed\nTips or checklist for practical action\n\nConclusion\nCTA paragraph\nOutput a complete article in valid HTML format, without wrapping the result in code blocks or using markdown. Do NOT include the <h1> tag for the title, as it will be handled by WordPress. Output only the HTML content, not instructions or explanations.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "c1ac4723-1db8-4eea-8640-6dd176efc0b1",
      "name": "创建 WordPress 草稿",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        3540,
        3380
      ],
      "parameters": {
        "title": "={{ $('Generate Topic & Metadata').item.json.output.title }}",
        "additionalFields": {
          "slug": "={{ $('Generate Topic & Metadata').item.json.output.slug }}",
          "format": "standard",
          "status": "draft",
          "content": "={{ $json.output }}",
          "authorId": 2,
          "categories": "={{ $('Generate Topic & Metadata').item.json.output.categoryId }}"
        }
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dcec267d-c513-44df-8d13-8bd68e852590",
      "name": "设置 Yoast SEO 数据",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2840,
        3780
      ],
      "parameters": {
        "url": "=https://<yourweb.site>/wp-json/wp/v2/posts/{{ $json.id }}",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"meta\": {\n    \"_yoast_wpseo_focuskw\": \"{{ $('Generate Topic & Metadata').item.json.output.focusKeyphrase }}\",\n    \"_yoast_wpseo_metadesc\": \"{{ $('Generate Topic & Metadata').item.json.output.metaDescription }}\",\n    \"_yoast_wpseo_title\": \"{{ $('Generate Topic & Metadata').item.json.output.title }}\"\n  }\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "bedd876b-e6e1-4397-aed2-61b08a5bc2c5",
      "name": "生成特色图片",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3060,
        3780
      ],
      "parameters": {
        "prompt": "=Create a cinematic, modern image for a blog about: {{ $('Generate Topic & Metadata').item.json.output.title }}\n\nVisual Style Requirements:\n\t•\tCinematic, realistic photography with shallow depth of field\n\t•\tShows people (young adults or professionals) traveling, studying, or working internationally\n\t•\tScenes like airports, train stations, city streets, campuses, or iconic landmarks\n\t•\tGlobal lifestyle and international mobility vibe\n\t•\tBright or golden-hour lighting, energetic or inspirational tone\n\t•\tNatural, candid facial expressions and interactions\n\t•\tModern outfits and diverse representation\n\t•\tNO text, flags, logos, or brand names in the image\n\t•\tClean, high-quality composition suitable for a professional blog",
        "options": {
          "size": "1792x1024",
          "style": "natural",
          "quality": "standard"
        },
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "id": "TFeNsOhMdVKP8DCw",
          "name": "Akhsan"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "a7284c61-7342-4fcb-9422-577a807c9dd3",
      "name": "上传图片到 WordPress",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3260,
        3780
      ],
      "parameters": {
        "url": "https://<yourweb.site>/wp-json/wp/v2/media",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "image/png"
            },
            {
              "name": "Content-Disposition",
              "value": "=attachment; filename={{ $('Generate Topic & Metadata').item.json.output.slug }}.png"
            }
          ]
        },
        "inputDataFieldName": "data",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "69b93ac4-7784-4c71-8fff-31ba59b50b55",
      "name": "附加特色图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3460,
        3780
      ],
      "parameters": {
        "url": "=https://<yourweb.site>/wp-json/wp/v2/posts/{{ $('Create WordPress Draft').item.json.id }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "featured_media",
              "value": "={{ $json.id }}"
            }
          ]
        },
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "eqflh1H16dxj2lMN",
          "name": "Ashkan"
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7541ea2d-d795-43b1-b842-f4be6a2a61a4",
  "connections": {
    "Get API Routes": {
      "main": [
        [
          {
            "node": "Analyze API Routes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Get Recent Posts",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get All Taxonomies",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Posts Schema",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get API Routes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Schedule": {
      "main": [
        [
          {
            "node": "Generate Topic & Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Posts Schema": {
      "main": [
        [
          {
            "node": "Check PLL Endpoint",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Recent Posts": {
      "main": [
        [
          {
            "node": "Get Single Post Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Topic JSON1": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Topic & Metadata",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Get All Taxonomies": {
      "main": [
        [
          {
            "node": "Analyze Taxonomies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Yoast SEO Data": {
      "main": [
        [
          {
            "node": "Generate Featured Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Topic1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Topic & Metadata",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create WordPress Draft": {
      "main": [
        [
          {
            "node": "Set Yoast SEO Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Featured Image": {
      "main": [
        [
          {
            "node": "Upload Image to WordPress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Single Post Details": {
      "main": [
        [
          {
            "node": "Analyze Post Structure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Article1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Article Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Article Content": {
      "main": [
        [
          {
            "node": "Create WordPress Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Topic & Metadata": {
      "main": [
        [
          {
            "node": "Generate Article Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to WordPress": {
      "main": [
        [
          {
            "node": "Attach Featured Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 人工智能

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流