{
  "name": "Extract & process Q&A from URLs with Airtop, OpenRouter AI & Safety Guardrails",
  "nodes": [
    {
      "id": "997553c3-7adc-4f4b-8f50-2ff2cf3611de",
      "name": "Filter Only URLs",
      "type": "n8n-nodes-base.filter",
      "position": [
        -2016,
        5200
      ]
    },
    {
      "id": "58895e06-a286-463b-86b1-62dfedcba85e",
      "name": "Extract Q&A from URL",
      "type": "n8n-nodes-base.airtop",
      "position": [
        -1824,
        5200
      ]
    },
    {
      "id": "d9f72563-fa75-400e-93aa-8269554ea629",
      "name": "Apply Safety Guardrails",
      "type": "@n8n/n8n-nodes-langchain.guardrails",
      "position": [
        -1632,
        5200
      ]
    },
    {
      "id": "415afa93-eead-45a7-8ee0-e189dd605190",
      "name": "OpenRouter Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -1632,
        5408
      ]
    },
    {
      "id": "7b1887a7-1fde-47fa-b1ff-ff3836cd2545",
      "name": "Send Safe Response",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -960,
        5072
      ]
    },
    {
      "id": "8c1a7d76-d9f0-4993-b36c-a02b588c00c5",
      "name": "Send Violation Alert",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1312,
        5392
      ]
    },
    {
      "id": "fcd9f95d-a2b7-41cf-9690-eb77d1247867",
      "name": "Tavily Web Search",
      "type": "@tavily/n8n-nodes-tavily.tavilyTool",
      "position": [
        -1152,
        5280
      ]
    },
    {
      "id": "dc966130-f93c-45e1-accc-1df981b29a94",
      "name": "Note: URL Filter",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2144,
        5376
      ],
      "parameters": {
        "width": 320,
        "height": 192,
        "content": "## 🔍 Filter Only URLs\n\n**Purpose:** Validates incoming messages as pure URLs using regex.\n\n**Note:** Ignores messages with extra text; adjust regex for flexibility."
      }
    },
    {
      "id": "ad9a45c2-63ab-427e-9d8d-68ac5b0ce541",
      "name": "Note: Extraction",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1968,
        4976
      ],
      "parameters": {
        "width": 288,
        "height": 208,
        "content": "## 📝 Extract Q&A from URL\n\n**Purpose:** Uses Airtop to pull structured questions/answers from webpages.\n\n**Note:** Best for text-based docs; prompt can be customized."
      }
    },
    {
      "id": "408a51f1-1748-434a-b932-5f2310a251fb",
      "name": "Note: Guardrails",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1648,
        4976
      ],
      "parameters": {
        "width": 320,
        "height": 208,
        "content": "## 🛡️ Apply Safety Guardrails\n\n**Purpose:** Checks extracted content for NSFW/PII violations.\n\n**Note:** Thresholds configurable; fails send alert instead."
      }
    },
    {
      "id": "d34d9ee3-b6dd-4687-9fc2-6f489d6229b9",
      "name": "Note: Language Model",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        5584
      ],
      "parameters": {
        "width": 320,
        "height": 192,
        "content": "## 🔤 OpenRouter Model\n\n**Purpose:** Supplies language model for guardrails and agent processing.\n\n**Note:** Uses sherlock-dash-alpha; connect to multiple nodes as needed."
      }
    },
    {
      "id": "dcd19034-e606-4522-a5c2-2dfc18246656",
      "name": "Note: Web Search",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        5280
      ],
      "parameters": {
        "width": 320,
        "height": 192,
        "content": "## 🌐 Tavily Web Search\n\n**Purpose:** Provides web search capability to the main agent.\n\n**Note:** Uses AI to determine query depth and results; general topic by default."
      }
    },
    {
      "id": "b112efd1-2f33-4357-857c-9b5e56542a66",
      "name": "Overview Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        4608
      ],
      "parameters": {
        "width": 728,
        "height": 1312,
        "content": "# 🤖 Secure URL Q&A Extractor for Telegram with AI Safety\n\n## 📋 What This Template Does\nTriggers on Telegram URLs → extracts Q&A via Airtop → applies NSFW/PII guardrails → responds safely with OpenRout"
      }
    },
    {
      "id": "81a37776-5520-40f4-a8e4-dc474f329218",
      "name": "Telegram Trigger1",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -2224,
        5200
      ]
    },
    {
      "id": "3e7eda0e-9065-4872-a435-f8015c89d471",
      "name": "Note: Trigger2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        4976
      ],
      "parameters": {
        "width": 320,
        "height": 192,
        "content": "## 📥 Telegram Trigger\n\n**Purpose:** Listens for incoming messages in Telegram chat.\n\n**Note:** Configured for message updates; activate workflow to enable."
      }
    },
    {
      "id": "526608dd-27d7-4794-bfb1-57d3c854029f",
      "name": "Note: Agent1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        4848
      ],
      "parameters": {
        "width": 320,
        "height": 192,
        "content": "## 🧠 Main Agent\n\n**Purpose:** Processes safe content with OpenRouter model to generate response.\n\n**Note:** Includes Tavily tool for web searches if needed."
      }
    },
    {
      "id": "14fe6c3a-f1f4-4921-9be6-9b6346831da4",
      "name": "Main agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1296,
        5072
      ]
    }
  ],
  "connections": {
    "Main agent": {
      "main": [
        [
          {
            "node": "Send Safe Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Only URLs": {
      "main": [
        [
          {
            "node": "Extract Q&A from URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Model": {
      "ai_languageModel": [
        [
          {
            "node": "Apply Safety Guardrails",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Main agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Tavily Web Search": {
      "ai_tool": [
        [
          {
            "node": "Main agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger1": {
      "main": [
        [
          {
            "node": "Filter Only URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Q&A from URL": {
      "main": [
        [
          {
            "node": "Apply Safety Guardrails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply Safety Guardrails": {
      "main": [
        [
          {
            "node": "Main agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Violation Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}