📄✨ 从PDF文档轻松创建WordPress内容 + Gmail人工审核
高级
这是一个AI, Marketing领域的自动化工作流,包含 27 个节点。主要使用 If, Code, Gmail, Merge, Markdown 等节点,结合人工智能技术实现智能自动化。 📄✨ 从PDF文档轻松创建WordPress内容,集成Gmail人工审核流程
前置要求
- •Google 账号和 Gmail API 凭证
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (27)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "fSG22q8TeUtsGUGD",
"meta": {
"instanceId": "31e69f7f4a77bf465b805824e303232f0227212ae922d12133a0f96ffeab4fef",
"templateCredsSetupCompleted": true
},
"name": "📄✨ 从 PDF 文档轻松创建 WordPress 内容 + 带 Gmail 批准的 Human in the Loop",
"tags": [],
"nodes": [
{
"id": "77d8c73c-1cdd-4795-841c-29c3b85040e0",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
1140,
-860
],
"parameters": {
"color": 4,
"width": 461,
"height": 319,
"content": "## 上传 PDF 并提取文本"
},
"typeVersion": 1
},
{
"id": "62dc4474-1803-4b6e-8fe5-530e9baf80f7",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1640,
-860
],
"parameters": {
"color": 5,
"width": 649,
"height": 452,
"content": "## 创建博客文章"
},
"typeVersion": 1
},
{
"id": "b8da4206-f1b5-4a8f-b056-70c7558c825d",
"name": "上传 PDF",
"type": "n8n-nodes-base.formTrigger",
"position": [
1220,
-760
],
"webhookId": "6c4a4180-7206-469f-a645-f41824ccbf42",
"parameters": {
"path": "pdf",
"options": {},
"formTitle": "PDF2Blog",
"formFields": {
"values": [
{
"fieldType": "file",
"fieldLabel": "Upload PDF File",
"multipleFiles": false,
"requiredField": true,
"acceptFileTypes": ".pdf"
}
]
},
"formDescription": "Transform PDFs into captivating blog posts"
},
"typeVersion": 2.1
},
{
"id": "ef70bbe2-d66c-4c91-96cf-2d0500522e70",
"name": "提取文本",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1420,
-760
],
"parameters": {
"options": {},
"operation": "pdf",
"binaryPropertyName": "Upload_PDF_File"
},
"typeVersion": 1
},
{
"id": "5de90f20-e0b3-4098-b5ae-c3bf5d724fcc",
"name": "gpt-4o-mini",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1840,
-600
],
"parameters": {
"options": {
"responseFormat": "text"
}
},
"credentials": {
"openAiApi": {
"id": "jEMSvKmtYfzAkhe6",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "b6e33883-a13f-4bc8-bedc-18d93294ae75",
"name": "pollinations.ai",
"type": "n8n-nodes-base.httpRequest",
"position": [
1520,
300
],
"parameters": {
"url": "=https://image.pollinations.ai/prompt/{{ $('Get Blog Post').item.json.title }} and avoid adding text and keep the image vibrant.",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "d928d841-8098-406e-ad66-cf7ca653a2c4",
"name": "创建 WordPress 文章",
"type": "n8n-nodes-base.wordpress",
"onError": "continueRegularOutput",
"position": [
1220,
300
],
"parameters": {
"title": "={{ $('Get Blog Post').item.json.title }}",
"additionalFields": {
"status": "draft",
"content": "={{ $('Get Blog Post').item.json.content }}"
}
},
"credentials": {
"wordpressApi": {
"id": "cOkzd5eeOiHaOXI2",
"name": "Wordpress account"
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "350cf732-037b-4e60-820e-4e38aecf7e57",
"name": "上传图像到 Wordpress",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
1880,
120
],
"parameters": {
"url": "https://[YOUR-WORDPRESS-SITE.com]/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-image-{{ $('Create Wordpress Post').item.json.id }}.jpeg\""
}
]
},
"inputDataFieldName": "data",
"nodeCredentialType": "wordpressApi"
},
"credentials": {
"wordpressApi": {
"id": "cOkzd5eeOiHaOXI2",
"name": "Wordpress account"
}
},
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "0f85ff07-13fb-40d5-8eee-7946f7064874",
"name": "在 WordPress 文章上设置图片",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
2100,
120
],
"parameters": {
"url": "=https:/[YOUR-WORDPRESS-SITE.com]/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"
},
"credentials": {
"wordpressApi": {
"id": "cOkzd5eeOiHaOXI2",
"name": "Wordpress account"
}
},
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "3bdc1e66-251f-4904-bbc2-dd4e667a4b40",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1140,
40
],
"parameters": {
"color": 6,
"width": 1146,
"height": 521,
"content": "## 创建 WordPress 文章并添加新图片"
},
"typeVersion": 1
},
{
"id": "9d54b59e-5bf3-429b-856a-c3c1dcb25885",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1420,
140
],
"parameters": {
"color": 7,
"width": 300,
"height": 340,
"content": "## 创建文章图片"
},
"typeVersion": 1
},
{
"id": "957b63d2-68af-4c44-b145-3460ed9ea0fc",
"name": "发送错误消息",
"type": "n8n-nodes-base.telegram",
"position": [
1420,
-240
],
"webhookId": "382a3b43-b83f-47b1-a276-67c6b98a441a",
"parameters": {
"text": "=Error Creating Blog Post",
"chatId": "={{ $env.TELEGRAM_CHAT_ID }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "pAIFhguJlkO3c7aQ",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "ef768593-053c-4a65-8eb9-b489cb115d2b",
"name": "有标题和内容吗?",
"type": "n8n-nodes-base.if",
"position": [
1220,
-400
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "aaf83c73-65f3-4a88-87f3-25b1acaf93ef",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.title }}",
"rightValue": ""
},
{
"id": "d9af5bce-f0fb-4c20-8b6a-b01a3bf3e1d1",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.content }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "a6c70ec0-2809-4c38-a2dd-a16e0b44f23e",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
2380,
280
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3
},
{
"id": "2562ab36-2fba-424e-8128-387591d2077e",
"name": "Markdown",
"type": "n8n-nodes-base.markdown",
"position": [
2380,
80
],
"parameters": {
"html": "={{ $('Get Blog Post').item.json.content }}",
"options": {},
"destinationKey": "markdown"
},
"typeVersion": 1
},
{
"id": "1739fe6e-4c0e-45b0-b368-6aab5dd79db9",
"name": "Human in the Loop 批准博客文章",
"type": "n8n-nodes-base.gmail",
"position": [
1780,
-240
],
"webhookId": "48f44283-5f68-4d7a-a2d2-a42209d35032",
"parameters": {
"sendTo": "joe@example.com",
"message": "={{ $json.content }}",
"options": {
"limitWaitTime": {
"values": {
"resumeUnit": "minutes",
"resumeAmount": 45
}
}
},
"subject": "=Approval Required for \"{{ $json.title }}\"",
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"credentials": {
"gmailOAuth2": {
"id": "1xpVDEQ1yx8gV022",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "ae015937-dffb-4445-a013-b22442850de7",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1640,
-360
],
"parameters": {
"color": 4,
"width": 400,
"height": 340,
"content": "## 💫🤩 新功能 - Human in the Loop"
},
"typeVersion": 1
},
{
"id": "aafee6b1-0273-429a-9002-e0406be6c281",
"name": "已批准吗?",
"type": "n8n-nodes-base.if",
"position": [
2080,
-240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "316594d7-7ff6-4e39-bea3-45a11b9e750f",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d7aa4ec8-e936-4e05-b94a-da42f6852591",
"name": "Gmail 最终博客",
"type": "n8n-nodes-base.gmail",
"position": [
2640,
280
],
"webhookId": "07692f3b-4e21-42d3-92dd-3dce5df3112f",
"parameters": {
"sendTo": "joe@example.com",
"message": "={{ $('Get Blog Post').item.json.content }}",
"options": {},
"subject": "={{ $('Get Blog Post').item.json.title }}"
},
"credentials": {
"gmailOAuth2": {
"id": "1xpVDEQ1yx8gV022",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "cefad6b9-b061-4363-8221-34e15e262d00",
"name": "Telegram 部分博客",
"type": "n8n-nodes-base.telegram",
"position": [
2640,
80
],
"webhookId": "77e3b2c9-79b7-4aa1-aa62-24da144c5f45",
"parameters": {
"chatId": "={{ $env.TELEGRAM_CHAT_ID }}",
"operation": "sendPhoto",
"binaryData": true,
"additionalFields": {
"caption": "={{ $json.markdown.slice(0,400) }} ..."
}
},
"credentials": {
"telegramApi": {
"id": "pAIFhguJlkO3c7aQ",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "503ab66d-6924-4be4-8275-3bfa3b3bf69f",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
420,
-860
],
"parameters": {
"color": 7,
"width": 680,
"height": 1420,
"content": "## 🎯 描述"
},
"typeVersion": 1
},
{
"id": "8ea57c7f-256b-4a89-b62f-3a6390fec719",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
360,
-960
],
"parameters": {
"width": 2520,
"height": 1700,
"content": "# 📄✨ 从 PDF 文档轻松创建 WordPress 内容 + 带 Gmail 批准的 Human in the Loop"
},
"typeVersion": 1
},
{
"id": "8cf6bd65-b025-45df-b556-a5fac970aa9b",
"name": "获取博客文章",
"type": "n8n-nodes-base.code",
"position": [
2080,
-760
],
"parameters": {
"jsCode": "// Get the HTML content from the previous node\nconst htmlContent = $input.first().json.text;\n\n// Use regex to extract the text between the first h1 tags\nconst titleRegex = /<h1>(.*?)<\\/h1>/s;\nconst match = htmlContent.match(titleRegex);\n\n// Extract the title or set to empty string if not found\nconst title = match ? match[1] : '';\n\n// Return the extracted title\nreturn [{\n json: {\n title: title,\n content: htmlContent\n }\n}];"
},
"typeVersion": 2
},
{
"id": "5e221628-d3b1-4242-bfa4-6a40599fa87b",
"name": "撰写博客文章",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1740,
-760
],
"parameters": {
"text": "={{ $json.text }}",
"messages": {
"messageValues": [
{
"message": "=Analyze the provided PDF article and create a compelling blog post. Follow these specifications: \n\n## Title Requirements \n- Create an engaging, SEO-friendly title under 10 words \n- Must not contain a colon \n- Should capture the article's essence \n- Will be formatted as an H1 in the content \n\n## Content Structure \n- Introduction (150-200 words) \n * Compelling hook \n * Topic context and importance \n * Preview of main points \n- Main Content (6-8 chapters) \n * Each chapter requires: \n - Relevant H2 heading \n - 300-400 words of unique content \n - Specific topic focus \n - Source material quotes/data \n - Smooth transitions \n - Conclusion (200-250 words) \n * Key takeaways \n * Final thoughts/implications \n\n## Formatting Guidelines \n- Use proper HTML tags throughout \n- Structure with <p> tags for paragraphs \n- Include appropriate spacing \n- Use <blockquote> for direct quotes \n- Maintain consistent formatting \n- Write in clear, professional tone \n- Break up long paragraphs \n- Use engaging subheadings \n- Include transitional phrases \n\nThe content should be original, avoid direct copying, and maintain a consistent voice throughout. \nOnly return the bolg post and avoid any preamble or further explanation."
}
]
},
"promptType": "define"
},
"typeVersion": 1.5
},
{
"id": "58ff967f-e327-4719-8a95-bfe9df02d185",
"name": "获取 Base64",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1880,
500
],
"parameters": {
"options": {},
"operation": "binaryToPropery"
},
"typeVersion": 1
},
{
"id": "a09a8b8b-ca30-4bbe-b3c9-a989e95d0fca",
"name": "保存图片到 imgbb.com",
"type": "n8n-nodes-base.httpRequest",
"position": [
2100,
500
],
"parameters": {
"url": "https://api.imgbb.com/1/upload",
"method": "POST",
"options": {
"redirect": {
"redirect": {}
}
},
"sendBody": true,
"sendQuery": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "image",
"value": "={{ $json.data }}"
},
{
"name": "name",
"value": "="
}
]
},
"queryParameters": {
"parameters": [
{
"name": "expiration",
"value": "600"
},
{
"name": "key",
"value": "[your-imbgg-api-key-here]"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "116a8bee-77b5-44c8-a9fd-df3776ddccd1",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1780,
400
],
"parameters": {
"color": 7,
"width": 560,
"height": 300,
"content": "## 保存图片到 imgbb"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "2d20cb21-b376-49c8-8dc8-cbdec4ddf543",
"connections": {
"Merge": {
"main": [
[
{
"node": "Telegram Partial Blog",
"type": "main",
"index": 0
},
{
"node": "Gmail Final Blog",
"type": "main",
"index": 0
}
]
]
},
"Markdown": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Get Base64": {
"main": [
[
{
"node": "Save Image to imgbb.com",
"type": "main",
"index": 0
}
]
]
},
"Upload PDF": {
"main": [
[
{
"node": "Extract Text",
"type": "main",
"index": 0
}
]
]
},
"gpt-4o-mini": {
"ai_languageModel": [
[
{
"node": "Write Blog Post",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Extract Text": {
"main": [
[
{
"node": "Write Blog Post",
"type": "main",
"index": 0
}
]
]
},
"Is Approved?": {
"main": [
[
{
"node": "Create Wordpress Post",
"type": "main",
"index": 0
}
]
]
},
"Get Blog Post": {
"main": [
[
{
"node": "Is there Title & Content?",
"type": "main",
"index": 0
}
]
]
},
"Write Blog Post": {
"main": [
[
{
"node": "Get Blog Post",
"type": "main",
"index": 0
}
]
]
},
"pollinations.ai": {
"main": [
[
{
"node": "Upload Image to Wordpress",
"type": "main",
"index": 0
},
{
"node": "Merge",
"type": "main",
"index": 1
},
{
"node": "Get Base64",
"type": "main",
"index": 0
}
]
]
},
"Create Wordpress Post": {
"main": [
[
{
"node": "pollinations.ai",
"type": "main",
"index": 0
}
]
]
},
"Telegram Partial Blog": {
"main": [
[]
]
},
"Is there Title & Content?": {
"main": [
[
{
"node": "Human In The Loop Approve Blog Post",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Error Message",
"type": "main",
"index": 0
}
]
]
},
"Upload Image to Wordpress": {
"main": [
[
{
"node": "Set Image on Wordpress Post",
"type": "main",
"index": 0
}
]
]
},
"Set Image on Wordpress Post": {
"main": [
[
{
"node": "Markdown",
"type": "main",
"index": 0
}
]
]
},
"Human In The Loop Approve Blog Post": {
"main": [
[
{
"node": "Is Approved?",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 人工智能, 营销
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
✨🤖 自动化AI驱动的社交媒体内容工厂,适用于X + Facebook + Instagram + LinkedIn
✨🤖 使用AI自动化多平台社交媒体内容创建
If
Set
Code
+17
57 节点Joseph LePage
人工智能
✍️🌄 您的首个WordPress内容创建器 - 快速入门
✍️🌄 您的首个WordPress + AI内容创建器 - 快速入门
If
Set
Code
+10
39 节点Joseph LePage
人工智能
您喜爱频道的高级YouTube RSS Feed伙伴
通过RSS源监控喜爱的YouTube频道并接收通知
Set
Code
Gmail
+13
41 节点Joseph LePage
其他
(Duc)深度研究市场模板
集成PerplexityAI研究和OpenAI内容的多层级WordPress博客生成器
If
Set
Xml
+28
132 节点Daniel Ng
人工智能
✨🩷 自动化社交媒体内容发布工厂 + 系统提示组合
✨🩷 自动化社交媒体内容发布工厂 + 系统提示组合
If
Set
Code
+20
100 节点Joseph LePage
营销
🎦🚀 YouTube 视频评论分析智能体
🎦🚀 YouTube 视频评论分析智能体
Set
Code
Gmail
+12
25 节点Joseph LePage
人工智能
工作流信息
难度等级
高级
节点数量27
分类2
节点类型13
作者
Joseph LePage
@joeAs an AI Automation consultant based in Canada, I partner with forward-thinking organizations to implement AI solutions that streamline operations and drive growth.
外部链接
在 n8n.io 查看 →
分享此工作流