使用PDF.co从PDF文档提取链接和URL
中级
这是一个Document Extraction领域的自动化工作流,包含 10 个节点。主要使用 Code, PDFco Api, FormTrigger, HttpRequest 等节点。 使用PDF.co从PDF文档提取链接和URL
前置要求
- •可能需要目标 API 的认证凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "8396a2c42d7edc37401c19b3909f25edcb0e4a6dc3914c824fddd73a329a575c",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "f6e71b74-1ecb-43e8-baa2-bf05536d01b7",
"name": "加载 PDF",
"type": "n8n-nodes-base.formTrigger",
"position": [
-2224,
-384
],
"webhookId": "a919be0e-e4c8-4b9c-b8e9-b1ffdd6ef9fb",
"parameters": {
"options": {},
"formTitle": "pdf",
"formFields": {
"values": [
{
"fieldType": "file",
"fieldLabel": "data",
"multipleFiles": false,
"acceptFileTypes": ".pdf"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "f24dd98b-b3c4-47f1-8345-10097e53803d",
"name": "上传",
"type": "n8n-nodes-pdfco.PDFco Api",
"position": [
-2016,
-384
],
"parameters": {
"name": "test",
"operation": "Upload File to PDF.co",
"binaryData": true
},
"credentials": {
"pdfcoApi": {
"id": "RgIt0qlGxtcDwXW7",
"name": "PDF.co account"
}
},
"typeVersion": 1
},
{
"id": "b354cde6-5354-4052-9a6c-d66c328a946f",
"name": "PDF 转 HTML",
"type": "n8n-nodes-pdfco.PDFco Api",
"position": [
-1776,
-384
],
"parameters": {
"url": "={{ $json.url }}",
"operation": "Convert from PDF",
"advancedOptions": {}
},
"credentials": {
"pdfcoApi": {
"id": "RgIt0qlGxtcDwXW7",
"name": "PDF.co account"
}
},
"typeVersion": 1
},
{
"id": "e15b5c0d-5a46-4faa-828f-25e56cfce322",
"name": "获取 HTML",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1568,
-384
],
"parameters": {
"url": "={{ $json.url }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "73506c94-6265-4d89-b386-e908285d14e0",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2288,
-448
],
"parameters": {
"width": 208,
"height": 240,
"content": "## 加载 PDF"
},
"typeVersion": 1
},
{
"id": "6d23ab8a-5bae-4317-b73e-fb1b2ba8ff16",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2080,
-448
],
"parameters": {
"color": 2,
"height": 240,
"content": "## 上传到 PDF.CO"
},
"typeVersion": 1
},
{
"id": "72be2279-3028-4c24-8973-00879cff375a",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1840,
-448
],
"parameters": {
"color": 4,
"width": 224,
"height": 240,
"content": "## PDF 转 HTML"
},
"typeVersion": 1
},
{
"id": "cebf4aeb-549c-4c9e-84eb-41d880834fb5",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1616,
-448
],
"parameters": {
"width": 192,
"height": 240,
"content": "## 获取 HTML"
},
"typeVersion": 1
},
{
"id": "8f6d9763-dece-45f6-a78b-1b5f6891f2fa",
"name": "代码1",
"type": "n8n-nodes-base.code",
"position": [
-1360,
-384
],
"parameters": {
"jsCode": "// Recorrer todos los items que entran al nodo\nconst resultados = [];\n\nfor (const item of $input.all()) {\n const texto = item.json.data || '';\n // Regex para URLs (http, https, www)\n const regexUrl = /(https?:\\/\\/[^\\s]+)|(www\\.[^\\s]+)/gi;\n \n // Extraer URLs, si no hay ninguna, el resultado es []\n const urls = texto.match(regexUrl) || [];\n \n // Por cada URL encontrada, crear un nuevo item con la URL\n for (const url of urls) {\n resultados.push({ json: { url } });\n }\n}\n\n// Devolver un array de objetos con las URLs extraídas\nreturn resultados;\n"
},
"typeVersion": 2
},
{
"id": "0c49f98f-0b3c-4c47-ad34-b60b02c5f3a5",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1424,
-448
],
"parameters": {
"color": 5,
"width": 208,
"height": 240,
"content": "## 获取 URL"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Upload": {
"main": [
[
{
"node": "PDF to HTML",
"type": "main",
"index": 0
}
]
]
},
"Get HTML": {
"main": [
[
{
"node": "Code1",
"type": "main",
"index": 0
}
]
]
},
"Load PDF": {
"main": [
[
{
"node": "Upload",
"type": "main",
"index": 0
}
]
]
},
"PDF to HTML": {
"main": [
[
{
"node": "Get HTML",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 文档提取
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
仅限表单提交_双源音频转录 --> AI摘要与情感分析 --> Gmail投递
音频转执行简报:使用AssemblyAI和GPT-4进行转录与分析
If
Code
Wait
+7
22 节点Sridevi Edupuganti
文档提取
PDF 转订单
使用AI将PDF采购订单自动化转换为Adobe Commerce销售订单
If
Set
Code
+19
96 节点JKingma
文档提取
规划研究
使用Gemini AI、Google文档和人工反馈自动化UX研究规划
Code
Gmail
Google Docs
+5
33 节点Zeinabsadat Mousavi Amin
文档提取
使用 Gemini 和 Jina AI 自动化供应商尽职调查研究
使用 Gemini 和 Jina AI 自动化供应商尽职调查研究
If
Set
Code
+12
27 节点Adnan
文档提取
通过Webhook在n8n中创建工作流
通过Webhook和n8n API以编程方式创建动态工作流
If
Set
Code
+3
11 节点Mauricio Perera
工程
基于Elasticsearch的动态搜索界面与自动化报告生成
使用Elasticsearch的动态搜索界面和自动化报告生成
Code
Form Trigger
Http Request
+2
11 节点DataMinex
文档提取
工作流信息
难度等级
中级
节点数量10
分类1
节点类型5
作者
Mauricio Perera
@rckflrAutomation consultant with over 10 years of experience specializing in AI, no-code, and workflow optimization. I’ve delivered tailored AI and NLP solutions across real estate, healthcare, and more, enhancing efficiency and customer experiences. Proficient in tools like Make, Airtable, and Zapier, I also integrate GPT models to create scalable, innovative automations. Contact me to discuss custom n8n workflows or advanced automations to streamline your processes.
外部链接
在 n8n.io 查看 →
分享此工作流