AutomationFlowsWeb Scraping › S2: Provider→internal Status Mapping

S2: Provider→internal Status Mapping

S2: Provider→Internal Status Mapping. Uses httpRequest. Webhook trigger; 9 nodes.

Webhook trigger★★★★☆ complexity9 nodesHTTP Request
Web Scraping Trigger: Webhook 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": "S2: Provider\u2192Internal Status Mapping",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "shipping/status-mapping",
        "authentication": "headerAuth",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook: New Shipment Event",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Verify HMAC signature\nconst crypto = require('crypto');\n\nconst signature = $input.item.json.headers['x-deepsolution-signature'];\nconst timestamp = $input.item.json.headers['x-deepsolution-timestamp'];\nconst body = JSON.stringify($input.item.json.body);\n\nconst secret = $env.N8N_WEBHOOK_SECRET;\nconst expectedSignature = 'sha256=' + crypto\n  .createHmac('sha256', secret)\n  .update(timestamp + '.' + body)\n  .digest('hex');\n\nif (signature !== expectedSignature) {\n  throw new Error('Invalid signature');\n}\n\n// Check timestamp (within 5 minutes)\nconst now = Date.now();\nconst requestTime = parseInt(timestamp);\nif (Math.abs(now - requestTime) > 300000) {\n  throw new Error('Request timestamp too old');\n}\n\nreturn [{ json: $input.item.json.body }];"
      },
      "id": "verify-signature",
      "name": "Verify Signature",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.CORE_API_URL }}/api/trpc/shippingAutomation.mapStatus",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"shipment_event_id\": \"{{ $json.shipment_event_id }}\"\n}",
        "options": {}
      },
      "id": "map-status",
      "name": "Map Status",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        650,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "order-updated",
              "leftValue": "={{ $json.result.data.orderUpdated }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "check-order-updated",
      "name": "Order Updated?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        850,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "has-station",
              "leftValue": "={{ $json.result.data.stationRouted }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "isNotEmpty"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "check-station",
      "name": "Has Station?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1050,
        200
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.CORE_API_URL }}/api/trpc/n8nWorkflows.createAuditLog",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"workflow_id\": \"S2\",\n  \"tenant_id\": \"{{ $('Verify Signature').item.json.tenant_id }}\",\n  \"event_type\": \"STATUS_MAPPED\",\n  \"entity_type\": \"order\",\n  \"entity_id\": \"{{ $json.result.data.orderId }}\",\n  \"payload\": {\n    \"station_routed\": \"{{ $json.result.data.stationRouted }}\"\n  }\n}",
        "options": {}
      },
      "id": "audit-log",
      "name": "Create Audit Log",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1250,
        100
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "id": "no-update",
      "name": "No Update Needed",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1050,
        400
      ]
    },
    {
      "parameters": {},
      "id": "no-station",
      "name": "No Station Routing",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1250,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { success: true, orderUpdated: $json.result.data.orderUpdated, stationRouted: $json.result.data.stationRouted } }}",
        "options": {}
      },
      "id": "respond-success",
      "name": "Respond Success",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1450,
        200
      ]
    }
  ],
  "connections": {
    "Webhook: New Shipment Event": {
      "main": [
        [
          {
            "node": "Verify Signature",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify Signature": {
      "main": [
        [
          {
            "node": "Map Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Status": {
      "main": [
        [
          {
            "node": "Order Updated?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Order Updated?": {
      "main": [
        [
          {
            "node": "Has Station?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Update Needed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Station?": {
      "main": [
        [
          {
            "node": "Create Audit Log",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Station Routing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Audit Log": {
      "main": [
        [
          {
            "node": "Respond Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Station Routing": {
      "main": [
        [
          {
            "node": "Respond Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Update Needed": {
      "main": [
        [
          {
            "node": "Respond Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "error-handler"
  },
  "staticData": null,
  "tags": [
    {
      "name": "shipping",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-01T00:00:00.000Z"
    }
  ],
  "triggerCount": 1,
  "updatedAt": "2024-01-01T00:00:00.000Z",
  "versionId": "1"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

S2: Provider→Internal Status Mapping. Uses httpRequest. Webhook trigger; 9 nodes.

Source: https://github.com/bassemroshdey4-afk/DeepSolution/blob/382df7800e29f9959374b170387bc28194f6642a/n8n-workflows/S2-status-mapping.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

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
Web Scraping

Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.

Execute Command, HTTP Request, Read Write File +1
Web Scraping

📡 This workflow serves as the central Alpha Vantage API fetcher for Tesla trading indicators, delivering cleaned 20-point JSON outputs for three timeframes: , , and . It is required by the following a

HTTP Request