{
  "name": "TikTok Follower Count on Clock",
  "nodes": [
    {
      "parameters": {
        "method": "POST",
        "url": "http://192.168.1.14/api/custom",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "tiktok"
            }
          ]
        },
        "options": {}
      },
      "id": "1f69869a-7873-493e-a7e0-a9394476cd5c",
      "name": "Remove App",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        1080,
        280
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 12
            }
          ]
        }
      },
      "id": "5edff45f-0d97-4b2e-91ef-256e2714f4cd",
      "name": "Every 12 Hours",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        680,
        460
      ]
    },
    {
      "parameters": {
        "url": "https://www.tiktok.com/@wasuthep191?is_copy_url=1&is_from_webapp=v1",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
            }
          ]
        },
        "options": {}
      },
      "id": "b658c902-70c6-473e-bc5f-b7dba83c9b4d",
      "name": "Fetch HTML Data",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        880,
        460
      ]
    },
    {
      "parameters": {
        "jsCode": "const regex = /<strong title=\"Followers\" data-e2e=\"followers-count\">(\\d+\\.?\\d*[MK]?)<\\/strong>/;\nconst match = regex.exec(items[0].json.data);\nif (match) {\n    const followerCount = parseInt(match[1]);\n    return { followerCount };\n} else {\n    return { followerCount: \"N/A\" };\n}"
      },
      "id": "77e52f14-4f12-494a-a6ef-b8099cdbaef5",
      "name": "Extract Follower Count",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        1080,
        460
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://192.168.1.14/api/custom",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "tiktok"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "={{ $json.followerCount }}"
            },
            {
              "name": "icon",
              "value": "35685"
            }
          ]
        },
        "options": {}
      },
      "id": "2ac10d71-31a8-414c-887a-9dba5e163915",
      "name": "Send to Clock",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        1280,
        460
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "Every 12 Hours": {
      "main": [
        [
          {
            "node": "Fetch HTML Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch HTML Data": {
      "main": [
        [
          {
            "node": "Extract Follower Count",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Follower Count": {
      "main": [
        [
          {
            "node": "Send to Clock",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {},
  "versionId": "16b1e879-3e36-490c-954d-f93cce32c815",
  "id": "6",
  "meta": {
    "instanceId": "fad48ee50ab295e27486d400f427ed5b50baff0c1dc235dc9413ccebae5358c7"
  },
  "tags": []
}