TikTok Follower Counter 2025
N8N

TikTok Follower Counter 2025

Fixed version of the Tiktok Follower Counter originally developed by Brain Lovelace in 2023.
A flow by Deniz Mann

Download flow

Flow Details

This updated version of Brain Lovelace's workflow searches the markup changed by TikTok in 2025 and now finds the correct follower count.

Original Description from Brian Lovelace: A simple TikTok Follower Count for AWTRIX via an HTML Web Scrape

Steps to Make this Work with Your Data & Clock

Step 1

Select Hour Interval for Updating Your Follower Count. You can change how often this number updates by using the first trigger node. Select how many hours you'd like between each follower count update. Please note, this tool does NOT work via the TikTok API, but rather web scraping. Keep updating this to a minimum, as of now I have it set to every 30 Minutes.

Step 2

Changing the TikTok Username Under Fetch HTML Data, please see the URL field. You'll see "https://www.tiktok.com/@yourusernamehere" Please change yourusernamehere to your TikTok username.

Step 3

Updating your Clock IP in n8n Under the "Send to Clock" node and the "Remove App" node, please ensure that you change the IP in the URL to your clock's IP, if it differs from what is already written. Only change the IP, do not change any other syntax.

Step 4

Adding the Icon You can either add the Icon from this Flow, or you can download the icon to your pixel clock directly from it's IP. To do this go to the IP address of your clock in your browser, hit the 'Icons' tab, and paste in "35685" (without quotation marks) under Lametric Icon ID, and hit Download.

Removing the App from Your Clock Keep "Remove from Clock" disconnected from all other nodes. To use this node to remove the app from your clock, ensure that your clock's IP address is correctly set under the URL Field, then click Execute Node (or hit the play button on the Node within the Canvas). Alternatively, you can remove the app from your clock by deactivating the n8n workflow and rebooting your clock by accessing http://[Clock IP]/api/reboot from your browser.

{ "name": "TikTok Follower Count on Clock", "nodes": [ { "parameters": { "method": "POST", "url": "http://192.168.178.139/api/custom", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "name", "value": "tiktok" } ] }, "options": { "contentType": "json" }, "sendBody": true, "jsonParameters": true, "bodyParametersJson": "={\"text\": $json[\"text\"], \"icon\": 35685, \"duration\": 8}" }, "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/@yourusernamehere", "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": { "responseFormat": "string" } }, "id": "b658c902-70c6-473e-bc5f-b7dba83c9b4d", "name": "Fetch HTML Data", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.1, "position": [ 880, 460 ] }, { "parameters": { "jsCode": "// Holt das HTML aus unterschiedlichen Feldern (je nach HTTP-Node-Einstellung)\nconst html =\n (items[0]?.json?.data) ??\n (items[0]?.json?.body) ??\n (typeof items[0]?.json === 'string' ? items[0].json : '') ??\n '';\n\n// Short-Formatter für AWTRIX (12.3K / 1.2M)\nfunction short(n) {\n if (n == null || isNaN(n)) return 'N/A';\n if (n >= 1_000_000) return (Math.round(n / 100_000) / 10) + 'M';\n if (n >= 1_000) return (Math.round(n / 100) / 10) + 'K';\n return String(n);\n}\n\nlet followerCount = null;\nlet m;\n\n// 1) Bevorzugt: statsV2.followerCount (String oder Zahl)\nm = /\"statsV2\"\\s*:\\s*\\{[^}]*?\"followerCount\"\\s*:\\s*\"?(\\d+)\"?/s.exec(html);\nif (m) followerCount = Number(m[1]);\n\n// 2) Generischer JSON-Treffer: \"followerCount\": 1362 oder \"followerCount\":\"1362\"\nif (followerCount == null) {\n m = /\"followerCount\"\\s*:\\s*\"?(\\d+)\"?/.exec(html);\n if (m) followerCount = Number(m[1]);\n}\n\n// 3) HTML-Tag: <strong data-e2e=\"followers-count\">1362</strong>\nif (followerCount == null) {\n const strongRe = /<strong[^>]*data-e2e=[\"']followers-count[\"'][^>]*>([\\d\\.\\,\\s]+)<\\/strong>/i;\n const ms = strongRe.exec(html);\n if (ms) {\n const raw = ms[1].replace(/[^\\d]/g, '');\n if (raw) followerCount = Number(raw);\n }\n}\n\n// Ergebnis für AWTRIX aufbereiten\nconst out = {\n followerCount: followerCount ?? null,\n text: short(followerCount)\n};\n\n// n8n-Code-Node erwartet ein Array von Items\nreturn [{ json: out }];\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.178.139/api/custom", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "name", "value": "tiktok" } ] }, "sendBody": true, "bodyParameters": { "parameters": [ { "name": "text", "value": "={{ $json.followerCount }}" }, { "name": "icon", "value": "35685" } ] }, "options": { "contentType": "json" }, "jsonParameters": true, "bodyParametersJson": "={\"text\": $json[\"text\"], \"icon\": 35685, \"duration\": 8}" }, "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": [] }
-- Flow first published on October 9, 2025, last updated on October 11, 2025 at 00:02.