Academic Citation Network Builder for Gephi Visualization - n8n Workflow

Use this powerful n8n workflow to analyze academic papers and citations. Automatically build structured network data (JSON/GEXF) using the PDF Vector n8n node, ready for Gephi visualization.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Academic Researchers and Scientists needing to map citation influence.

  • Data Engineers seeking specialized data structuring n8n templates.

  • Users who need complex data transformation using custom n8n code nodes.

  • Anyone utilizing Gephi or other graph visualization tools.

Overview

Analyzing the relationships between academic papers is crucial for understanding research impact. However, retrieving paper data and structuring it correctly for graph visualization tools like Gephi can be complex. This advanced n8n workflow automates the entire process. It starts by accepting a list of paper identifiers (DOI, PubMed ID) and uses the specialized PDF Vector n8n node to fetch detailed metadata and citations.

By leveraging several custom Code n8n node steps, the data is transformed from simple API responses into a unified 'nodes' and 'edges' structure. This makes the n8n template highly effective for creating complex citation networks, eliminating manual data handling and ensuring your network graph is instantly exportable as structured JSON and Gephi-compatible GEXF files.

How it Works

This sophisticated n8n workflow operates through a structured sequence of data fetching and manipulation steps:


  1. Configuration: Although this is typically a manually run flow, the start node serves as the initial n8n trigger. The Set Parameters n8n node defines the initial inputs: comma-separated seedPapers (e.g., DOIs) and the intended depth of the search.

  2. ID Splitting: The Split Paper IDs Code n8n node processes the input string, separating the identifiers and creating individual items for parallel processing.

  3. Metadata Retrieval: The PDF Vector - Fetch Papers n8n node retrieves core metadata (title, authors, citation count) for each seed paper.

  4. Citation Search: The subsequent Fetch Citing Papers n8n node uses the DOI of the seed paper to query the API for papers that reference (cite) the seed paper, establishing the first level of relationships.

  5. Network Structuring: The Build Network Data Code n8n node is essential. It takes the seed paper and its citing papers and generates a temporary set of nodes and edges for that specific data item, calculating node size based on citation count.

  6. Aggregation: The Combine Network Code n8n node collects all the temporary network segments generated in the previous step, merging the nodes and edges arrays and deduplicating nodes based on their ID, resulting in one cohesive graph structure. This showcases the power of dynamic data aggregation within an n8n workflow.

  7. Final Export: The resulting unified graph data is exported in two ways: raw JSON via the Export Network JSON n8n node and as a Gephi-compatible XML file via the Generate GEXF Code n8n node, finalizing the output of this comprehensive n8n template.

Installation Guide

To utilize this powerful n8n workflow, follow these steps:


  1. Import the n8n workflow: Copy the provided JSON code and import it directly into your n8n instance via the 'New' button or the 'Import from JSON' option.

  2. PDF Vector Credential Setup: This n8n workflow requires credentials for the PDF Vector service. Go to Settings > Credentials in n8n and add a new credential of type 'PDF Vector API'. You will need an API Key from the service provider.

  3. Configure Seed Data: Open the Set Parameters n8n node and update the seedPapers value with the comma-separated DOIs or paper IDs you wish to analyze.

  4. Execution: Since there is no automated n8n trigger (like a schedule or webhook), execute the n8n workflow manually. The final output files will be saved locally (if running n8n on your machine) or as binary data attached to the final node execution.

Node Details

Set Parameters (n8n node):
Function: Initializes the starting data for the n8n workflow.
Key Configuration: Sets seedPapers (comma-separated IDs) and depth.
Split Paper IDs (Code n8n node):
Function: Transforms the comma-separated string into multiple distinct items, allowing the subsequent nodes to loop through each paper independently.
Key Configuration: Uses JavaScript to split the seedPapers string.
PDF Vector - Fetch Papers (PDF Vector n8n node):
Function: Primary data retrieval, fetching essential metadata for the seed papers.
Key Configuration: Resource: academic, Operation: fetch, dynamically pulling the ID from the previous item (={{ $json.id }}).
Fetch Citing Papers (PDF Vector n8n node):
Function: Finds papers that cite the target paper, establishing directional edges.
Key Configuration: Operation: search, using a dynamic query based on the DOI (=references:{{ $json.doi }}).
Build Network Data (Code n8n node):
Function: Structures the data for a single seed paper and its citations into standard 'nodes' and 'edges' objects, a crucial step in this n8n template.
Combine Network (Code n8n node):
Function: Aggregates all network segments from the parallel loops into a single output item, managing deduplication of nodes.
Export Network JSON (Write Binary File n8n node):
Function: Saves the aggregated network data structure as a raw JSON file, ready for import into other systems.
* Key Configuration: Uses an expression to name the file based on the current date.

Related n8n Workflows

Free

Nodes: 5 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*