AutomationFlowsWeb Scraping › Batch Trigger

Batch Trigger

40_480_BATCH_TRIGGER. Uses httpRequest. Webhook trigger; 11 nodes.

Webhook trigger★★★★☆ complexity11 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 11 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": "40_480_BATCH_TRIGGER",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "batch-trigger",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Input: { batch_id }\nconst body = $input.first().json.body ?? $input.first().json;\nif (!body.batch_id) throw new Error('batch_id fehlt im Request');\nreturn [{ json: { batch_id: body.batch_id } }];"
      },
      "id": "validate-input",
      "name": "Input validieren",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "https://directus.automation-plus-ki.de/items/400_content_pipeline?filter[batch_id][_eq]={{ $json.batch_id }}&limit=1",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer ={{ $env.DIRECTUS_TOKEN }}"
            }
          ]
        }
      },
      "id": "fetch-batch",
      "name": "Batch Job laden",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Batch Job aus Response extrahieren + Topics parsen\nconst res   = $input.first().json;\nconst batch = res.data?.[0];\nif (!batch) throw new Error(`Batch Job nicht gefunden: ${$('Input validieren').item.json.batch_id}`);\n\nconst topics = JSON.parse(batch.topics_json ?? '[]');\nconst steps  = JSON.parse(batch.steps_json  ?? '[\"blog\",\"image\",\"voice\"]');\n\nreturn topics.map((topic, idx) => ({ json: {\n  batch_id:   batch.batch_id,\n  batch_db_id: batch.Id,\n  topic,\n  category: batch.category,\n  steps,\n  topic_index: idx,\n  total_count: topics.length\n} }));"
      },
      "id": "parse-topics",
      "name": "Topics aufteilen",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "method": "PATCH",
        "url": "https://directus.automation-plus-ki.de/items/400_content_pipeline",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer ={{ $env.DIRECTUS_TOKEN }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "json",
        "bodyParameters": {
          "parameters": [
            {
              "name": "Id",
              "value": "={{ $json.batch_db_id }}"
            },
            {
              "name": "status",
              "value": "running"
            },
            {
              "name": "started_at",
              "value": "={{ $now.toISO() }}"
            }
          ]
        }
      },
      "id": "mark-running",
      "name": "Batch: running markieren",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1120,
        300
      ]
    },
    {
      "parameters": {
        "batchSize": 2,
        "options": {}
      },
      "id": "split-batches",
      "name": "2er-Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1340,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://directus.automation-plus-ki.de/items/400_content_pipeline",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer ={{ $env.DIRECTUS_TOKEN }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "json",
        "bodyParameters": {
          "parameters": [
            {
              "name": "job_id",
              "value": "={{ $now.toMillis() }}-{{ $json.topic_index }}"
            },
            {
              "name": "topic",
              "value": "={{ $json.topic }}"
            },
            {
              "name": "category",
              "value": "={{ $json.category }}"
            },
            {
              "name": "stage",
              "value": "text"
            },
            {
              "name": "status",
              "value": "idle"
            },
            {
              "name": "target_platforms",
              "value": "blog,instagram,linkedin"
            },
            {
              "name": "created_at",
              "value": "={{ $now.toISO() }}"
            }
          ]
        }
      },
      "id": "create-pipeline-job",
      "name": "Pipeline Job anlegen",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1560,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://n8n.automation-plus-ki.de/webhook/content-master",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "json",
        "bodyParameters": {
          "parameters": [
            {
              "name": "pipeline_job_id",
              "value": "={{ $('Pipeline Job anlegen').item.json.job_id }}"
            },
            {
              "name": "topic",
              "value": "={{ $('2er-Batches').item.json.topic }}"
            },
            {
              "name": "category",
              "value": "={{ $('2er-Batches').item.json.category }}"
            }
          ]
        },
        "options": {
          "timeout": 10000,
          "redirect": {
            "redirect": {
              "followRedirects": true
            }
          }
        }
      },
      "id": "trigger-master-flow",
      "name": "Master Flow triggern",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1780,
        300
      ]
    },
    {
      "parameters": {
        "method": "PATCH",
        "url": "https://directus.automation-plus-ki.de/items/400_content_pipeline",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer ={{ $env.DIRECTUS_TOKEN }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "json",
        "bodyParameters": {
          "parameters": [
            {
              "name": "Id",
              "value": "={{ $('Topics aufteilen').item.json.batch_db_id }}"
            },
            {
              "name": "done_count",
              "value": "={{ $('Topics aufteilen').item.json.topic_index + 1 }}"
            }
          ]
        }
      },
      "id": "update-progress",
      "name": "Fortschritt aktualisieren",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2000,
        300
      ]
    },
    {
      "parameters": {
        "amount": 30,
        "unit": "seconds"
      },
      "id": "rate-limit-pause",
      "name": "30s Pause (Rate Limit)",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        2220,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={ \"ok\": true, \"batch_id\": \"{{ $('Input validieren').item.json.batch_id }}\", \"message\": \"Batch gestartet\" }"
      },
      "id": "respond-ok",
      "name": "Response OK",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        2440,
        300
      ]
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Input validieren",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Input validieren": {
      "main": [
        [
          {
            "node": "Batch Job laden",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Batch Job laden": {
      "main": [
        [
          {
            "node": "Topics aufteilen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Topics aufteilen": {
      "main": [
        [
          {
            "node": "Batch: running markieren",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Batch: running markieren": {
      "main": [
        [
          {
            "node": "2er-Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2er-Batches": {
      "main": [
        [
          {
            "node": "Pipeline Job anlegen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pipeline Job anlegen": {
      "main": [
        [
          {
            "node": "Master Flow triggern",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Master Flow triggern": {
      "main": [
        [
          {
            "node": "Fortschritt aktualisieren",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fortschritt aktualisieren": {
      "main": [
        [
          {
            "node": "30s Pause (Rate Limit)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "30s Pause (Rate Limit)": {
      "main": [
        [
          {
            "node": "Response OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": ""
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "versionId": "40_480_BATCH_TRIGGER_v1",
  "tags": [
    {
      "name": "content-pipeline"
    },
    {
      "name": "batch"
    }
  ]
}
Pro

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

About this workflow

40_480_BATCH_TRIGGER. Uses httpRequest. Webhook trigger; 11 nodes.

Source: https://github.com/timo-goetz-ai/apki-core-platform/blob/main/automations/n8n-workflows/content-pipeline/40_480_BATCH_TRIGGER.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

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.

HTTP Request
Web Scraping

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia

HTTP Request
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request