{
  "name": "Convert websites to audio summaries via WhatsApp using GPT and TTS",
  "nodes": [
    {
      "id": "3ac9465d-b69c-422e-a538-dbf9abbc7642",
      "name": "Extract URL from Message",
      "type": "n8n-nodes-base.code",
      "position": [
        -576,
        240
      ]
    },
    {
      "id": "2da6a2a7-6bd3-4681-909a-d39fb1244d4b",
      "name": "Check if Valid URL",
      "type": "n8n-nodes-base.if",
      "position": [
        -432,
        240
      ]
    },
    {
      "id": "660545af-20f0-467b-851b-d210c82ac48f",
      "name": "Send Error Message",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        -208,
        416
      ]
    },
    {
      "id": "a5a5d844-ff22-48df-8c3d-11e897aa1408",
      "name": "Send Processing Message",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        -208,
        224
      ]
    },
    {
      "id": "68da6673-0e21-4a6f-b631-167748249777",
      "name": "Get Webpage Summary",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        112,
        224
      ]
    },
    {
      "id": "b505c2b7-368b-4577-b7c8-7d1bdfba73a2",
      "name": "Convert Summary to Audio",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        288,
        224
      ]
    },
    {
      "id": "8c75eb4b-c9b2-48a4-9e49-d71195110915",
      "name": "Send Audio Summary",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        448,
        224
      ]
    },
    {
      "id": "d82c4465-e3d2-43ea-b61a-f93c39b2e5b1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        0
      ],
      "parameters": {
        "width": 380,
        "height": 1132,
        "content": "## 🎤 WhatsApp Voice Research Assistant\n\n**How it works:**\n1. User sends URL via WhatsApp\n2. Workflow fetches webpage\n3. AI summarizes content\n4. Text-to-speech conversion\n5. Audio summary sent back\n\n*"
      }
    },
    {
      "id": "35194f26-35c9-401e-88c4-b09102c0fafd",
      "name": "WhatsApp Trigger",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        -720,
        240
      ]
    },
    {
      "id": "3eef648b-506d-4a1e-8494-2892fab999b6",
      "name": "Get URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -48,
        224
      ]
    },
    {
      "id": "1e575c6d-c3a0-4426-a044-4d3b11711c5a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        608
      ],
      "parameters": {
        "width": 1265,
        "height": 495,
        "content": "## [SUB] Get Webpage Summary\n# Summarize website text with GPT"
      }
    },
    {
      "id": "ef8b7ac7-09aa-49d2-98f0-491762d52370",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        96,
        992
      ]
    },
    {
      "id": "f8637017-8352-4034-bebc-a306bf90bab2",
      "name": "Extract title",
      "type": "n8n-nodes-base.html",
      "position": [
        -80,
        624
      ]
    },
    {
      "id": "d2bc9ef2-fdde-4549-b8e6-1f7611376d3c",
      "name": "Summarization Chain",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        -160,
        784
      ]
    },
    {
      "id": "75a23c01-9746-48d8-b63f-17f5029e6841",
      "name": "Clean up",
      "type": "n8n-nodes-base.set",
      "position": [
        352,
        768
      ]
    },
    {
      "id": "dc6be66b-f9a5-422a-9158-f3183d7c5f1b",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        224,
        768
      ]
    },
    {
      "id": "bc556f6b-1f69-46dc-bfee-0c3dc32e8644",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        -160,
        896
      ]
    },
    {
      "id": "17be0ba5-0e78-4a59-8dfc-745ba92e8037",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        96,
        864
      ]
    },
    {
      "id": "e2efdfe7-203c-4eb6-a2e5-9027a3886173",
      "name": "Extract Text Only",
      "type": "n8n-nodes-base.html",
      "position": [
        -336,
        784
      ]
    },
    {
      "id": "3f6398b1-c16c-4f3e-b601-dd65efe98771",
      "name": "Sub Execute",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -672,
        784
      ]
    },
    {
      "id": "32e45648-f0c0-4d1b-8dae-1a090fc468e3",
      "name": "Fetch site texts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -544,
        784
      ]
    },
    {
      "id": "0e76e32f-270e-4714-839b-b490d0bbdaf7",
      "name": "Upload & Path Processing1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -16
      ],
      "parameters": {
        "width": 448,
        "height": 224,
        "content": "## WhatsApp Trigger -> Extract URL -> Check if Valid\n\n1. **WhatsApp Trigger**: Reads URl\n2. **Extract URL node**: Gets URL from WhatsApp\n3. **Check if Valid**: Checks to see if we have valid URL"
      }
    },
    {
      "id": "18c324d6-0a56-4903-a0ab-8641eec897eb",
      "name": "Sharing Link Management1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -16
      ],
      "parameters": {
        "width": 768,
        "height": 224,
        "content": "## Summarize webpage and answer in audio message back to WhatsApp\n\n1. **WhatsApp Notification**: Notifies user of pending summery \n2. **Sets URL for wub workflow**\n3. **Sub Workflow - Gets Webpage Sum"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Clean up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get URL": {
      "main": [
        [
          {
            "node": "Get Webpage Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sub Execute": {
      "main": [
        [
          {
            "node": "Fetch site texts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract title": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch site texts": {
      "main": [
        [
          {
            "node": "Extract title",
            "type": "main",
            "index": 0
          },
          {
            "node": "Extract Text Only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Trigger": {
      "main": [
        [
          {
            "node": "Extract URL from Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text Only": {
      "main": [
        [
          {
            "node": "Summarization Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarization Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check if Valid URL": {
      "main": [
        [
          {
            "node": "Send Processing Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Summarization Chain",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Get Webpage Summary": {
      "main": [
        [
          {
            "node": "Convert Summary to Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarization Chain": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Send Processing Message": {
      "main": [
        [
          {
            "node": "Get URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Summary to Audio": {
      "main": [
        [
          {
            "node": "Send Audio Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract URL from Message": {
      "main": [
        [
          {
            "node": "Check if Valid URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}