Générer automatiquement des résumés structurés de PDF de recherche avec GPT-4o

Intermédiaire

Ceci est unDocument Extraction, AI Summarizationworkflow d'automatisation du domainecontenant 9 nœuds.Utilise principalement des nœuds comme Code, ConvertToFile, ReadWriteFile, Agent, ExtractFromFile. Utiliser GPT-4o pour générer des résumés structurés de PDF de recherche

Prérequis
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "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": "Déclencheur de fichier local",
      "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 Model",
      "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": "Summarizer",
      "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": "Enregistrer dans le dossier",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1200,
        0
      ],
      "parameters": {
        "options": {},
        "operation": "write"
      },
      "typeVersion": 1
    },
    {
      "id": "be22bace-ec61-4494-8c88-8ef00b8624dd",
      "name": "Sticky Note",
      "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
          }
        ]
      ]
    },
    "e759529e-fb21-4339-a981-a9cde3b9d63c": {
      "main": [
        [
          {
            "node": "48726ce0-5978-47f6-9688-7ff675128153",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1905ff88-d54a-4435-9ad1-7c1597da57cb": {
      "main": [
        [
          {
            "node": "e759529e-fb21-4339-a981-a9cde3b9d63c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d376462c-b09c-4d35-b631-5fb3ecc73ceb": {
      "ai_languageModel": [
        [
          {
            "node": "e759529e-fb21-4339-a981-a9cde3b9d63c",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "cdf76194-f7e3-4846-8d8b-cd13a3a0404b": {
      "main": [
        [
          {
            "node": "35c34c88-354b-4018-a66f-5cd2c3e8164a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Extraction de documents, Résumé IA

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Workflows recommandés

Utiliser GPT-4o pour générer plusieurs invites de conception de T-shirts à partir d'images
Générer plusieurs invites de conception de t-shirts à partir d'images avec GPT-4o
Code
Convert To File
Read Write File
+
Code
Convert To File
Read Write File
9 NœudsAiAgent
Design
Notation de tâches GPT-4-Turbo pilotée par l'IA avec des sorties multi-format
Utiliser GPT-4-Turbo pour automatiser la notation de devoirs et la génération de rapports multi-formats
Set
Code
Webhook
+
Set
Code
Webhook
15 NœudsCheng Siong Chin
Extraction de documents
Automatisation des demandes de réservation d'hôtel de Gmail vers Google Sheets avec GPT-4o-mini
Automatiser la saisie automatique des demandes de réservation d'hôtel de Gmail vers Google Sheets avec GPT-4o-mini
If
Set
Code
+
If
Set
Code
29 NœudsGtaras
Extraction de documents
Création et téléchargement automatiques de publications Instagram avec GPT-4o
Automatiser les publications Instagram avec des titres générés par GPT-4o, ImgBB et une intégration Buffer
Code
Merge
Airtable
+
Code
Merge
Airtable
11 NœudsAiAgent
Réseaux sociaux
Analyse des prêts à souscrire
Utiliser Mistral OCR et GPT pour automatiser l'analyse des documents de prêt pour les décisions d'assurance
Code
Mistral Ai
Manual Trigger
+
Code
Mistral Ai
Manual Trigger
17 NœudsVinay Gangidi
Extraction de documents
Système d'évaluation par les pairs piloté par l'IA avec génération automatique de critères d'évaluation
Utiliser GPT-4-nano, Slack et les notifications par e-mail pour automatiser l'attribution des relecture par les pairs
Set
Code
Slack
+
Set
Code
Slack
22 NœudsCheng Siong Chin
Extraction de documents
Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds9
Catégorie2
Types de nœuds8
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
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.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34