Akademisches Zitationsnetzwerk-Builder
Dies ist ein Document Extraction, Multimodal AI-Bereich Automatisierungsworkflow mit 9 Nodes. Hauptsächlich werden Set, Code, PdfVector, WriteBinaryFile und andere Nodes verwendet. Akademisches Zitationsnetzwerk für Gephi-Visualisierung mit PDF-Vector-API
- •Keine besonderen Voraussetzungen, sofort nach Import nutzbar
Verwendete Nodes (9)
Kategorie
{
"meta": {
"instanceId": "placeholder"
},
"nodes": [
{
"id": "config-note",
"name": "Konfiguration",
"type": "n8n-nodes-base.stickyNote",
"position": [
250,
150
],
"parameters": {
"content": "## Citation Network Builder\n\nInput: Paper IDs (DOI, PubMed ID, etc.)\nDepth: How many citation levels to explore\nOutput: Network graph data"
},
"typeVersion": 1
},
{
"id": "input-params",
"name": "Parameter setzen",
"type": "n8n-nodes-base.set",
"position": [
450,
300
],
"parameters": {
"values": {
"string": [
{
"name": "seedPapers",
"value": "10.1038/nature12373,12345678,2301.12345"
},
{
"name": "depth",
"value": "2"
}
]
}
},
"typeVersion": 1
},
{
"id": "split-ids",
"name": "Paper-IDs aufteilen",
"type": "n8n-nodes-base.code",
"position": [
650,
300
],
"parameters": {
"functionCode": "const papers = $json.seedPapers.split(',').map(id => ({ id: id.trim() }));\nreturn papers;"
},
"typeVersion": 1
},
{
"id": "pdfvector-fetch",
"name": "PDF Vector - Paper abrufen",
"type": "n8n-nodes-pdfvector.pdfVector",
"notes": "Fetch details for each paper",
"position": [
850,
300
],
"parameters": {
"ids": "={{ $json.id }}",
"fields": [
"title",
"authors",
"year",
"doi",
"abstract",
"totalCitations",
"totalReferences"
],
"resource": "academic",
"operation": "fetch"
},
"typeVersion": 1
},
{
"id": "fetch-citations",
"name": "Zitierende Paper abrufen",
"type": "n8n-nodes-pdfvector.pdfVector",
"position": [
1050,
300
],
"parameters": {
"limit": 20,
"query": "=references:{{ $json.doi }}",
"fields": [
"title",
"authors",
"year",
"doi",
"totalCitations"
],
"resource": "academic",
"operation": "search"
},
"typeVersion": 1
},
{
"id": "build-network",
"name": "Netzwerkdaten erstellen",
"type": "n8n-nodes-base.code",
"position": [
1250,
300
],
"parameters": {
"functionCode": "// Build network nodes and edges\nconst nodes = [];\nconst edges = [];\n\n// Add main paper as node\nnodes.push({\n id: $json.doi || $json.id,\n label: $json.title,\n size: Math.log($json.totalCitations + 1) * 10,\n citations: $json.totalCitations,\n year: $json.year,\n type: 'seed'\n});\n\n// Add citing papers and edges\nif ($json.citingPapers) {\n $json.citingPapers.forEach(paper => {\n nodes.push({\n id: paper.doi,\n label: paper.title,\n size: Math.log(paper.totalCitations + 1) * 5,\n citations: paper.totalCitations,\n year: paper.year,\n type: 'citing'\n });\n \n edges.push({\n source: paper.doi,\n target: $json.doi || $json.id,\n weight: 1\n });\n });\n}\n\nreturn { nodes, edges };"
},
"typeVersion": 1
},
{
"id": "combine-network",
"name": "Netzwerk kombinieren",
"type": "n8n-nodes-base.code",
"position": [
1450,
300
],
"parameters": {
"functionCode": "// Combine all nodes and edges from multiple papers\nconst allNodes = [];\nconst allEdges = [];\n\nitems.forEach(item => {\n if (item.json.nodes) {\n allNodes.push(...item.json.nodes);\n }\n if (item.json.edges) {\n allEdges.push(...item.json.edges);\n }\n});\n\n// Remove duplicate nodes based on ID\nconst uniqueNodes = Array.from(new Map(allNodes.map(node => [node.id, node])).values());\n\nreturn [{ json: { nodes: uniqueNodes, edges: allEdges } }];"
},
"typeVersion": 1
},
{
"id": "export-network",
"name": "Export Network JSON",
"type": "n8n-nodes-base.writeBinaryFile",
"position": [
1650,
300
],
"parameters": {
"fileName": "citation_network_{{ $now.format('yyyy-MM-dd') }}.json",
"fileContent": "={{ JSON.stringify({ nodes: $json.nodes, edges: $json.edges }, null, 2) }}"
},
"typeVersion": 1
},
{
"id": "generate-gexf",
"name": "GEXF generieren",
"type": "n8n-nodes-base.code",
"position": [
1650,
450
],
"parameters": {
"functionCode": "// Generate Gephi-compatible GEXF format\nconst nodes = $json.nodes;\nconst edges = $json.edges;\n\nlet gexf = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<gexf xmlns=\"http://www.gexf.net/1.2draft\" version=\"1.2\">\n <graph mode=\"static\" defaultedgetype=\"directed\">\n <nodes>\\n`;\n\nnodes.forEach(node => {\n gexf += ` <node id=\"${node.id}\" label=\"${node.label}\">\n <attvalues>\n <attvalue for=\"citations\" value=\"${node.citations}\"/>\n <attvalue for=\"year\" value=\"${node.year}\"/>\n </attvalues>\n </node>\\n`;\n});\n\ngexf += ` </nodes>\n <edges>\\n`;\n\nedges.forEach((edge, i) => {\n gexf += ` <edge id=\"${i}\" source=\"${edge.source}\" target=\"${edge.target}\" weight=\"${edge.weight}\"/>\\n`;\n});\n\ngexf += ` </edges>\n </graph>\n</gexf>`;\n\nreturn { gexf };"
},
"typeVersion": 1
}
],
"connections": {
"input-params": {
"main": [
[
{
"node": "split-ids",
"type": "main",
"index": 0
}
]
]
},
"combine-network": {
"main": [
[
{
"node": "export-network",
"type": "main",
"index": 0
},
{
"node": "generate-gexf",
"type": "main",
"index": 0
}
]
]
},
"split-ids": {
"main": [
[
{
"node": "pdfvector-fetch",
"type": "main",
"index": 0
}
]
]
},
"build-network": {
"main": [
[
{
"node": "combine-network",
"type": "main",
"index": 0
}
]
]
},
"fetch-citations": {
"main": [
[
{
"node": "build-network",
"type": "main",
"index": 0
}
]
]
},
"pdfvector-fetch": {
"main": [
[
{
"node": "fetch-citations",
"type": "main",
"index": 0
}
]
]
}
}
}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, Multimodales KI
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.
Verwandte Workflows
PDF Vector
@pdfvectorA 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.
Diesen Workflow teilen