8
n8n 中文网amn8n.com

基于表单输入的内容创作系统

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 12 个节点。主要使用 Set, Slack, SplitOut, Aggregate, FormTrigger 等节点。 使用Tavily Research和OpenAI从表单生成多平台内容

前置要求
  • Slack Bot Token 或 Webhook URL
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "PZXlvjDt64MrjzPR",
  "meta": {
    "instanceId": "50631c03cbd88440965b74e5a58aada5437cbc43e90372b516e36154908ad374",
    "templateCredsSetupCompleted": true
  },
  "name": "基于表单输入的内容创作系统",
  "tags": [],
  "nodes": [
    {
      "id": "1fbbb8dd-d930-4c70-9f30-e01e2ece00ce",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1104,
        -272
      ],
      "parameters": {
        "include": "specifiedFields",
        "options": {},
        "aggregate": "aggregateAllItemData",
        "fieldsToInclude": "title, raw_content"
      },
      "typeVersion": 1
    },
    {
      "id": "256df7ac-6c5b-4d95-8d99-9c5dde9018b8",
      "name": "拆分输出",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        832,
        -272
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "results"
      },
      "typeVersion": 1
    },
    {
      "id": "a83d46fe-64f6-4440-9982-91b255fa2dcd",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        208,
        208
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "WXVOHmv3WY7Aw0or",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6bd92e7e-80f5-454b-91ee-f124642e5890",
      "name": "设置搜索字段",
      "type": "n8n-nodes-base.set",
      "position": [
        192,
        -272
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b493a3c6-939a-4301-9257-055b80c28d7a",
              "name": "query",
              "type": "string",
              "value": "={{ $json['Content Subject'] }}"
            },
            {
              "id": "e2813669-08fd-4d0d-a215-b0634032330b",
              "name": "targetAudience",
              "type": "string",
              "value": "={{ $json['Target Audience'] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1ea6ed2f-32b6-4a1c-b97c-87d13276880e",
      "name": "博客写作器",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        528,
        -32
      ],
      "parameters": {
        "text": "=Article Content:\n{{ $('Aggregate').item.json.data.toJsonString() }}\n\nTarget Audience:\n{{ $('Set Search Fields').item.json.targetAudience }}",
        "agent": "conversationalAgent",
        "options": {
          "systemMessage": "=** System Role **\n\nYou are a skilled and creative blog writer capable of crafting engaging, concise, and well-structured two-paragraph blog articles based on provided content.\n\n\n** Task Specification **\n\nWrite a two-paragraph blog article using the provided content\n\nEnsure the blog is coherent, engaging, and informative for a general audience\n\nUse a professional yet friendly tone\n\nMaintain a logical structure that flows from introduction to conclusion\n\n\n** Specifics and Context **\n\nThis task is designed to create short, high-quality blog content\n\nThe goal is to capture attention while clearly delivering the intended message\n\nYour writing helps brands or individuals build thought leadership and connect with their audience\n\n\n** Examples **\nInput:\nContent: \"Remote work has grown 44% in the last five years. Benefits include flexibility and reduced commute times. Challenges include maintaining productivity and combating isolation.\"\n\nOutput:\nRemote work has become a transformative trend, with a 44% increase in adoption over the past five years. The appeal lies in its flexibility, allowing employees to tailor their schedules and eliminate time-consuming commutes. This shift has unlocked new possibilities for work-life balance and broadened the talent pool for businesses willing to embrace remote setups.\n\nHowever, remote work isn’t without its challenges. Employees often face difficulties in maintaining productivity outside a structured office environment and struggle with feelings of isolation. Addressing these concerns requires thoughtful solutions, such as virtual collaboration tools and strategies to foster connection, ensuring remote work remains both productive and fulfilling.\n\nInput:\nContent: \"The Mediterranean diet includes fruits, vegetables, whole grains, and healthy fats like olive oil. Studies show it reduces the risk of heart disease and supports brain health.\"\n\nOutput:\nThe Mediterranean diet has long been celebrated as one of the healthiest eating patterns in the world. Emphasizing fresh fruits, vegetables, whole grains, and heart-healthy fats like olive oil, this diet is as delicious as it is nutritious. Its flavorful diversity makes it easy to adopt and sustain, whether you’re enjoying a vibrant Greek salad or a wholesome bowl of minestrone.\n\nWhat sets the Mediterranean diet apart is its scientifically backed health benefits. Numerous studies highlight its ability to reduce the risk of heart disease and support cognitive health, making it a cornerstone for longevity and wellness. By prioritizing natural, unprocessed foods, this lifestyle offers a sustainable approach to eating well and living better.\n\n\n** Reminders **\n\nMaintain clarity and logical flow between paragraphs\n\nKeep the tone professional and engaging\n\nStay concise and aligned with the provided content"
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "7d994219-af88-460d-8592-f934f3014d17",
      "name": "LinkedIn",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -96,
        -32
      ],
      "parameters": {
        "text": "=Article Content:\n{{ $json.data.toJsonString() }}\n\nTarget Audience:\n{{ $('Set Search Fields').item.json.targetAudience }}",
        "agent": "conversationalAgent",
        "options": {
          "systemMessage": "=** System Role **\n\nYou are a professional LinkedIn content specialist who turns articles into high-performing LinkedIn posts aimed at specific professional audiences.\n\n\n** Task Details **\n\nUse the article provided to create a LinkedIn post that is:\n\nClear, engaging, and optimized for mobile reading\n\nTailored to the professional goals and interests of the target audience\n\nWritten in plain text only (no formatting), with line breaks for readability\n\nIncludes 1–2 emojis to add personality\n\nOffers real, practical value and includes a call to action\n\nEnds with 3–5 relevant hashtags\n\nOutput should contain only the final post text — nothing more\n\n\n** Post Requirements **\n\nKeep the tone human and conversational\n\nStay within 3,000 characters\n\nThe post should capture the essence of the article while aligning with what matters most to the audience\n\n\n** Example **\nInput: Article on productivity hacks for managers\nOutput:\n🔥 Ready to boost your productivity?\n\nManagers — if you're drowning in meetings and feeling the pressure, here's your reminder that working smarter is possible.\n\n👉 Try these simple shifts:\n\nUse the Eisenhower Matrix to sort priorities\n\nBlock out deep work sessions on your calendar\n\nDelegate more to free up mental space\n\nWhat’s helped you stay on top of things lately?\nDrop your favorite time-saving tip in the comments 👇\n\n#Leadership #WorkSmarter #TimeManagement #Productivity #CareerGrowth\n\n\n** Key Reminders **\n\nMatch the content to the audience's pain points, language, and motivation\n\nAlways include 1–2 emojis, a strong CTA, and useful takeaways\n\nUse clean, broken-up plain text (no formatting or extra output)"
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "691204b8-7bdd-4d71-8eff-c49ac1ee54d5",
      "name": "Facebook",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        208,
        -32
      ],
      "parameters": {
        "text": "=Article Content:\n{{ $('Aggregate').item.json.data.toJsonString() }}\n\nTarget Audience:\n{{ $('Set Search Fields').item.json.targetAudience }}",
        "agent": "conversationalAgent",
        "options": {
          "systemMessage": "=** System Role **\n\nYou are an expert Facebook content creator who transforms articles into concise, high-impact posts crafted for a specific audience.\n\n\n** Task Specification **\n\nUsing the provided article, create a Facebook post that is:\n\nShort, attention-grabbing, and easy to read on mobile\n\nDesigned to match the interests, needs, and goals of the target audience\n\nIncludes 1–2 emojis to add personality\n\nProvides value or insight and includes a clear call to action\n\nContains 1–3 relevant hashtags\n\nOutputs only the post content — nothing else\n\n\n** Specifics and Context **\n\nThe post should capture the core idea of the article in one engaging message\n\nIt must get attention fast, deliver value immediately, and spark interaction (likes, comments, or shares)\n\n\n** Example **\nInput: Article about productivity tips for managers\nOutput:\n🔥 Too many meetings and tasks?\nHere’s how smart managers stay ahead:\n\nPrioritize with the Eisenhower Matrix\n\nBlock time to focus\n\nDelegate more, stress less\n\nWhat’s your favorite way to stay productive? Drop it below ⬇️\n\n#Productivity #Leadership #WorkSmart\n\n\n** Reminders **\n\nKeep the tone friendly and conversational\n\nUse emojis to highlight key points, not overload the post\n\nMake sure the content is relevant and valuable to the audience\n\nOnly provide the final post text, nothing extra"
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "fb3330ca-56a7-4c54-af49-65f230465eb1",
      "name": "搜索网络",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        512,
        -272
      ],
      "parameters": {
        "url": "https://api.tavily.com/search",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"api_key\": \"ADD YOU API KEY HERE\",\n    \"query\": \"{{ $json.query.replace(/\"/g, '\\\\\"') }}\",\n    \"search_depth\": \"basic\",\n    \"include_answer\": true,\n    \"topic\": \"news\",\n    \"include_raw_content\": true,\n    \"max_results\": 3\n} ",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "351d8e10-e171-469e-927c-28be4c7df2ed",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -128,
        -272
      ],
      "webhookId": "f3fbf6cc-67f3-47a6-a0fd-6493b256c1ac",
      "parameters": {
        "options": {},
        "formTitle": "Content Details",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Content Subject",
              "requiredField": true
            },
            {
              "fieldLabel": "Target Audience",
              "requiredField": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "278d42ee-d12a-400a-afef-18c0a2c35b08",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        848,
        -32
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "83daae30-5da1-4138-9780-1252bafd874d",
              "name": "Blog",
              "type": "string",
              "value": "={{ $json.output }}"
            },
            {
              "id": "b613b682-5c84-4042-8720-a1d688b072a1",
              "name": "Facebook",
              "type": "string",
              "value": "={{ $('Facebook').item.json.output }}"
            },
            {
              "id": "9ec90307-c1f8-4cdc-9b99-7d369b833ad3",
              "name": "Linkedin",
              "type": "string",
              "value": "={{ $('LinkedIn').item.json.output }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "350912b9-91d8-478b-abd7-189242d890f3",
      "name": "完成通知",
      "type": "n8n-nodes-base.slack",
      "position": [
        1056,
        -32
      ],
      "webhookId": "0a1c0309-0a0b-4e37-972d-b229684c2d52",
      "parameters": {
        "text": "=✅ The Content Generated on the Topic of: {{ $('On form submission').item.json[\"Content Subject\"] }}\n\n\nBlog Post: \n{{ $json.Blog }}\n\n\nFacebook Post:\n{{ $json.Facebook }}\n\n\nLinkedin Post:\n{{ $json.Linkedin }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "C099YS0V3M2"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "VI4wP9VPIS3KDiow",
          "name": "Slack account"
        }
      },
      "executeOnce": true,
      "typeVersion": 2.2
    },
    {
      "id": "9473dd44-97cb-45af-86d6-4cc7fdd8a6eb",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        -272
      ],
      "parameters": {
        "width": 672,
        "height": 576,
        "content": "## 基于表单输入的内容创作系统"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b67d5a28-bcf7-4ae3-8d28-97f9e1c4f209",
  "connections": {
    "Facebook": {
      "main": [
        [
          {
            "node": "Blog Writer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LinkedIn": {
      "main": [
        [
          {
            "node": "Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Web": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blog Writer": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Completed Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "LinkedIn",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Facebook",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Blog Writer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set Search Fields": {
      "main": [
        [
          {
            "node": "Search Web",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Set Search Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
Omer Fayyaz

Omer Fayyaz

@omerfayyaz

n8n Expert with deep experience in designing and implementing automation workflows that optimize business processes, reduce manual effort, and improve scalability. Skilled in integrating n8n with diverse platforms, APIs, and enterprise systems to deliver end-to-end automation solutions. With 13+ years of background in web development (PHP & JavaScript), I bring strong technical expertise to create custom, reliable, and efficient workflows.

外部链接
在 n8n.io 查看

分享此工作流