PDF转Markdown
中级
这是一个Document Extraction, Multimodal AI领域的自动化工作流,包含 7 个节点。主要使用 If, Wait, FormTrigger, HttpRequest 等节点。 使用LlamaIndex Cloud API提取并将PDF文档转换为Markdown格式
前置要求
- •可能需要目标 API 的认证凭证
使用的节点 (7)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "rnBhMZpP6vRnoQ8Z",
"meta": {
"instanceId": "7578372eeadee5ee5414cdf5a06141eebec63e21f295454563ddce7b1217363f",
"templateCredsSetupCompleted": true
},
"name": "将 PDF 转换为 Markdown",
"tags": [],
"nodes": [
{
"id": "5653ad40-2f56-4e18-be4b-04b4dd10b107",
"name": "等待",
"type": "n8n-nodes-base.wait",
"position": [
816,
-256
],
"webhookId": "a0518843-31f8-44f9-bd8e-1189e16de0f1",
"parameters": {
"amount": 30
},
"typeVersion": 1.1
},
{
"id": "ef584ef5-1aeb-434a-9ed2-f837a329486f",
"name": "上传文档",
"type": "n8n-nodes-base.httpRequest",
"position": [
624,
-256
],
"parameters": {
"url": "https://api.cloud.llamaindex.ai/api/v1/parsing/upload",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"sendHeaders": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "file",
"parameterType": "formBinaryData",
"inputDataFieldName": "file"
}
]
},
"genericAuthType": "httpBearerAuth",
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
},
{
"name": "Content-Type",
"value": "multipart/form-data"
}
]
}
},
"credentials": {
"httpBearerAuth": {
"id": "1Sr92y8U8gwgeguP",
"name": "Bearer Auth account"
},
"httpHeaderAuth": {
"id": "EvU6DvmyXtGiv4p0",
"name": "LlamaCloud"
}
},
"typeVersion": 4.2
},
{
"id": "63c299af-dae8-4dd5-a4a9-159302c9a18a",
"name": "如果",
"type": "n8n-nodes-base.if",
"position": [
1232,
-256
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7a07aec1-fc5f-4b76-94d9-6fa8f509ac8e",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "SUCCESS"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "3bf86ec3-5cbe-4581-a615-528c0e6b783b",
"name": "表单提交时",
"type": "n8n-nodes-base.formTrigger",
"position": [
416,
-256
],
"webhookId": "5d1027e0-2885-4436-840f-a0e95cde60a2",
"parameters": {
"options": {},
"formTitle": "Upload file",
"formFields": {
"values": [
{
"fieldType": "file",
"fieldLabel": "File",
"acceptFileTypes": "pdf"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "f451ade2-fccd-4636-b11c-7971b9d32b5e",
"name": "等待2",
"type": "n8n-nodes-base.wait",
"position": [
1504,
-112
],
"webhookId": "8da5da31-1ebd-4c82-8c6a-476d5d277cdd",
"parameters": {
"amount": 60
},
"typeVersion": 1.1
},
{
"id": "8f7d2640-7fd4-425b-bb03-bb71b73a7dc3",
"name": "状态验证",
"type": "n8n-nodes-base.httpRequest",
"position": [
1008,
-256
],
"parameters": {
"url": "=https://api.cloud.llamaindex.ai/api/parsing/job/{{ $('Upload_doc').item.json.id }}",
"options": {},
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth",
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
}
},
"credentials": {
"httpBearerAuth": {
"id": "1Sr92y8U8gwgeguP",
"name": "Bearer Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "0c488546-7ec6-4c95-bc18-255d792705d4",
"name": "内容提取",
"type": "n8n-nodes-base.httpRequest",
"position": [
1504,
-304
],
"parameters": {
"url": "=https://api.cloud.llamaindex.ai/api/v1/parsing/job/{{ $json.id }}/result/markdown",
"options": {},
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth",
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
}
},
"credentials": {
"httpBearerAuth": {
"id": "1Sr92y8U8gwgeguP",
"name": "Bearer Auth account"
}
},
"typeVersion": 4.2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "a0fb030f-88ae-4c19-8662-b83f55dbeced",
"connections": {
"If": {
"main": [
[
{
"node": "Content extraction",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait2",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Status Verification",
"type": "main",
"index": 0
}
]
]
},
"Wait2": {
"main": [
[
{
"node": "Status Verification",
"type": "main",
"index": 0
}
]
]
},
"Upload_doc": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Upload_doc",
"type": "main",
"index": 0
}
]
]
},
"Status Verification": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 文档提取, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
来自xlsx、xls或csv文件的智能报告生成器,具有基于AI的分析
使用Gemini AI和Google Workspace从Excel/CSV生成专业报告
If
Set
Code
+18
35 节点franck fambou
文档提取
PDF 转订单
使用AI将PDF采购订单自动化转换为Adobe Commerce销售订单
If
Set
Code
+19
96 节点JKingma
文档提取
多级文档审批与审计工作流
使用 Supabase 和 Gmail 自动化多级工作流的文档审批
If
Set
Form
+8
38 节点Alok Kumar
文档提取
使用Datalab.to API将PDF、DOC和图像转换为Markdown
使用Datalab.to API将PDF、DOC和图像转换为Markdown
Set
Wait
Switch
+3
11 节点Joseph
文档提取
使用PDFMonkey的自动化AI提案生成器
使用GPT-4o和PDFMonkey生成专业提案
Wait
Gmail
Function
+4
10 节点Marth
文档提取
使用SubworkflowAI和Gemini进行OCR的大文档处理
使用SubworkflowAI和Gemini进行OCR的大文档处理
If
Wait
Split Out
+5
16 节点Jimleuk
文档提取