多格式文档生成器
高级
这是一个自动化工作流,包含 19 个节点。主要使用 Code, Wait, Merge, GoogleDocs, FormTrigger 等节点。 使用Claude Sonnet和Google Docs生成多格式文档
前置要求
- •Anthropic API Key
分类
-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "mH8mTFxaHayJ3MkN",
"meta": {
"instanceId": "42b2652ebb0a87755df4710a5630695eec8e35cb0ce04a63b0e25751b1f044f1"
},
"name": "多格式文档生成器",
"tags": [],
"nodes": [
{
"id": "4c3414e2-dde7-4295-a652-b2bb5f21780e",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1120,
192
],
"parameters": {
"content": "## 📥 输入"
},
"typeVersion": 1
},
{
"id": "113eaf18-4406-4a22-98b9-d58a213c0296",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-96
],
"parameters": {
"width": 456,
"height": 260,
"content": "## 🤖 并行 AI 处理"
},
"typeVersion": 1
},
{
"id": "30f50e1b-437f-4e22-9d1a-5f52c1882c41",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
144
],
"parameters": {
"height": 192,
"content": "## 📦 整合"
},
"typeVersion": 1
},
{
"id": "cf3ce643-f273-4379-9866-eda8379436a3",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
976,
208
],
"parameters": {
"width": 260,
"height": 180,
"content": "## 📄 Google Docs 输出"
},
"typeVersion": 1
},
{
"id": "f3cf5a35-6448-457c-92fb-e31550c00f6e",
"name": "LinkedIn 内容生成器",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
0,
176
],
"parameters": {
"text": "=You are a LinkedIn content strategist specializing in automation and productivity. Create an engaging post about this n8n workflow.\n\nSTRUCTURE (200-300 words):\n\n**Hook** (1-2 sentences)\nStart with a surprising metric, relatable pain point, or provocative question. Examples:\n- \"We were spending 8 hours/week on [manual task]...\"\n- \"What if [common task] took 30 seconds instead of 30 minutes?\"\n- \"I just automated away my most tedious Friday ritual\"\n\n**The Problem** (2-3 sentences)\nDescribe the manual process being replaced. Make it visceral and relatable. Use specifics.\n\n**The Solution** (4-5 bullet points with →)\nWhat this workflow does:\n→ [Specific action + benefit]\n→ [Integration + what it enables]\n→ [Key feature + time saved]\n→ [Clever technical element]\n\n**The Impact** (2-3 sentences)\nQuantify results:\n- Time saved per week/month\n- Error reduction percentage\n- ROI timeline\n- Team morale improvement\n\n**Technical Pride Moment** (1-2 sentences)\nShare one clever implementation detail that showcases your technical thinking\n\n**Call to Action**\nOffer to share the workflow or invite questions. Be generous and approachable.\n\n**Hashtags**: 3-5 relevant tags (#n8n #automation #productivity + industry-specific)\n\n---\n\nTONE: First-person, conversational, enthusiastic but professional. Show personality. Write like you're sharing an exciting win with peers over coffee.\n\nEMOTION: Pride in problem-solving + desire to help others + excitement about automation\n\nAVOID: Corporate jargon, overly technical terms, generic \"game-changer\" language, all-caps hype\n\nMAX LENGTH: 1,300 characters (LinkedIn post limit)\n{{ $json.content }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "8c2319b7-9d38-45b0-9fa0-6cd6fd527627",
"name": "Discord 片段生成器",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
0,
272
],
"parameters": {
"text": "=You are a Discord community manager for n8n. Create a friendly, casual snippet about this workflow for sharing in channels.\n\nFORMAT (400-500 characters MAX):\n\n**One-line description**\nWhat it does in plain language\n\n**Key Features** (3-4 points with emojis)\n🚀 [Feature + quick benefit]\n⚡ [Integration + what it does]\n🎯 [Key capability]\n💡 [Bonus feature or clever bit]\n\n**Quick Example**\n\"Perfect for [specific use case] - like when you need to [concrete scenario]\"\n\n**Community Vibe**\nEnd with: \"Questions? Drop them below 👇\" or \"Who else needs this?\" or \"Feedback welcome!\"\n\n---\n\nTONE: Casual, friendly, community-focused. Like you're sharing something cool with friends in a Discord server.\n\nSTYLE NOTES:\n- Use emojis naturally (don't overdo it)\n- Short sentences, easy to scan\n- Focus on \"you can\" not \"users can\"\n- Make it feel like a tip from a friend\n- Conversational punctuation ok (dashes, ellipses)\n\nAVOID: \n- Formal business language\n- Long paragraphs\n- Over-technical jargon\n- Marketing speak\n\nLENGTH: Keep it tight - Discord users skim fast. Under 500 characters ideal.\n\n{{ $json.content }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "ad5b16e6-59eb-4372-b620-e649ebca873c",
"name": "用例叙述生成器",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
0,
464
],
"parameters": {
"text": "=## 4. USE CASE NARRATIVE GENERATOR\n```\nYou are a storytelling expert. Create a compelling narrative showing how this workflow solves real problems.\n\nSTRUCTURE:\n\n## The Challenge\nSet the scene (2-3 paragraphs):\n- Describe the frustrating manual process\n- Paint a picture of daily pain points\n- Include specific details (time wasted, errors made, opportunities missed)\n- Make it relatable and visceral\n\nUse phrases like:\n- \"Every Monday morning started the same way...\"\n- \"The team was spending hours on...\"\n- \"Between juggling X and Y, things fell through the cracks...\"\n\n## The Breaking Point\nWhat triggered the need for change? (1-2 paragraphs)\n- A specific incident or realization\n- The cumulative toll of the manual process\n- Competitive pressure or missed opportunity\n\n## The Solution\nIntroduce the workflow (3-4 paragraphs):\n- How they discovered/built this approach\n- What made n8n the right choice\n- Walk through how the workflow works in practice\n- Explain the \"aha moment\" of seeing it work\n\n## The Implementation\nDetail the setup (2 paragraphs):\n- How long it took to build\n- Any challenges overcome\n- Key integrations that made it work\n- The moment they hit \"execute\" for the first time\n\n## The Results\nShow the transformation (3-4 paragraphs):\n\n**Immediate Wins:**\n- Time saved (be specific)\n- Errors eliminated\n- Speed improvements\n\n**Unexpected Benefits:**\n- Team morale changes\n- New capabilities unlocked\n- Competitive advantages gained\n\n**Long-term Impact:**\n- Scalability achieved\n- Cost savings over time\n- Strategic value\n\n## Real-World Application\nProvide 2-3 concrete scenarios showing the workflow in action:\n- \"When [situation] happens, the workflow...\"\n- Walk through actual day-in-the-life examples\n\n## Key Takeaways\n3-5 lessons learned that others can apply\n\n---\n\nTONE: Narrative and engaging, like a case study in Fast Company or Harvard Business Review. Professional but human.\n\nSTRUCTURE: Story arc with tension and resolution. Show, don't just tell.\n\nDETAILS: Use specific numbers, times, names (roles, not real names). Make it feel real and lived-in.\n\nLENGTH: 800-1200 words. This is the deep-dive piece.\n{{ $json.content }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "1325652f-f68d-4a8c-95da-303ed32c8131",
"name": "n8n Creator 文档生成器",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
0,
560
],
"parameters": {
"text": "=## 5. N8N CREATOR DOCUMENTATION GENERATOR\n```\nYou are an n8n documentation specialist. Create submission-ready documentation following n8n Creator Commons guidelines from: https://n8n.notion.site/Template-submission-guidelines-9959894476734da3b402c90b124b1f77\n\nREQUIRED STRUCTURE:\n\n## Workflow Name\n[Clear, descriptive name - what it does, not how]\nGood: \"Slack Alert for Failed API Calls\"\nBad: \"API Monitor v2\"\n\n## One-Line Description\nSingle sentence explaining core value. Under 100 characters.\nFormula: \"[Action] [data/content] from [Source] to [Destination] [frequency/trigger]\"\n\n## Detailed Description\n\n### What it does:\n2-3 clear sentences explaining functionality without technical jargon. Focus on outcomes.\n\n### Who it's for:\nSpecific audience and use cases. Examples:\n- \"Sales teams tracking leads across multiple platforms\"\n- \"Content creators managing multi-platform publishing\"\n- \"DevOps engineers monitoring application health\"\n\n### Key Features:\n4-6 bullet points structured as:\n- [Feature] - [Specific benefit]\n\nUse this format:\n- Automatic [X] - Saves [Y] time/reduces [Z] errors\n- Real-time [A] - Enables [B] capability\n- Smart [C] - Prevents [D] problem\n\n### How it works:\nBrief workflow walkthrough (3-5 steps):\n1. [Trigger event]\n2. [Data processing]\n3. [Integration points]\n4. [Final action/output]\n\n## Setup Requirements\n\n### Prerequisites:\n- List each required service/API with purpose\n- Specify credential types needed\n- Note any paid services or API limits\n\n### Estimated Setup Time:\nBe realistic: \"15-20 minutes\" / \"30-45 minutes with API configuration\"\n\n## Installation Notes\n- Any non-obvious configuration steps\n- Common setup pitfalls to avoid\n- Testing recommendations\n\n## Customization Options\nHow users can adapt it:\n- Swappable integrations\n- Adjustable parameters\n- Extension possibilities\n\n## Category\nPrimary category: [Sales / Marketing / Data Processing / Communication / Development / HR / Finance / Customer Support / Other]\n\n## Tags\n5-8 searchable keywords:\n- Platform names (slack, gmail, airtable)\n- Actions (notification, sync, monitor)\n- Use cases (lead-tracking, reporting)\n- Industries if relevant\n\n## Use Case Examples\n2-3 concrete scenarios:\n- \"E-commerce: Sync new Shopify orders to Airtable and send team Slack notification\"\n- \"HR: Automatically create onboarding tasks when new employee added to BambooHR\"\n\n---\n\nN8N STYLE REQUIREMENTS:\n- Clear, benefit-focused language\n- Avoid marketing fluff or hype\n- Be specific about what it does\n- Focus on practical value\n- Write for discoverability (think: what would someone search?)\n\nCRITICAL:\n- NO technical implementation details\n- NO code snippets or node configurations\n- Focus on WHAT and WHY, not HOW\n- Think: \"workflow marketplace description\" not \"technical documentation\"\n\nThis is for the n8n template library - optimize for users browsing for solutions.\n\n{{ $json.content }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "4833ebfd-b646-4d3a-aabf-d8daf975be90",
"name": "格式化最终文档包",
"type": "n8n-nodes-base.code",
"position": [
624,
432
],
"parameters": {
"jsCode": "// Aggregate and format all documentation sections\nconst items = $input.all();\n\n// Map to extract outputs and identify sections\nconst sections = {\n implementation: '',\n linkedin: '',\n discord: '',\n usecase: '',\n creator: ''\n};\n\n// Extract content - now it's directly in item.json.output\nitems.forEach((item, index) => {\n const content = item.json.output || '';\n \n // Assign based on order from your workflow\n switch(index) {\n case 0: sections.linkedin = content; break;\n case 1: sections.discord = content; break;\n case 2: sections.implementation = content; break;\n case 3: sections.usecase = content; break;\n case 4: sections.creator = content; break;\n }\n});\n\n// Extract workflow name from creator docs for dynamic naming\nconst titleMatch = sections.creator.match(/^#\\s*(.+)$/m);\nconst workflowName = titleMatch ? titleMatch[1].trim() : 'N8N Workflow';\n\n// Create dynamic doc name with timestamp\nconst timestamp = new Date().toISOString().split('T')[0]; // YYYY-MM-DD\nconst docName = `${workflowName} - Docs - ${timestamp}`;\n\n// Create formatted document\nconst documentContent = `# N8N WORKFLOW DOCUMENTATION PACKAGE\nGenerated: ${new Date().toLocaleString()}\n\n═══════════════════════════════════════════════════════════════\n\n## 📋 TECHNICAL IMPLEMENTATION GUIDE\n\n${sections.implementation}\n\n═══════════════════════════════════════════════════════════════\n\n## 💼 LINKEDIN POST\n\n${sections.linkedin}\n\n═══════════════════════════════════════════════════════════════\n\n## 💬 DISCORD SNIPPET\n\n${sections.discord}\n\n═══════════════════════════════════════════════════════════════\n\n## 📖 USE CASE NARRATIVE\n\n${sections.usecase}\n\n═══════════════════════════════════════════════════════════════\n\n## 🔧 N8N CREATOR DOCUMENTATION\n\n${sections.creator}\n\n═══════════════════════════════════════════════════════════════\n\nEnd of Documentation Package`;\n\nreturn [{\n json: {\n docName: docName,\n title: `${workflowName} - Complete Documentation`,\n content: documentContent\n }\n}];"
},
"typeVersion": 2
},
{
"id": "14c020e6-00e0-4883-bb1f-52f6ff653a07",
"name": "Anthropic聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
0,
768
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-5-20250929",
"cachedResultName": "Claude Sonnet 4.5"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"id": "JEgF1ooDsuHYBKx5",
"name": "Anthropic account"
}
},
"typeVersion": 1.3
},
{
"id": "9f31fe20-948f-4eee-bd8b-94b73e354503",
"name": "技术实现生成器",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
0,
368
],
"parameters": {
"text": "=You are an expert n8n technical documentation specialist. Create a comprehensive implementation guide for this workflow.\n\nSTRUCTURE YOUR RESPONSE AS:\n\n# [Extract Workflow Name] - Implementation Guide\n\n**Version**: 1.0\n**Platform**: n8n\n**Deployment Time**: [Estimate: simple=15min, moderate=30min, complex=60min]\n**Skill Level**: [Beginner/Intermediate/Advanced based on complexity]\n\n## Overview\nWrite 2-3 paragraphs explaining what this workflow does, the problem it solves, and estimated time/cost savings. Be specific about automation value.\n\n## Prerequisites\n\n### Required Services:\nList every external service/API credential needed with:\n- Service name and purpose\n- Where to get API keys/credentials\n- Required permission scopes\n\n### Required n8n Nodes:\nNote any community nodes needing installation\n\n## Installation\n\n### Step 1: Import Workflow\nStandard import instructions\n\n### Step 2: Configure Credentials \nFor EACH service, provide detailed setup:\n- Where to create credentials in n8n\n- Required fields and where to find them\n- Testing instructions\n\n### Step 3: Node Configuration\nWalk through nodes requiring customization:\n- Webhook URLs to update\n- Variables to set\n- Filters/conditions to adjust\n- Data mappings to verify\n\n### Step 4: Test Execution\nSpecific testing steps and expected outputs\n\n## Architecture Overview\nExplain the workflow's logic:\n- How data enters (trigger type)\n- Processing/transformation steps\n- Decision points and branching\n- Where outputs go\n\n## Customization Guide\nProvide 3-5 common modifications:\n- How to change X for different use cases\n- How to add Y functionality\n- How to adjust filters/conditions\n\n## Performance & Costs\n\n### Per Execution:\n- Estimated API calls\n- Average execution time\n- Cost per run (be specific)\n\n### Monthly Costs:\nCalculate based on typical usage volume\n\n## Troubleshooting\nList 4-6 common issues with:\n- Error description\n- Root cause\n- Specific solution steps\n\n## Best Practices\n3-5 specific recommendations for this workflow type\n\n---\n\nTONE: Technical but accessible. Assume intermediate n8n knowledge. Be specific with exact steps, not vague guidance.\n\nANALYSIS: Identify all external services, estimate realistic time savings, calculate actual costs based on API pricing.\n{{ $json.content }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "08404db6-db96-4efa-bb79-531e3fcd37b7",
"name": "创建文档",
"type": "n8n-nodes-base.googleDocs",
"position": [
800,
352
],
"parameters": {
"title": "={{ $json.docName }}",
"folderId": "14HV_64EzaMzI4efdTDkJ1lbBSVSx_-bl"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "UxwVvTjaY2WY3bMb",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "ed65688c-a033-4c8e-9b1c-9f3ebc2333bc",
"name": "更新文档",
"type": "n8n-nodes-base.googleDocs",
"position": [
1296,
416
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "={{ $('Format Final Documentation Package').item.json.content }}",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "={{ $json.id }}"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "UxwVvTjaY2WY3bMb",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "d3a42b8e-387a-42ab-90ff-3b1db783add5",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
448,
384
],
"parameters": {
"numberInputs": 5
},
"typeVersion": 3.2
},
{
"id": "356e65ff-e911-4a37-ad8a-5b3c98f6770d",
"name": "合并1",
"type": "n8n-nodes-base.merge",
"position": [
960,
416
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "1a7b86e9-cf11-436b-8f9a-055a6f1e84d5",
"name": "等待",
"type": "n8n-nodes-base.wait",
"position": [
1136,
416
],
"webhookId": "80dae388-5ef2-45ca-942d-16ffc300fa7a",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "d56a35fa-1f75-4c0d-aa89-29a37db95790",
"name": "表单提交时",
"type": "n8n-nodes-base.formTrigger",
"position": [
-1056,
368
],
"webhookId": "ecf810b6-3da2-462d-920f-69b0177a9827",
"parameters": {
"options": {},
"formTitle": "json upload",
"formFields": {
"values": [
{
"fieldType": "file",
"fieldLabel": "Json file",
"multipleFiles": false,
"requiredField": true
}
]
}
},
"typeVersion": 2.3
},
{
"id": "c80d9c38-d0c7-4f04-89a7-4a3385f1dc16",
"name": "从文件中提取",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-880,
368
],
"parameters": {
"options": {},
"operation": "fromJson",
"destinationKey": "=data",
"binaryPropertyName": "Json_file"
},
"typeVersion": 1
},
{
"id": "8425917f-bad5-4b63-9579-cee3ba561241",
"name": "JavaScript 代码",
"type": "n8n-nodes-base.code",
"position": [
-672,
368
],
"parameters": {
"jsCode": "// Rename data to content for consistency (runOnceForAllItems mode)\nreturn $input.all().map(item => ({\n json: {\n content: JSON.stringify(item.json.data, null, 2)\n }\n}));"
},
"typeVersion": 2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "87f1fe5c-439d-4d79-b098-84286c209bab",
"connections": {
"Wait": {
"main": [
[
{
"node": "Update a document",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Format Final Documentation Package",
"type": "main",
"index": 0
}
]
]
},
"Merge1": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Create a document": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
},
"Extract from File": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "LinkedIn Content Generator",
"type": "main",
"index": 0
},
{
"node": "Discord Snippet Generator",
"type": "main",
"index": 0
},
{
"node": "Technical Implementation Generator",
"type": "main",
"index": 0
},
{
"node": "Use Case Narrative Generator",
"type": "main",
"index": 0
},
{
"node": "n8n Creator Documentation Generator",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Extract from File",
"type": "main",
"index": 0
}
]
]
},
"Anthropic Chat Model": {
"ai_languageModel": [
[
{
"node": "n8n Creator Documentation Generator",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Use Case Narrative Generator",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Discord Snippet Generator",
"type": "ai_languageModel",
"index": 0
},
{
"node": "LinkedIn Content Generator",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Technical Implementation Generator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Discord Snippet Generator": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"LinkedIn Content Generator": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Use Case Narrative Generator": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 3
}
]
]
},
"Format Final Documentation Package": {
"main": [
[
{
"node": "Create a document",
"type": "main",
"index": 0
},
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
},
"Technical Implementation Generator": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 2
}
]
]
},
"n8n Creator Documentation Generator": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 4
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
使用 Google Slides 和 Flux 将会议转录转换为 AI 生成演示文稿
使用 Google Slides 和 Flux 将会议转录转换为 AI 生成演示文稿
Set
Code
Wait
+14
107 节点Joseph
内容创作
自动化竞争对比卡生成与实时销售情报
使用AI、Slack和Notion自动生成竞争对比卡(Klue替代方案)
Code
Merge
Slack
+15
58 节点Connor Provines
市场调研
使用AI丰富线索并评分
使用Claude AI、PDL和Perplexity自动丰富和评分线索
Code
Gmail
Merge
+13
28 节点Connor Provines
PQL + Amplitude
使用 Amplitude、Claude 和 PDL 评估产品合格潜在客户,用于销售路由
Set
Code
Merge
+10
21 节点Connor Provines
潜在客户开发
基于AI的WhatsApp支持机器人(Google Sheets工单创建)
基于AI的WhatsApp支持机器人(Google Sheets工单创建)
Set
Xml
Code
+20
35 节点Zain Khan
客服机器人