8
n8n 中文网amn8n.com

使用GPT-4和PDF Vector生成多格式研究论文摘要

中级

这是一个AI Summarization, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Code, OpenAi, Webhook, PdfVector, RespondToWebhook 等节点。 使用GPT-4和PDF Vector生成多格式研究论文摘要

前置要求
  • OpenAI API Key
  • HTTP Webhook 端点(n8n 会自动生成)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "placeholder"
  },
  "nodes": [
    {
      "id": "info-note",
      "name": "摘要类型",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        250,
        150
      ],
      "parameters": {
        "content": "## 论文摘要生成器"
      },
      "typeVersion": 1
    },
    {
      "id": "webhook-trigger",
      "name": "Webhook - 论文 URL",
      "type": "n8n-nodes-base.webhook",
      "position": [
        450,
        300
      ],
      "parameters": {
        "path": "summarize",
        "options": {},
        "responseMode": "onReceived"
      },
      "typeVersion": 1
    },
    {
      "id": "pdfvector-parse",
      "name": "PDF 向量 - 解析论文",
      "type": "n8n-nodes-pdfvector.pdfVector",
      "position": [
        650,
        300
      ],
      "parameters": {
        "useLlm": "always",
        "resource": "document",
        "operation": "parse",
        "documentUrl": "={{ $json.paperUrl }}"
      },
      "typeVersion": 1
    },
    {
      "id": "exec-summary",
      "name": "执行摘要",
      "type": "n8n-nodes-base.openAi",
      "position": [
        850,
        250
      ],
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "content": "Create an executive summary (max 500 words) of this research paper:\n\n{{ $json.content }}\n\nInclude:\n1. Research question and motivation\n2. Methodology overview\n3. Key findings (3-5 points)\n4. Practical implications\n5. Limitations and future work"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "tech-summary",
      "name": "技术摘要",
      "type": "n8n-nodes-base.openAi",
      "position": [
        850,
        350
      ],
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "content": "Create a detailed technical summary of this research paper:\n\n{{ $json.content }}\n\nInclude:\n1. Research objectives and hypotheses\n2. Detailed methodology\n3. Data analysis approach\n4. Complete results with statistics\n5. Technical contributions\n6. Comparison with prior work\n7. Future research directions"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "lay-summary",
      "name": "通俗摘要",
      "type": "n8n-nodes-base.openAi",
      "position": [
        850,
        450
      ],
      "parameters": {
        "model": "gpt-3.5-turbo",
        "messages": {
          "values": [
            {
              "content": "Explain this research paper in simple terms that anyone can understand (max 300 words):\n\n{{ $json.content }}\n\nAvoid jargon and technical terms. Use analogies where helpful."
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "tweet-summary",
      "name": "推文摘要",
      "type": "n8n-nodes-base.openAi",
      "position": [
        850,
        550
      ],
      "parameters": {
        "model": "gpt-3.5-turbo",
        "messages": {
          "values": [
            {
              "content": "Create a tweet (max 280 characters) summarizing the key finding of this paper:\n\n{{ $json.content }}\n\nMake it engaging and include relevant hashtags."
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "combine-summaries",
      "name": "合并所有摘要",
      "type": "n8n-nodes-base.code",
      "position": [
        1050,
        400
      ],
      "parameters": {
        "functionCode": "return {\n  paperUrl: $node['Webhook - Paper URL'].json.paperUrl,\n  summaries: {\n    executive: $node['Executive Summary'].json.content,\n    technical: $node['Technical Summary'].json.content,\n    lay: $node['Lay Summary'].json.content,\n    tweet: $node['Tweet Summary'].json.content\n  },\n  generatedAt: new Date().toISOString()\n};"
      },
      "typeVersion": 1
    },
    {
      "id": "respond-webhook",
      "name": "返回摘要",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1250,
        400
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Lay Summary": {
      "main": [
        [
          {
            "node": "Combine All Summaries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tweet Summary": {
      "main": [
        [
          {
            "node": "Combine All Summaries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Executive Summary": {
      "main": [
        [
          {
            "node": "Combine All Summaries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Technical Summary": {
      "main": [
        [
          {
            "node": "Combine All Summaries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Paper URL": {
      "main": [
        [
          {
            "node": "PDF Vector - Parse Paper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine All Summaries": {
      "main": [
        [
          {
            "node": "Return Summaries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PDF Vector - Parse Paper": {
      "main": [
        [
          {
            "node": "Executive Summary",
            "type": "main",
            "index": 0
          },
          {
            "node": "Technical Summary",
            "type": "main",
            "index": 0
          },
          {
            "node": "Lay Summary",
            "type": "main",
            "index": 0
          },
          {
            "node": "Tweet Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - AI 摘要总结, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量9
分类2
节点类型6
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
PDF Vector

PDF Vector

@pdfvector

A 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 查看

分享此工作流