批量PDF转Markdown转换(Google Drive与LLM解析)
中级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 If, Set, Code, Slack, GoogleDrive 等节点。 使用Google Drive和LLM驱动的解析进行批量PDF转Markdown转换
前置要求
- •Slack Bot Token 或 Webhook URL
- •Google Drive API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "placeholder"
},
"nodes": [
{
"id": "info-note",
"name": "工作流信息",
"type": "n8n-nodes-base.stickyNote",
"position": [
250,
150
],
"parameters": {
"content": "## 批量 PDF 转换器"
},
"typeVersion": 1
},
{
"id": "google-drive",
"name": "Google Drive - 列出 PDF 文件",
"type": "n8n-nodes-base.googleDrive",
"notes": "List all PDFs from specified folder",
"position": [
450,
300
],
"parameters": {
"fileId": "={{ $json.folderId }}",
"operation": "list"
},
"typeVersion": 1
},
{
"id": "filter-pdfs",
"name": "仅筛选 PDF 文件",
"type": "n8n-nodes-base.if",
"position": [
650,
300
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.mimeType }}",
"value2": "application/pdf"
}
]
}
},
"typeVersion": 1
},
{
"id": "pdfvector-convert",
"name": "PDF Vector - 转换为 Markdown",
"type": "n8n-nodes-pdfvector.pdfVector",
"notes": "Convert each PDF to Markdown",
"position": [
850,
300
],
"parameters": {
"useLlm": "auto",
"resource": "document",
"operation": "parse",
"documentUrl": "={{ $json.webViewLink }}"
},
"typeVersion": 1
},
{
"id": "prepare-output",
"name": "准备输出",
"type": "n8n-nodes-base.code",
"position": [
1050,
300
],
"parameters": {
"functionCode": "const fileName = $json.name.replace('.pdf', '.md');\nconst content = $json.content;\nconst metadata = {\n originalFile: $json.name,\n convertedAt: new Date().toISOString(),\n pageCount: $json.pageCount || 'unknown',\n credits: $json.creditsUsed || 0\n};\n\nreturn {\n fileName,\n content,\n metadata\n};"
},
"typeVersion": 1
},
{
"id": "save-markdown",
"name": "保存 Markdown 文件",
"type": "n8n-nodes-base.googleDrive",
"position": [
1250,
300
],
"parameters": {
"name": "={{ $json.fileName }}",
"content": "={{ $json.content }}",
"parents": [
"{{ $json.outputFolderId }}"
],
"operation": "upload"
},
"typeVersion": 1
},
{
"id": "summary-stats",
"name": "转换摘要",
"type": "n8n-nodes-base.set",
"position": [
1450,
300
],
"parameters": {
"values": {
"string": [
{
"name": "summary",
"value": "=Converted {{ $items().length }} PDFs to Markdown\nTotal credits used: {{ $items().reduce((sum, item) => sum + (item.json.metadata.credits || 0), 0) }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "notify-complete",
"name": "发送通知",
"type": "n8n-nodes-base.slack",
"position": [
1650,
300
],
"parameters": {
"message": "=Batch Conversion Complete!\n\n{{ $json.summary }}\n\nFiles saved to Google Drive.",
"additionalFields": {}
},
"typeVersion": 1
}
],
"connections": {
"Prepare Output": {
"main": [
[
{
"node": "Save Markdown Files",
"type": "main",
"index": 0
}
]
]
},
"Filter PDFs Only": {
"main": [
[
{
"node": "PDF Vector - Convert to Markdown",
"type": "main",
"index": 0
}
]
]
},
"Conversion Summary": {
"main": [
[
{
"node": "Send Notification",
"type": "main",
"index": 0
}
]
]
},
"Save Markdown Files": {
"main": [
[
{
"node": "Conversion Summary",
"type": "main",
"index": 0
}
]
]
},
"Google Drive - List PDFs": {
"main": [
[
{
"node": "Filter PDFs Only",
"type": "main",
"index": 0
}
]
]
},
"PDF Vector - Convert to Markdown": {
"main": [
[
{
"node": "Prepare Output",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用PDF向量、Google Drive和数据库提取和存储发票数据
使用PDF向量、Google Drive和数据库提取和存储发票数据
If
Code
Slack
+7
26 节点PDF Vector
发票处理
会议纪要和行动项跟踪器
基于AI的会议纪要:使用GPT-4、任务分配和多渠道分发
If
Set
Code
+10
38 节点Jitesh Dugar
内容创作
使用GPT-4和多数据库搜索自动化学术文献综述
使用GPT-4和多数据库搜索自动化学术文献综述
If
Set
Code
+4
13 节点PDF Vector
文档提取
Google Meet AI助手
使用Google Meet、AssemblyAI和Claude AI自动化会议摘要与行动项
If
Set
Code
+12
25 节点Dominic
内容创作
使用Groq、Gemini和Slack审批系统自动化RSS到Medium发布
通过Groq、Gemini和Slack审批系统实现RSS到Medium发布的自动化流程
If
Set
Code
+16
41 节点ObisDev
内容创作
自动化学术论文监控,含PDF向量、GPT-3.5和Slack提醒
自动化学术论文监控,含PDF向量、GPT-3.5和Slack提醒
Set
Code
Slack
+5
10 节点PDF Vector
个人效率
工作流信息
难度等级
中级
节点数量8
分类2
节点类型7
作者
PDF Vector
@pdfvectorA fully featured PDF APIs for developers - Parse any PDF or Word document, extract structured data, and access millions of academic papers - all through simple APIs.
外部链接
在 n8n.io 查看 →
分享此工作流