{
  "name": "Summarize PDFs with Groq AI and convert to audio using Qwen TTS",
  "nodes": [
    {
      "id": "f18454b2-afb3-4df6-942c-98771c21fb5a",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -1632,
        -896
      ]
    },
    {
      "id": "7b982a3d-e8a9-48ab-a9a0-8746bc440984",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1808,
        -896
      ]
    },
    {
      "id": "12356a91-75ed-4099-a9c6-35458b578d1f",
      "name": "TTS Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -672,
        -896
      ]
    },
    {
      "id": "dfefaa26-a0a5-4e9c-91a6-ea1af4e82541",
      "name": "TTS Poll",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -496,
        -896
      ]
    },
    {
      "id": "27856995-2ada-40bd-81df-957b526f9b33",
      "name": "Extract Audio URL",
      "type": "n8n-nodes-base.code",
      "position": [
        -336,
        -896
      ]
    },
    {
      "id": "9a375495-759d-44cd-a097-bf2368bb4360",
      "name": "Respond with Both",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        48,
        -896
      ]
    },
    {
      "id": "80e57a89-6986-4b97-ad63-9b46f03420b7",
      "name": "Code2",
      "type": "n8n-nodes-base.code",
      "position": [
        -1424,
        -896
      ]
    },
    {
      "id": "7751dff9-400d-4230-86ea-6f8f85ab341c",
      "name": "Groq Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        -1376,
        -688
      ]
    },
    {
      "id": "97f2f63e-acbb-4e42-9e0c-50f456e10c4a",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1248,
        -896
      ]
    },
    {
      "id": "a0e98280-7a13-46d7-853d-5831468a2329",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -128,
        -896
      ]
    },
    {
      "id": "b11bc942-ecd6-4255-9b72-66d9478f4dfc",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -1216,
        -656
      ]
    },
    {
      "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"
      }
    },
    {
      "id": "d571385e-5410-43cd-981f-ddd0624fcec8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1712,
        -736
      ],
      "parameters": {
        "width": null,
        "height": 80,
        "content": "- This will extract the pdf file from the frontend."
      }
    },
    {
      "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) "
      }
    },
    {
      "id": "adae39f6-540f-4cdd-99fe-d6b3cf43d47b",
      "name": "summary",
      "type": "n8n-nodes-base.set",
      "position": [
        -912,
        -896
      ]
    },
    {
      "id": "6c5e1e3b-10a7-4cc7-a6f0-99374a18601e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -736
      ],
      "parameters": {
        "width": null,
        "height": 112,
        "content": "- Use Hugging Face Qwen TTS demo for converting text to speech by using the summary & generate the audio."
      }
    },
    {
      "id": "5aef29ff-3aa0-468f-8605-809fb31ecdc6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -752
      ],
      "parameters": {
        "width": null,
        "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."
      }
    }
  ],
  "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": [
        []
      ]
    }
  }
}