8
n8n 中文网amn8n.com

带AI评分与倡导偏好排序的多版本内容生成器

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 11 个节点。主要使用 SplitOut, Aggregate, ExecuteWorkflow, ExecuteWorkflowTrigger, LmChatOpenRouter 等节点。 使用Claude AI、Open Paws和Hugging Face生成并排名动物倡导内容

前置要求
  • 无特殊前置要求,导入即可使用
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "BemMdzpvedBEQKot",
  "meta": {
    "instanceId": "26bd595441827fb23edb0643d6d240e79b0b8993d278e90950f16e18bf9e3c4a"
  },
  "name": "带AI评分与倡导偏好排序的多版本内容生成器",
  "tags": [],
  "nodes": [
    {
      "id": "ed9ebb62-1111-4d13-9170-8e01b5c34e06",
      "name": "OpenRouter聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        340,
        220
      ],
      "parameters": {
        "model": "anthropic/claude-sonnet-4",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "QqgKARn52qQiKICN",
          "name": "OpenRouter account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "092e08c1-1794-4c52-8081-f128e404e155",
      "name": "创建内容",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        200,
        0
      ],
      "parameters": {
        "options": {},
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "k053fXGjIF7dUIQZ",
          "cachedResultName": "♻️ 🧩 📚 General Research Agent"
        },
        "workflowInputs": {
          "value": {
            "chatInput": "=# INSTRUCTIONS\n\nYou will research the topic using Serper (Google search) or the Open Paws database. After your research, generate content as described below.\n\nCreate 10 different full-length versions of the content type specified by the user.\n\nContent type: {{ $json.contentType }}  \nPoster’s profile description: {{ $json['Poster’s profile description'] }}  \nTone (e.g., formal, casual, friendly): {{ $json['Tone (e.g., formal, casual, friendly)'] }}  \nStyle (e.g., concise, detailed, persuasive): {{ $json['Style (e.g., concise, detailed, persuasive)'] }}  \nTopic / Instructions: {{ $json['Topic or Instructions'] }}\n\nYour final response must be a JSON array of exactly 5 objects. Each object should have a `\"text\"` key with the complete, fully written content as the value.\n\n# VERY IMPORTANT\n\n- Always write full content — if it’s a blog post, write full posts, not just titles. For emails, include subject lines and full bodies.  \n- Use BB-code formatting, NOT markdown.  \n- Format content according to the specified content type and style.  \n- Do not include example or placeholder links. Any URLs must be real and found via Serper, Open Paws, or social media tools during your research.  \n- Use only one tool call to generate high-quality content quickly — avoid multiple searches or iterations.",
            "sessionId": "={{ (Math.random().toString(36).substring(2) + Date.now().toString(36)) }}"
          },
          "schema": [
            {
              "id": "chatInput",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "chatInput",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sessionId",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "sessionId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e1175f51-e7d2-4be1-9271-9566078fc034",
      "name": "提取内容",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        380,
        0
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "options": {
          "systemPromptTemplate": "=CRITICAL: Begin your response directly with an opening curly bracket.\n\nDO NOT begin your response with ```json, backticks, code blocks or any preamble or indication that you are about to return code.\n\nONLY return the code itself directly beginning with an opening curly bracket\n\nIMPORTANT: return exactly 10 variations of the text in your given array, exactly as they appear in the user query\n\nUse the kind of text formatting or styling that is typical of the following content type: {{ $('When Executed by Another Workflow').item.json.contentType }}"
        },
        "schemaType": "fromJson",
        "jsonSchemaExample": "[\n  {\n\t\"text\": \"caption1\"\n  },\n  {\n\t\"text\": \"caption2\"\n  }\n]"
      },
      "typeVersion": 1.2
    },
    {
      "id": "cf7b3f39-7f72-48af-9cf9-c7583b339fbe",
      "name": "拆分内容",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        720,
        0
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output"
      },
      "typeVersion": 1
    },
    {
      "id": "24ea78e2-f4f1-40ec-8bcd-11862dac89eb",
      "name": "当由其他工作流执行时",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "contentType"
            },
            {
              "name": "Poster’s profile description"
            },
            {
              "name": "Tone (e.g., formal, casual, friendly)"
            },
            {
              "name": "Style (e.g., concise, detailed, persuasive)"
            },
            {
              "name": "Topic or Instructions"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "8420b516-c23e-4c3e-a151-3b0a2dae37e3",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -380
      ],
      "parameters": {
        "width": 280,
        "height": 580,
        "content": "# 📝 用户输入配置"
      },
      "typeVersion": 1
    },
    {
      "id": "efc808fe-a306-42aa-8443-ce2a17316fd6",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -320
      ],
      "parameters": {
        "width": 460,
        "height": 260,
        "content": "# 🔍 研究代理使用说明"
      },
      "typeVersion": 1
    },
    {
      "id": "64d7c2de-de78-4972-912e-23eb03f60409",
      "name": "评分文本",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        940,
        0
      ],
      "parameters": {
        "mode": "each",
        "options": {},
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "RyxYPLmF5sWDhC2Z",
          "cachedResultName": "✅ 🧩 📚 Score Text"
        },
        "workflowInputs": {
          "value": {
            "text": "={{ $json.text }}"
          },
          "schema": [
            {
              "id": "text",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "text"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6ae0dbcc-fada-44f3-933e-a0cdabb09da7",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1160,
        0
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "d386279d-8386-4369-ac91-5f8f8b502899",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        520,
        -460
      ],
      "parameters": {
        "width": 560,
        "height": 400,
        "content": "# 📊 文本评分与评估"
      },
      "typeVersion": 1
    },
    {
      "id": "f2d4d944-a334-4041-bea0-a0daa639547b",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        -440
      ],
      "parameters": {
        "width": 540,
        "height": 380,
        "content": "# 📦 最终聚合与输出"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {
    "When Executed by Another Workflow": [
      {
        "json": {
          "contentType": "email newsletter",
          "Topic or Instructions": "Explain recent advances in animal welfare legislation and how readers can support the movement.",
          "Poster’s profile description": "a passionate animal welfare advocate",
          "Tone (e.g., formal, casual, friendly)": "friendly",
          "Style (e.g., concise, detailed, persuasive)": "persuasive"
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7380fdb5-5d09-4554-b80b-977d3223e0b8",
  "connections": {
    "Score Text": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Content": {
      "main": [
        [
          {
            "node": "Extract Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Content": {
      "main": [
        [
          {
            "node": "Split Out Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Content": {
      "main": [
        [
          {
            "node": "Score Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Create Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 内容创作, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
中级
节点数量11
分类2
节点类型7
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Open Paws

Open Paws

@openpaws

Open Paws is a nonprofit building open-source AI tools to accelerate animal advocacy. We create machine learning models and automation workflows trained on real-world campaign data to help end industrial animal exploitation. All tools are free, transparent, and designed for real-world impact.

外部链接
在 n8n.io 查看

分享此工作流