AutomationFlowsWeb Scraping › Iptv Insert Db

Iptv Insert Db

IPTV_insert_DB. Uses httpRequest. Scheduled trigger; 9 nodes.

Cron / scheduled trigger★★★★☆ complexity9 nodesHTTP Request
Web Scraping Trigger: Cron / scheduled Nodes: 9 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "IPTV_insert_DB",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -256,
        96
      ],
      "id": "7276a376-9455-4f44-bb03-91c94645a91c",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "jsCode": "const today = new Date();\n\n// \u2795 8 \u5c0f\u6642\nconst todayPlus8 = new Date(today.getTime() + 8 * 60 * 60 * 1000);\n\n// \u660e\u5929\nconst tomorrow = new Date();\ntomorrow.setDate(todayPlus8.getDate() + 4);\n\n// \u683c\u5f0f\u5316 yyyy-mm-dd\nfunction formatYYYYMMDD(date) {\n  return date.toISOString().split(\"T\")[0];\n}\n\n// \u683c\u5f0f\u5316 dd/mm/yyyy\n\n// \u56db\u500b\u7d50\u679c\nconst result = {\n  today_ymd: formatYYYYMMDD(todayPlus8),       // 2025-09-17 (UTC+8 \u5f8c\u7684\u65e5\u671f)\n  tomorrow_ymd: formatYYYYMMDD(tomorrow),      // 2025-09-18\n};\n\n// \u56de\u50b3\u7d66 n8n\nreturn [{ json: result }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -1040,
        112
      ],
      "id": "223a23ef-07af-4c38-b77c-ac1c7d4e0ec2",
      "name": "Extract time"
    },
    {
      "parameters": {
        "jsCode": "// \u6bcf\u7d44 20 \u7b46\nconst batchSize = 20;\n\n// \u5047\u8a2d\u4e0a\u6e38\u8f38\u51fa\u5728 $json.output \u6216 $json.events\nconst events = $input.first().json.data;\n\nconst batches = [];\nfor (let i = 0; i < events.length; i += batchSize) {\n  batches.push({\n    json: {\n      events: events.slice(i, i + batchSize)\n    }\n  });\n}\n\nreturn batches;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -448,
        96
      ],
      "id": "7c63f2d5-1c25-4920-872f-a4c190f0a04a",
      "name": "Split match"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://eventcollectingservice.kl.starixuat.com/IPTV/events",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "events",
              "value": "={{ $json.events }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        176,
        176
      ],
      "id": "889069d4-8180-4cf6-9a6b-c8628646bd35",
      "name": "Update into DB",
      "retryOnFail": true,
      "maxTries": 2,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://10.18.200.198:8000/download-iptv",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "start_date",
              "value": "={{ $json.today_ymd }}"
            },
            {
              "name": "end_date",
              "value": "={{ $json.tomorrow_ymd }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -864,
        112
      ],
      "id": "992fed86-a9ea-4728-bd21-3aa86c4645f4",
      "name": "Crawling",
      "retryOnFail": false,
      "executeOnce": false,
      "alwaysOutputData": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n  item.json.myNewField = 1;\n}\n\nreturn $input.all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        0,
        -16
      ],
      "id": "393edf08-1f37-494a-a5c6-8c823b867944",
      "name": "End"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -1264,
        112
      ],
      "id": "9baff658-9da8-4671-b458-843af856835d",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "9b88a3de-2373-478f-a0b0-2f7691c55635",
              "leftValue": "={{ $json.success }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -688,
        112
      ],
      "id": "6e3de625-fa71-4cc7-aff6-d5f8dedd5041",
      "name": "If"
    },
    {
      "parameters": {
        "url": "http://10.18.200.198:8000/login",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -672,
        352
      ],
      "id": "7d91e74d-9d36-4c1b-8593-e1658b1b1780",
      "name": "login",
      "retryOnFail": true,
      "maxTries": 5,
      "waitBetweenTries": 5000
    }
  ],
  "connections": {
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "End",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update into DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract time": {
      "main": [
        [
          {
            "node": "Crawling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split match": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update into DB": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crawling": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Extract time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Split match",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "login",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "login": {
      "main": [
        [
          {
            "node": "Crawling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1de66743-b7c6-44e6-935f-95e46b49e55e",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "E1ib9Y7V7XyK6BXa",
  "tags": []
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

IPTV_insert_DB. Uses httpRequest. Scheduled trigger; 9 nodes.

Source: https://gitlab.com/starixvn/operation-automation_n8n-workflow/-/blob/feature/BWF_new_method/IPTV/IPTV_insert_DB.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

Birthday Automation - Production (Fixed). Uses stopAndError, httpRequest, emailSend, bannerbear. Scheduled trigger; 86 nodes.

Stop And Error, HTTP Request, Email Send +1
Web Scraping

This template runs two scheduled workflows to govern Microsoft Entra ID (Azure AD) guest accounts by detecting stale users via Microsoft Graph, staging deletions in SharePoint with a 72-hour window, n

Microsoft SharePoint, Microsoft Teams, Microsoft Entra +1
Web Scraping

Jira-Allure-Auto-Qa. Uses httpRequest, jira. Scheduled trigger; 68 nodes.

HTTP Request, Jira
Web Scraping

Spotify-Sync-Surrealdb-V1. Uses httpRequest, n8n-nodes-surrealdb, spotify. Scheduled trigger; 62 nodes.

HTTP Request, N8N Nodes Surrealdb, Spotify
Web Scraping

As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o

HTTP Request, n8n, N8N Trigger +1