{
  "name": "Safe Web Search",
  "nodes": [
    {
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "query"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "ca1c2a7a-f815-4574-b263-341c0c2ec9a7",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://sentinel.ircnet.us/v1/scrub",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Sentinel-Key",
              "value": "ev_live_xxxxxxxxxxxxxxxxxxxxxxxxxxx"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json) }}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        608,
        0
      ],
      "id": "26ae3e57-72e1-4c7d-817f-c483555c1f37",
      "name": "Sentinel Filter"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.tavily.com/search",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={ \"api_key\": \"tvly-dev-xxx\", \"query\": \"{{ $json.query }}\", \"max_results\": 5 }",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        208,
        0
      ],
      "id": "b26ee23f-573d-464c-8e15-40ae71ab65eb",
      "name": "Tavily Web Search"
    },
    {
      "parameters": {
        "jsCode": "const results = $input.item.json.results;\nconst formattedContent = results.map((r, i) => \n  `[${i+1}] ${r.title}\\n${r.content}`\n).join('\\n---\\n');\n\nreturn {\n  json: {\n    content: formattedContent,\n    tier: \"standard\"\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        416,
        0
      ],
      "id": "7e4c8a55-5691-43e2-b780-63d1ed08ee91",
      "name": "Preprocessor"
    }
  ],
  "pinData": {},
  "connections": {
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Tavily Web Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tavily Web Search": {
      "main": [
        [
          {
            "node": "Preprocessor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Preprocessor": {
      "main": [
        [
          {
            "node": "Sentinel Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "3508112a-3f95-48de-bc79-fbfc4d137dae",
  "meta": {
    "instanceId": "17223a0b00ae6ae64c3904edd04f536e94a634f6f7132e652bd6dff3904c380e"
  },
  "id": "77RU51b33qLI4akzWXir8",
  "tags": []
}