
Smart pdf summarizer with audio
描述
分类
🤖 AI & Machine Learning
使用的节点
n8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.coden8n-nodes-base.coden8n-nodes-base.webhookn8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNote
价格免费
浏览量0
最后更新11/28/2025
workflow.json
{
"id": "Epn1xGw0ipAAedby",
"meta": {
"instanceId": "68ddca27a7d76186abf455a85b824d0d098822a7040451687281ac896e639893",
"templateCredsSetupCompleted": true
},
"name": "Smart pdf summarizer with audio",
"tags": [],
"nodes": [
{
"id": "f18454b2-afb3-4df6-942c-98771c21fb5a",
"name": "Extract from File",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-1632,
-896
],
"parameters": {
"options": {},
"operation": "pdf",
"binaryPropertyName": "=file"
},
"typeVersion": 1
},
{
"id": "7b982a3d-e8a9-48ab-a9a0-8746bc440984",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-1808,
-896
],
"webhookId": "95e13ed6-86f6-41fe-9b5d-66c1a40fc582",
"parameters": {
"path": "summarize-pdf",
"options": {},
"httpMethod": "POST",
"responseMode": "lastNode"
},
"typeVersion": 1
},
{
"id": "12356a91-75ed-4099-a9c6-35458b578d1f",
"name": "TTS Request",
"type": "n8n-nodes-base.httpRequest",
"position": [
-672,
-896
],
"parameters": {
"url": "https://qwen-qwen-tts-demo.hf.space/gradio_api/call/predict",
"method": "POST",
"options": {
"response": {
"response": {}
}
},
"jsonBody": "={\n \"data\": [\n \"{{ $json.summary }}\",\n \"Dylan\"\n ]\n} ",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2
},
{
"id": "dfefaa26-a0a5-4e9c-91a6-ea1af4e82541",
"name": "TTS Poll",
"type": "n8n-nodes-base.httpRequest",
"position": [
-496,
-896
],
"parameters": {
"url": "=https://qwen-qwen-tts-demo.hf.space/gradio_api/call/predict/{{ $json.event_id }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "27856995-2ada-40bd-81df-957b526f9b33",
"name": "Extract Audio URL",
"type": "n8n-nodes-base.code",
"position": [
-336,
-896
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const raw = $json.data || $json || \"\";\n\n// Case 1: If it's already parsed JSON with data[0].url\nif (Array.isArray($json.data)) {\n return {\n json: {\n audioUrl: $json.data[0]?.url || null,\n rawJson: $json.data\n }\n };\n}\n\n// Case 2: Handle raw SSE text\nconst match = typeof raw === \"string\" ? raw.match(/data:\\s*(\\[[^\\]]+\\])/s) : null;\n\nif (match) {\n try {\n const parsed = JSON.parse(match[1]);\n return {\n json: {\n audioUrl: parsed?.[0]?.url || null,\n rawJson: parsed\n }\n };\n } catch (e) {\n return {\n json: {\n error: \"Failed to parse SSE JSON\",\n raw\n }\n };\n }\n}\n\n// Case 3: If neither worked\nreturn {\n json: {\n error: \"No audio URL found\",\n raw\n }\n};\n"
},
"typeVersion": 2
},
{
"id": "9a375495-759d-44cd-a097-bf2368bb4360",
"name": "Respond with Both",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
48,
-896
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "={\n \"summary\": \"{{ $json.summary }}\",\n \"audioUrl\": \"{{ $json.audioUrl }}\"\n}"
},
"typeVersion": 1.4
},
{
"id": "80e57a89-6986-4b97-ad63-9b46f03420b7",
"name": "Code2",
"type": "n8n-nodes-base.code",
"position": [
-1424,
-896
],
"parameters": {
"language": "python",
"pythonCode": "data = _input.first().json.text\nreturn {\"data\": data}"
},
"typeVersion": 2
},
{
"id": "7751dff9-400d-4230-86ea-6f8f85ab341c",
"name": "Groq Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"position": [
-1376,
-688
],
"parameters": {
"model": "openai/gpt-oss-20b",
"options": {}
},
"credentials": {
"groqApi": {
"id": "B5I9hP4ok5scTeKB",
"name": "Groq account"
}
},
"typeVersion": 1
},
{
"id": "97f2f63e-acbb-4e42-9e0c-50f456e10c4a",
"name": "AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1248,
-896
],
"parameters": {
"text": "=Summarize the data into 4-5 lines or less : {{ $json.data }}\n",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "a0e98280-7a13-46d7-853d-5831468a2329",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
-128,
-896
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b7efed1c-af46-4f2d-8da7-08b783248f19",
"name": "audioUrl",
"type": "string",
"value": "={{ $json.audioUrl }}"
},
{
"id": "924be2a2-9c3b-4d00-9e96-65b5d86e350c",
"name": "summary",
"type": "string",
"value": "={{ $('summary').item.json.summary }}"
}
]
}
},
"executeOnce": false,
"typeVersion": 3.4,
"alwaysOutputData": false
},
{
"id": "b11bc942-ecd6-4255-9b72-66d9478f4dfc",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-1216,
-656
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "3c3304a9-578c-4355-b036-c60f47291ebc",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1120,
-1056
],
"parameters": {
"width": 640,
"height": 80,
"content": " ## SMART PDF SUMMARIZER WITH AUDIO PLAYBACK"
},
"typeVersion": 1
},
{
"id": "d571385e-5410-43cd-981f-ddd0624fcec8",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1712,
-736
],
"parameters": {
"height": 80,
"content": "- This will extract the pdf file from the frontend."
},
"typeVersion": 1
},
{
"id": "f68b392f-7586-40fa-a0c3-43b244b903d9",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1376,
-528
],
"parameters": {
"width": 256,
"height": 192,
"content": "- Use code node to get the data into the json output.\n\n- Use AI Agent with groq model (Open AI API) using free tokens and integrating simple memory to store the response (getting same results faster) "
},
"typeVersion": 1
},
{
"id": "adae39f6-540f-4cdd-99fe-d6b3cf43d47b",
"name": "summary",
"type": "n8n-nodes-base.set",
"position": [
-912,
-896
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{ '{ \"summary\": \"' + $json.output + '\" }' }}"
},
"typeVersion": 3.4
},
{
"id": "6c5e1e3b-10a7-4cc7-a6f0-99374a18601e",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-656,
-736
],
"parameters": {
"height": 112,
"content": "- Use Hugging Face Qwen TTS demo for converting text to speech by using the summary & generate the audio."
},
"typeVersion": 1
},
{
"id": "5aef29ff-3aa0-468f-8605-809fb31ecdc6",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
-752
],
"parameters": {
"height": 112,
"content": "- Use code node to extract the audio url and send both the reponse into the webhook to generate the summary and audio on the frontend."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "a6d4cacd-8d02-4e53-b70b-7e91c083f4e7",
"connections": {
"Code2": {
"main": [
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Extract from File",
"type": "main",
"index": 0
}
]
]
},
"summary": {
"main": [
[
{
"node": "TTS Request",
"type": "main",
"index": 0
}
]
]
},
"TTS Poll": {
"main": [
[
{
"node": "Extract Audio URL",
"type": "main",
"index": 0
}
]
]
},
"AI Agent1": {
"main": [
[
{
"node": "summary",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Respond with Both",
"type": "main",
"index": 0
}
]
]
},
"TTS Request": {
"main": [
[
{
"node": "TTS Poll",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent1",
"type": "ai_memory",
"index": 0
}
]
]
},
"Groq Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Extract Audio URL": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Extract from File": {
"main": [
[
{
"node": "Code2",
"type": "main",
"index": 0
}
]
]
},
"Respond with Both": {
"main": [
[]
]
}
}
}