Automatisches Erstellen von strukturierten Zusammenfassungen für wissenschaftliche PDFs mit GPT-4o

Fortgeschritten

Dies ist ein Document Extraction, AI Summarization-Bereich Automatisierungsworkflow mit 9 Nodes. Hauptsächlich werden Code, ConvertToFile, ReadWriteFile, Agent, ExtractFromFile und andere Nodes verwendet. Generieren strukturierter Zusammenfassungen wissenschaftlicher PDFs mit GPT-4o

Voraussetzungen
  • OpenAI API Key
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "z1y59Ygza4dbq9vD",
  "meta": {
    "instanceId": "d92ae4b43988b888be9e59a711908a679453e558f86530d2ed2c1c3491f22bf5",
    "templateCredsSetupCompleted": true
  },
  "name": "Automatically Generate Structured Summaries of Scientific Research PDFs with GPT-4o",
  "tags": [],
  "nodes": [
    {
      "id": "cdf76194-f7e3-4846-8d8b-cd13a3a0404b",
      "name": "Local File Trigger",
      "type": "n8n-nodes-base.localFileTrigger",
      "position": [
        -160,
        0
      ],
      "parameters": {
        "events": [
          "add"
        ],
        "options": {},
        "triggerOn": "folder"
      },
      "typeVersion": 1
    },
    {
      "id": "d376462c-b09c-4d35-b631-5fb3ecc73ceb",
      "name": "OpenAI-Chat-Modell",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        600,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "hghRc8fMDt5M0xCj",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e759529e-fb21-4339-a981-a9cde3b9d63c",
      "name": "Zusammenfassenr",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        640,
        0
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "=#Role \nYou are a research agent. You are very good at analyzing a research article and obtaining the best detail from it. You are a research expert who is providing data to another researcher. You are well versed in the scientific method. You will be provided data from a pdf {{ $json.text }}. You are to analyze this text and provide a thorough summary of it.\n\nProvide your summary in the format of:\nTitle\n\nIntroduction:\n-What is the importance of this study.\n-What are the specific aims of this study.\n-What questions are they trying to answer.\n-What studies have been done in the past in regards to this topic.\n\nMethods:\n-Go into detail about their methods.\n-What type of study is this.\n-How many subjects were included in the study.\n-How was their study designed.\n-What parameters or variables were they measuring. \n         -This is the most important part of this group. In the methods section of each paper they will define what the measurable outcomes of the study were. Sometimes they will have primary and secondary outcomes. You should include all of these.\n-What was their inclusion and exclusion criteria.\n\nResults:\n-This should be comprehensive.\n-It should give the results for every variable or measurable outcome tested.\n-specific numbers with statistical significance should be given.\n\nSummary:\n-You should provide the specific conclusions they came to from their results.\n-Provide how their results compare to other studies mentioned in their paper. In the summary section of the paper they often reference how their results compare to other studies. You should provide this in your summary.\n-Provide what their recommendations are based off the results.\n\nConclusion:\nProvide any weaknesses of the paper.\nProvide all examples of future studies they recommend be performed.\n\n\n\n#additional information\nIntroduction, methods, results, summary, and conclusion should all be new paragraphs. Your information should read smoothly and make sense. you can utilize bullet points or - if you would like for the individual points within the paragraphs. "
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "35c34c88-354b-4018-a66f-5cd2c3e8164a",
      "name": "Converter",
      "type": "n8n-nodes-base.code",
      "position": [
        40,
        0
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const originalPath = $input.first().json.path\n  const convertedPath = originalPath.replace(/\\\\/g, '/');\n  return {\n    json: {\n      ...item.json,\n      convertedPath\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "e357d953-e875-46f5-89a8-4c876c3bdd6e",
      "name": "PDF Finder",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        240,
        0
      ],
      "parameters": {
        "options": {},
        "fileSelector": "={{ $json.convertedPath }}"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "1905ff88-d54a-4435-9ad1-7c1597da57cb",
      "name": "PDF Extractor",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        440,
        0
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "48726ce0-5978-47f6-9688-7ff675128153",
      "name": "Publisher",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1000,
        0
      ],
      "parameters": {
        "options": {},
        "operation": "toText",
        "sourceProperty": "output"
      },
      "typeVersion": 1.1
    },
    {
      "id": "5cc8a81d-3c55-4e8e-bb8c-1dd41e124ce1",
      "name": "Save to Folder",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1200,
        0
      ],
      "parameters": {
        "options": {},
        "operation": "write"
      },
      "typeVersion": 1
    },
    {
      "id": "be22bace-ec61-4494-8c88-8ef00b8624dd",
      "name": "Haftnotiz",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -840
      ],
      "parameters": {
        "color": 5,
        "width": 1320,
        "height": 820,
        "content": "Right click and open local file trigger.\n-Insert the path to your folder.  Open the folder and copy and paste the path at the top.\n-Example C:/Desktop/PDF\n-In the above example, PDF is the name of the folder.\n \nCreate an open ai key:\n-Create an open AI account\n-Go to platform.openai.com/api-keys\n-After creating an account click on your name in the top right corner. Click on your profile.\n-On the left side click on API keys.\n-Create new secret key.\n-Give it a name (optional).\n-Create secret key and copy.\n-Open the n8n workflow.\n-Right click and open the OpenAI chat model under Summarizer tools Agent.\n-Click under credential to connect with and click create new credential.\n-Paste the copied API Key in this position in n8n.\n-IMPORTANT: This workflow uses GPT-4o. This cost ~$0.01 per run. You must put money, recommend no more than $5, into your open ai account.\n-Click on your profile again. On left hand side click on billing.  Add credit to balance.\n \n \n \nRight click on save to folder node.\n-Insert path to folder where you want the summary saved.\n-Example C:/Desktop/Summary/Summary.txt\nTips: you can try saving it as a pdf, but I found saving it as a txt had less errors. \n-You can copy the path again, but you must make sure all \\ are / in the path. This is how n8n interprets the pathway. The trigger node does not matter and should not be changed because the converter node does this automatically.\n \n \nCommon issues:\n-If your first open/read/write files from disk node has an error saying no data, try running n8n as administrator.\n-If running localhost, search command prompt or terminal, before opening right click and choose run as administrator. Then start n8n as you normally would.\n-If the pdf is too large open AI will not be able to summarize it and will have an error that you have reached your limit of requests.\n \n \n \nHow it works:\nYou will have a folder predetermined on your computer. When you find a pdf of a scientific article that you would like a summary of, open n8n and click test workflow. Then save the pdf to the dedicated folder. With n8n running you click test step on the trigger. It will automatically produce a summary of the pdf and save it to a specified folder.\n \nHow to improve:\nIf you have a specific expertise in a field of study, you can customize the output to that field. For example, if you are a marine biologist, you can change the portion of the text prompt in the summarizer tool from \"You are a research expert who is providing data to another researcher.\" to \"You are a marine biologist expert who is providing data to another marine biologist.\""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c633a47e-bed2-42fc-a64f-fcb02cb6eae1",
  "connections": {
    "35c34c88-354b-4018-a66f-5cd2c3e8164a": {
      "main": [
        [
          {
            "node": "e357d953-e875-46f5-89a8-4c876c3bdd6e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "48726ce0-5978-47f6-9688-7ff675128153": {
      "main": [
        [
          {
            "node": "5cc8a81d-3c55-4e8e-bb8c-1dd41e124ce1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e357d953-e875-46f5-89a8-4c876c3bdd6e": {
      "main": [
        [
          {
            "node": "1905ff88-d54a-4435-9ad1-7c1597da57cb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarizer": {
      "main": [
        [
          {
            "node": "48726ce0-5978-47f6-9688-7ff675128153",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1905ff88-d54a-4435-9ad1-7c1597da57cb": {
      "main": [
        [
          {
            "node": "Summarizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarizer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "cdf76194-f7e3-4846-8d8b-cd13a3a0404b": {
      "main": [
        [
          {
            "node": "35c34c88-354b-4018-a66f-5cd2c3e8164a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Fortgeschritten - Dokumentenextraktion, KI-Zusammenfassung

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes9
Kategorie2
Node-Typen8
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Autor
AiAgent

AiAgent

@lifehacks

As a self-taught entrepreneur, I’m passionate about automating everyday tasks to simplify life. Every system I create is designed to enhance efficiency and free up valuable time. Once I perfect an automation that transforms my own routine, I’m excited to share it with you—so you can experience the same benefits.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34