Academic Knowledge Graph Builder from Research Papers using PDF Vector and GPT-4 - n8n Workflow

Use this powerful n8n workflow to automatically fetch, parse, and extract academic entities from research papers via PDF Vector, then structure and save the results into a Neo4j knowledge graph using GPT-4.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Academic Researchers: Who need to keep track of the latest findings and connections in their field.
Data Scientists: Building RAG (Retrieval-Augmented Generation) systems or specialized knowledge bases.
Automation Engineers: Seeking advanced examples of using the n8n node for AI, PDF processing, and graph databases.
Tech Leads: Looking for sophisticated n8n templates to handle complex data transformation tasks.

Overview

Managing vast amounts of academic literature and identifying subtle connections between concepts, authors, and methods is a significant challenge. This sophisticated n8n workflow solves this by creating a structured, searchable knowledge graph.

It leverages the specialized functionality of the PDF Vector n8n node to access academic papers (from sources like arXiv and Semantic Scholar). It then uses the powerful extraction capabilities of the OpenAI n8n node (GPT-4) to identify structured entities. Finally, it transforms this data into Cypher queries and persists it in a Neo4j database. This end-to-end n8n workflow allows researchers to automatically curate and maintain a dynamic, visual knowledge base, drastically cutting down manual analysis time. It is a prime example of high-value n8n templates for advanced data tasks.

How it Works

This automation is triggered daily via a scheduled n8n trigger and executes the following steps:


  1. Daily Activation: The n8n workflow starts using the Schedule Trigger set for a daily interval.

  2. Fetch Papers: The PDF Vector - Fetch Papers n8n node searches for the 20 latest papers in a specified domain (e.g., 'artificial intelligence').

  3. Parse Content: For each paper, the PDF Vector - Parse Papers n8n node retrieves the full text content, essential for deep entity extraction.

  4. AI Extraction: The Extract Entities n8n node (using GPT-4) analyzes the paper content. It is configured to return a structured JSON object containing key concepts, methods, datasets, and defined relationships.

  5. Graph Preparation: The Build Graph Structure n8n node runs custom JavaScript code. This code meticulously transforms the AI-extracted data and the original paper metadata into standardized 'nodes' and 'relationships' arrays, which are formatted for Neo4j consumption.

  6. Database Write (Parallel): Two parallel Neo4j n8n node operations execute:

Create Graph Nodes: Uses UNWIND and MERGE Cypher queries to insert or update entities (Paper, Author, Concept, Method).
Create Relationships: Links these entities using the extracted relationships (e.g., AUTHORED_BY, DISCUSSES, USES).

  1. Logging: The final two n8n node steps calculate statistics (papers processed, entities added) and log the update details into a PostgreSQL database, providing an audit trail for this automated n8n workflow.

Installation Guide

To deploy and utilize this advanced n8n workflow template, follow these steps:


  1. Import: Copy the JSON data and import it directly into your n8n instance.

  2. Credentials Setup:

OpenAI: Set up credentials for the Extract Entities n8n node (requires GPT-4 access).
PDF Vector: Set up credentials for the PDF Vector n8n node.
Neo4j: Configure your connection details and credentials for the two Neo4j n8n node instances.
Postgres: Configure your connection details for the Log KB Update n8n node, ensuring the kb_updates table exists.

  1. Configuration: Review the PDF Vector - Fetch Papers n8n node configuration to adjust the search query domain or paper limit as needed.

  2. Activation: Once all credentials are set, activate the n8n trigger to begin building your knowledge graph.

Node Details

Daily KB Update (Schedule Trigger): This n8n trigger is responsible for initiating the knowledge graph update process once per day.
PDF Vector - Fetch Papers (PDF Vector n8n node): Searches academic sources (Semantic Scholar, arXiv) for papers matching the criteria, limiting results to 20 per execution. Key configuration uses dynamic expressions for the search query and year range.
PDF Vector - Parse Papers (PDF Vector n8n node): Takes the PDF link from the previous step and uses its internal LLM functionality (useLlm: always) to extract the full textual content of the research paper.
Extract Entities (OpenAI n8n node): Utilizes the gpt-4 model. It is critically configured for responseFormat: jsonobject and uses a detailed system prompt to extract Key concepts, Methods, Datasets, and their relationships, ensuring structured output for the next stage of the n8n workflow.
Build Graph Structure (Code n8n node): This crucial transformation n8n node processes the AI output and maps it alongside paper metadata into distinct node and relationship objects, preparing the exact payload required by the Neo4j n8n node.
Create Graph Nodes / Create Relationships (Neo4j n8n node): These parallel nodes execute Cypher queries (UNWIND and MERGE) based on the prepared JSON structure, physically constructing the interconnected graph within the Neo4j database.


  • Log KB Update (Postgres n8n node): Inserts execution statistics (e.g., papersprocessed, concepts) into a logging table, providing essential tracking for this complex n8n workflow.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

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.

Featured*