{
  "name": "Link Checker Bot Starter",
  "nodes": [
    {
      "id": "1",
      "name": "New Link",
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      }
    },
    {
      "id": "2",
      "name": "Run Scan",
      "type": "n8n-nodes-base.urlScanIo",
      "typeVersion": 1,
      "position": [
        300,
        0
      ],
      "parameters": {
        "resource": "scan",
        "operation": "perform",
        "url": "={{ $json.message.text }}",
        "additionalFields": {
          "visibility": "private"
        }
      }
    },
    {
      "id": "3",
      "name": "Wait Scan",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        600,
        0
      ],
      "parameters": {
        "amount": 20,
        "unit": "seconds"
      }
    },
    {
      "id": "4",
      "name": "Get Result",
      "type": "n8n-nodes-base.urlScanIo",
      "typeVersion": 1,
      "position": [
        900,
        0
      ],
      "parameters": {
        "resource": "scan",
        "operation": "get",
        "scanId": "={{ $('Run Scan').item.json.scanId }}"
      },
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 5000
    },
    {
      "id": "5",
      "name": "Flagged?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1200,
        0
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "loose",
            "version": 2
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.verdicts.overall.malicious }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "6",
      "name": "Risky Reply",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1500,
        -120
      ],
      "parameters": {
        "chatId": "={{ $('New Link').item.json.message.chat.id }}",
        "text": "=Risky lag raha hai, mat kholo. Report: {{ $('Run Scan').item.json.result }}",
        "additionalFields": {
          "appendAttribution": false
        }
      }
    },
    {
      "id": "7",
      "name": "No Flag Reply",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1500,
        140
      ],
      "parameters": {
        "chatId": "={{ $('New Link').item.json.message.chat.id }}",
        "text": "=Koi flag nahi mila, par safe ki guarantee nahi. Domain khud check karo. Report: {{ $('Run Scan').item.json.result }}",
        "additionalFields": {
          "appendAttribution": false
        }
      }
    }
  ],
  "connections": {
    "New Link": {
      "main": [
        [
          {
            "node": "Run Scan",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Scan": {
      "main": [
        [
          {
            "node": "Wait Scan",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Scan": {
      "main": [
        [
          {
            "node": "Get Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Result": {
      "main": [
        [
          {
            "node": "Flagged?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flagged?": {
      "main": [
        [
          {
            "node": "Risky Reply",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Flag Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}