Generar resúmenes estructurados de PDFs de investigación automáticamente con GPT-4o

Intermedio

Este es unDocument Extraction, AI Summarizationflujo de automatización del dominio deautomatización que contiene 9 nodos.Utiliza principalmente nodos como Code, ConvertToFile, ReadWriteFile, Agent, ExtractFromFile. Usar GPT-4o para generar resúmenes estructurados de PDFs de investigación

Requisitos previos
  • Clave de API de OpenAI
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "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": "Modelo de chat OpenAI",
      "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": "Resumirr",
      "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": "Nota adhesiva",
      "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
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Extracción de documentos, Resumen de IA

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Flujos de trabajo relacionados recomendados

Generar múltiples indicaciones de diseño de camisetas a partir de imágenes usando GPT-4o
Usar GPT-4o para generar múltiples prompts de diseños de camisetas a partir de imágenes
Code
Convert To File
Read Write File
+
Code
Convert To File
Read Write File
9 NodosAiAgent
Diseño
Calificación de tareas impulsada por IA con GPT-4-Turbo y salida en múltiples formatos
Usar GPT-4-Turbo para automatizar la corrección de trabajos y la generación de informes en múltiples formatos
Set
Code
Webhook
+
Set
Code
Webhook
15 NodosCheng Siong Chin
Extracción de documentos
Automatización de solicitudes de reserva de hoteles de Gmail a Google Sheets con GPT-4o-mini
Registrar automáticamente solicitudes de reserva de hoteles de Gmail en Google Sheets con GPT-4o-mini
If
Set
Code
+
If
Set
Code
29 NodosGtaras
Extracción de documentos
Creación y carga automática de publicaciones de Instagram con GPT-4o
Automatizar publicaciones de Instagram con títulos de GPT-4o, ImgBB e integración con Buffer
Code
Merge
Airtable
+
Code
Merge
Airtable
11 NodosAiAgent
Redes sociales
Análisis de préstamos de suscripción
Análisis automatizado de documentos de préstamo para decisiones de suscripción con Mistral OCR y GPT
Code
Mistral Ai
Manual Trigger
+
Code
Mistral Ai
Manual Trigger
17 NodosVinay Gangidi
Extracción de documentos
Sistema de revisión por pares con IA, con generación automática de criterios de calificación
Automatizar la asignación de revisiones por pares con Slack y notificaciones por correo electrónico
Set
Code
Slack
+
Set
Code
Slack
22 NodosCheng Siong Chin
Extracción de documentos
Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos9
Categoría2
Tipos de nodos8
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

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.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34