8
n8n 中文网amn8n.com

AI内容创作与WordPress自动发布 - Pexels API图像工作流

高级

这是一个AI领域的自动化工作流,包含 30 个节点。主要使用 If, Set, Form, SplitOut, Wordpress 等节点,结合人工智能技术实现智能自动化。 基于Pexels API图像的AI内容创作与WordPress自动发布工作流

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "ee764605661f484417a5505724882cb4f8c547a6bf9bef1f89eacbbcb7cca6ab"
  },
  "nodes": [
    {
      "id": "aa01f852-aa12-4001-9bc4-94fd0bbd0e88",
      "name": "获取未处理的想法",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -980,
        800
      ],
      "parameters": {
        "options": {
          "dataLocationOnSheet": {
            "values": {
              "rangeDefinition": "detectAutomatically"
            }
          }
        },
        "filtersUI": {
          "values": [
            {
              "lookupValue": "no",
              "lookupColumn": "Generated"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UDaTATWOnYorewjEF5-G9edgSBjc2_Rb50BZVFbAu8U/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "1UDaTATWOnYorewjEF5-G9edgSBjc2_Rb50BZVFbAu8U"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.5
    },
    {
      "id": "3ab71903-3b38-4891-a769-2d0304cb4bad",
      "name": "设置提示",
      "type": "n8n-nodes-base.set",
      "position": [
        -780,
        800
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3e8d2523-66aa-46fe-adcc-39dc78b9161e",
              "name": "prompt",
              "type": "string",
              "value": "={{ $json.Prompt }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "23e7d119-2d0f-41df-8e94-67bdd95bf6c0",
      "name": "创建 WordPress 文章",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        -760,
        1180
      ],
      "parameters": {
        "title": "={{ $('Fetch Unprocessed Ideas').item.json.Prompt }}",
        "additionalFields": {
          "status": "publish",
          "content": "={{ $('Generate Article AI').item.json.output }}\n\nImage by: {{ $('Search Pexels Image').item.json.photos[0].photographer }}\n{{ $('Search Pexels Image').item.json.photos[0].photographer_url }}"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a07f4264-c011-4925-a8c6-d5fa11ec809b",
      "name": "上传图片",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        -380,
        1180
      ],
      "parameters": {
        "url": "https://<YOUR_WORDPRESS_URL>/wp-json/wp/v2/media",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Disposition",
              "value": "=attachment; filename=\"cover-{{ $('Create WordPress Post').item.json.id }}.jpg\""
            }
          ]
        },
        "inputDataFieldName": "data",
        "nodeCredentialType": "wordpressApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "cbbae382-12b2-47c7-8fd8-13df5236bbdc",
      "name": "设置特色图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -200,
        1180
      ],
      "parameters": {
        "url": "=https://<YOUR_WORDPRESS_URL>/wp-json/wp/v2/posts/{{ $('Create WordPress Post').item.json.id }}",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "featured_media",
              "value": "={{ $json.id }}"
            }
          ]
        },
        "nodeCredentialType": "wordpressApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "cc2d86a1-cc0f-46fc-81ee-ec02801b29cf",
      "name": "更新 Google 表格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -20,
        1180
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $now.format('dd/LL/yyyy') }}",
            "Title": "={{ $('Create WordPress Post').item.json.title.raw }}",
            "Post ID": "={{ $('Create WordPress Post').item.json.id }}",
            "Generated": "yes",
            "row_number": "={{ $('Fetch Unprocessed Ideas').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Post ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Post ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Generated",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Generated",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UDaTATWOnYorewjEF5-G9edgSBjc2_Rb50BZVFbAu8U/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1UDaTATWOnYorewjEF5-G9edgSBjc2_Rb50BZVFbAu8U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UDaTATWOnYorewjEF5-G9edgSBjc2_Rb50BZVFbAu8U/edit?usp=drivesdk",
          "cachedResultName": "n8n-wp"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "74a74b39-d14c-44b7-920b-bfd343225a87",
      "name": "生成文章 AI",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -600,
        800
      ],
      "parameters": {
        "text": "=You are an SEO expert. Write an article based on this topic: {{ $('Fetch Unprocessed Ideas').item.json.Prompt }}\nInstructions:\n-In the introduction, present the topic that will be discussed in the rest of the text.\n-The introduction should be about 120 words.\n-The conclusion should be about 120 words.\n-In the conclusion, summarize everything said in the article and present the reader with final conclusions.\n-Write a maximum of 4-5 chapters and expand on them.\n-Chapters should maintain a logical sequence and not repeat the same concepts.\n-Chapters should be interconnected, not isolated blocks of text. The text should be fluent and follow a linear logic.\n-Do not start chapters with \"Chapter 1\", \"Chapter 2\", \"Chapter 3\"... just write the chapter title.\n-Use HTML for text formatting, but limit yourself to using bold, italics, paragraphs, lists, and tables.\n-Do not place the result in a ```html code block, only the text itself.\n-Do not use markdown formatting.\n-Delve into the topic you are writing about; do not provide only superficial information.\n-I expect only HTML format in the response.\nDO NOT INCLUDE ```html\nWRITE SO IT DOESN'T LOOK LIKE AI - do not use long dashes, and in titles and subheadings, capitalize only the first word.\n\nIf possible, add data in a table.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "0be71cb1-6b52-4227-a70d-c0e01033f8c4",
      "name": "生成图片关键词 AI",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -280,
        800
      ],
      "parameters": {
        "text": "=Choose an expression based on which you will find a matching graphic in Pexels API.\nTopic: {{ $('Fetch Unprocessed Ideas').item.json.Prompt }} \nInstructions:\n- Choose one expression that will best match to find a graphic.\n- Use a general category to always match a graphic.\n- Do not use any HTML characters.\n- Return only a string containing the expression.\n- Do not use quotation marks. The only allowed special characters are \":\" and \",\".\n- Make each one unique so there are no 2 identical graphics.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "f7da0b58-b5ae-48b3-a69a-739512282179",
      "name": "用于文章的 Gemini 模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -620,
        940
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-flash-latest"
      },
      "typeVersion": 1
    },
    {
      "id": "5af891b9-069d-4e48-8b93-e04413d85e7c",
      "name": "用于图片关键词的 Gemini 模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -300,
        940
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-flash-latest"
      },
      "typeVersion": 1
    },
    {
      "id": "3b0f4db2-e2d1-4590-b08b-a37039db7f70",
      "name": "搜索 Pexels 图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -960,
        1180
      ],
      "parameters": {
        "url": "=https://api.pexels.com/v1/search?query={{ encodeURIComponent($('Generate Image Keyword AI').item.json.output) }}&per_page=1",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "<YOUR_PEXELS_API_KEY>"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7fb8b8fe-4e6b-4af8-8d6b-9419096350d2",
      "name": "下载 Pexels 图片",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        -560,
        1180
      ],
      "parameters": {
        "url": "={{ $('Search Pexels Image').item.json.photos[0].src.large2x }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "32b7c739-19e0-4115-8d7e-35a2db6423bb",
      "name": "表单触发器:选择操作",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1580,
        580
      ],
      "webhookId": "09988680-2d17-4e68-b1e1-81fef6163a0d",
      "parameters": {
        "options": {
          "path": "wpcontent",
          "buttonLabel": "Next",
          "appendAttribution": false
        },
        "formTitle": "Create Content",
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "Task",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Generate Content"
                  },
                  {
                    "option": "Add Ideas"
                  }
                ]
              }
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bc2a6f22-a0f7-4933-b660-a0f4dbd52de4",
      "name": "如果生成内容",
      "type": "n8n-nodes-base.if",
      "position": [
        -1340,
        580
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "41e4b502-f201-47a2-a244-ac705528f843",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.Task }}",
              "rightValue": "Generate Content"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "18bdad61-7286-4e66-bdc3-f37d404f8dc0",
      "name": "添加想法到表格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -40,
        400
      ],
      "parameters": {
        "columns": {
          "value": {
            "Title": "=",
            "Prompt": "={{ $json.Topic }}",
            "Generated": "no"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Prompt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Post ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Post ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Generated",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Generated",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UDaTATWOnYorewjEF5-G9edgSBjc2_Rb50BZVFbAu8U/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1UDaTATWOnYorewjEF5-G9edgSBjc2_Rb50BZVFbAu8U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UDaTATWOnYorewjEF5-G9edgSBjc2_Rb50BZVFbAu8U/edit?usp=drivesdk",
          "cachedResultName": "n8n-wp"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "d7697c4b-e651-414c-a7eb-171ef43110b6",
      "name": "生成博客主题 AI",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -700,
        400
      ],
      "parameters": {
        "text": "=Prepare a blog topic - Make the title great for SEO.\n\nNOTE.\nGenerate 5 topics.\nIn the response, provide JSON code: \n{\n  \"Topic\": \"Sample topic\"\n}\nDo not add markdown, do not add '''json'.\nDo not add numbers to topics.\n\nWrite about {{ $json.Topic }}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "executeOnce": false,
      "typeVersion": 2
    },
    {
      "id": "b6c75452-0f77-426e-bf0f-c20ecaf620e4",
      "name": "表单:输入主题以获取想法",
      "type": "n8n-nodes-base.form",
      "position": [
        -980,
        400
      ],
      "webhookId": "fcee9395-085e-4831-9bbf-32ce2f571027",
      "parameters": {
        "options": {
          "buttonLabel": "NEXT"
        },
        "formFields": {
          "values": [
            {
              "fieldLabel": "Topic"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "63701441-2b94-4a59-804c-ff25494749db",
      "name": "表单:添加更多主题?",
      "type": "n8n-nodes-base.form",
      "position": [
        240,
        400
      ],
      "webhookId": "e897fa2c-f8a3-4e4e-ae03-14725ba1d705",
      "parameters": {
        "options": {
          "buttonLabel": "NEXT",
          "formDescription": "={{ $items().map(item => \"- \" + item.json.Prompt).join('\\n') }}"
        },
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "What next?",
              "fieldOptions": {
                "values": [
                  {
                    "option": "END"
                  },
                  {
                    "option": "NEXT"
                  }
                ]
              }
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "562cd4ea-8fc2-43bb-a0f8-b84e63e55807",
      "name": "如果添加更多主题",
      "type": "n8n-nodes-base.if",
      "position": [
        460,
        400
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "73836e3b-ce8d-4e69-be29-82971a6bd82c",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json[\"What next?\"] }}",
              "rightValue": "NEXT"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "754f0694-c09b-46b0-9566-293889ecd68a",
      "name": "用于主题的 Gemini 模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -740,
        560
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-flash-latest"
      },
      "typeVersion": 1
    },
    {
      "id": "72976425-ebbf-4d31-97b4-898648c13b20",
      "name": "解析 AI 主题输出",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -500,
        560
      ],
      "parameters": {
        "jsonSchemaExample": "[\n  {\n    \"Topic\": \"Example topic 1\"\n  },\n  {\n    \"Topic\": \"Example topic 2\"\n  },\n  {\n    \"Topic\": \"Example topic 3\"\n  },\n    {\n    \"Topic\": \"Example topic 4\"\n  },\n  {\n    \"Topic\": \"Example topic 5\"\n  }\n]"
      },
      "typeVersion": 1.2
    },
    {
      "id": "c9c8c275-31c0-4a5f-a324-c27f3c18031b",
      "name": "拆分主题",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -300,
        400
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output"
      },
      "typeVersion": 1
    },
    {
      "id": "424cab92-8a0a-4407-972a-b82186d600f2",
      "name": "表单:结束想法生成",
      "type": "n8n-nodes-base.form",
      "position": [
        680,
        420
      ],
      "webhookId": "ea907aa5-971f-4a0d-89a1-d834177d09c8",
      "parameters": {
        "options": {},
        "operation": "completion",
        "completionTitle": "END",
        "completionMessage": "={{ $items(\"Generate Blog Topics AI\")[0].json.output.map(item => \"- \" + item.Topic).join('\\n') }}"
      },
      "typeVersion": 1
    },
    {
      "id": "f15c02d2-44a1-450e-95ee-c95445dbcafc",
      "name": "表单:结束文章生成",
      "type": "n8n-nodes-base.form",
      "position": [
        180,
        1180
      ],
      "webhookId": "ea907aa5-971f-4a0d-89a1-d834177d09c8",
      "parameters": {
        "options": {},
        "operation": "completion",
        "completionTitle": "END",
        "completionMessage": "={{ $items().map(item => \"- \" + item.json.Title).join('\\n') }}"
      },
      "typeVersion": 1
    },
    {
      "id": "f25aabe7-ae32-4db9-9e37-3612a7f21a64",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        260
      ],
      "parameters": {
        "color": 5,
        "height": 400,
        "content": "## 生成主题"
      },
      "typeVersion": 1
    },
    {
      "id": "d5a4794e-1857-421b-b33f-cc3493f55e0e",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        260
      ],
      "parameters": {
        "color": 5,
        "height": 380,
        "content": "## 添加到表格"
      },
      "typeVersion": 1
    },
    {
      "id": "a8929634-52bc-414b-8301-e98fcae5e940",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        260
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 380,
        "content": "## 添加更多?"
      },
      "typeVersion": 1
    },
    {
      "id": "e2c3d8ad-eb78-441c-9576-082f91568131",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        260
      ],
      "parameters": {
        "color": 4,
        "width": 220,
        "height": 380,
        "content": "## 重新开始或结束"
      },
      "typeVersion": 1
    },
    {
      "id": "ad74f19e-8811-4d2e-ba1d-b78df9ada687",
      "name": "API 设置说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1580,
        1140
      ],
      "parameters": {
        "width": 960,
        "height": 280,
        "content": "## WordPress 和 Pexels API 设置"
      },
      "typeVersion": 1
    },
    {
      "id": "7f04b46b-0918-4afd-98ec-e1433f9ebdb7",
      "name": "工作流说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1640,
        -200
      ],
      "parameters": {
        "width": 500,
        "height": 940,
        "content": "# 工作流说明"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Set Prompt": {
      "main": [
        [
          {
            "node": "Generate Article AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Topics": {
      "main": [
        [
          {
            "node": "Add Ideas to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image": {
      "main": [
        [
          {
            "node": "Set Featured Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Ideas to Sheet": {
      "main": [
        [
          {
            "node": "Form: Add More Topics?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Add More Topics": {
      "main": [
        [
          {
            "node": "Form: Enter Topic for Ideas",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Form: End Idea Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Featured Image": {
      "main": [
        [
          {
            "node": "Update Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Article AI": {
      "main": [
        [
          {
            "node": "Generate Image Keyword AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Generate Content": {
      "main": [
        [
          {
            "node": "Fetch Unprocessed Ideas",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Form: Enter Topic for Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Pexels Image": {
      "main": [
        [
          {
            "node": "Create WordPress Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Google Sheet": {
      "main": [
        [
          {
            "node": "Form: End Post Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create WordPress Post": {
      "main": [
        [
          {
            "node": "Download Pexels Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Pexels Image": {
      "main": [
        [
          {
            "node": "Upload Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Topic Output": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Blog Topics AI",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Form: Add More Topics?": {
      "main": [
        [
          {
            "node": "If Add More Topics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Unprocessed Ideas": {
      "main": [
        [
          {
            "node": "Set Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Model for Topics": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Blog Topics AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Blog Topics AI": {
      "main": [
        [
          {
            "node": "Split Topics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Model for Article": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Article AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image Keyword AI": {
      "main": [
        [
          {
            "node": "Search Pexels Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form Trigger: Select Action": {
      "main": [
        [
          {
            "node": "If Generate Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form: Enter Topic for Ideas": {
      "main": [
        [
          {
            "node": "Generate Blog Topics AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Model for Image Keyword": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Image Keyword AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 人工智能

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流