AutomationFlowsWeb Scraping › Route Planning

Route Planning

05 - Route Planning. Uses httpRequest. Webhook trigger; 6 nodes.

Webhook trigger★★★★☆ complexity6 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 6 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": "05 - Route Planning",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "plan-routes",
        "responseMode": "onReceived"
      },
      "id": "route-webhook",
      "name": "Route Planning Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{$env.APP_URL}}/api/n8n/route-planning/generate",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "=Bearer {{$env.N8N_API_KEY}}"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "targetDate",
              "value": "={{$json.targetDate || ''}}"
            }
          ]
        },
        "options": {}
      },
      "id": "generate-proposals",
      "name": "Generate Route Proposals",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$json.proposalCount}}",
              "operation": "larger",
              "value2": 0
            }
          ]
        }
      },
      "id": "check-proposals",
      "name": "Has Proposals?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "const proposals = items[0].json.proposals;\nconst results = proposals.map(p => ({\n  json: {\n    routeRunId: p.routeRunId,\n    runDate: p.runDate,\n    totalStops: p.totalJobs,\n    totalHorses: p.totalHorses,\n    score: p.optimizationScore\n  }\n}));\nreturn results;"
      },
      "id": "format-results",
      "name": "Format Results",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        850,
        200
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{$env.APP_URL}}/api/n8n/route-proposal",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "=Bearer {{$env.N8N_API_KEY}}"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "routeRunId",
              "value": "={{$json.routeRunId}}"
            },
            {
              "name": "runDate",
              "value": "={{$json.runDate}}"
            },
            {
              "name": "stops",
              "value": "={{[]}}"
            }
          ]
        },
        "options": {}
      },
      "id": "store-route",
      "name": "Store Route Run",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1050,
        200
      ]
    },
    {
      "parameters": {},
      "id": "no-routes",
      "name": "No Routes Generated",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        850,
        400
      ]
    }
  ],
  "connections": {
    "Route Planning Trigger": {
      "main": [
        [
          {
            "node": "Generate Route Proposals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Route Proposals": {
      "main": [
        [
          {
            "node": "Has Proposals?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Proposals?": {
      "main": [
        [
          {
            "node": "Format Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Routes Generated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Results": {
      "main": [
        [
          {
            "node": "Store Route Run",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "tags": [
    {
      "name": "phase5"
    }
  ]
}
Pro

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

About this workflow

05 - Route Planning. Uses httpRequest. Webhook trigger; 6 nodes.

Source: https://github.com/RJK134/EquiSmile/blob/44404319f2ef5b42511f4ed864b39a8267d08929/n8n/05-route-planning.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