Constructeur de réseau de citations académiques
Ceci est unDocument Extraction, Multimodal AIworkflow d'automatisation du domainecontenant 9 nœuds.Utilise principalement des nœuds comme Set, Code, PdfVector, WriteBinaryFile. Construire un réseau de citations académiques pour la visualisation Gephi avec l'API vectorielle PDF
- •Aucun prérequis spécial, prêt à l'emploi après importation
Nœuds utilisés (9)
{
"meta": {
"instanceId": "placeholder"
},
"nodes": [
{
"id": "config-note",
"name": "Configuration",
"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": "Définir les Paramètres",
"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": "Diviser les IDs d'Articles",
"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 - Récupérer les Articles",
"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": "Récupérer les Articles Citants",
"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": "Construire les Données du Réseau",
"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": "Combiner le Réseau",
"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": "Exporter le Réseau 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": "Générer le GEXF",
"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
}
]
]
}
}
}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, IA Multimodale
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
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.
Partager ce workflow