AutomationFlowsWeb Scraping › Golden Sample: Webhook → Http → Transform → Respond (+error Path)

Golden Sample: Webhook → Http → Transform → Respond (+error Path)

Golden Sample: webhook → http → transform → respond (+error path). Uses httpRequest, errorTrigger, emailSend. Webhook trigger; 7 nodes.

Webhook trigger★★☆☆☆ complexity7 nodesHTTP RequestError TriggerEmail Send
Web Scraping Trigger: Webhook Nodes: 7 Complexity: ★★☆☆☆ Added:

This workflow follows the Emailsend → HTTP Request recipe pattern — see all workflows that pair these two integrations.

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": "Golden Sample: webhook \u2192 http \u2192 transform \u2192 respond (+error path)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "golden/sample",
        "responseMode": "responseNode",
        "options": {
          "responseData": "OK",
          "responseCode": 200
        }
      },
      "id": "Webhook_1",
      "name": "trigger-webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpHeaderAuth",
        "requestMethod": "GET",
        "url": "https://api.example.com/resource",
        "jsonParameters": true,
        "sendQuery": true,
        "queryParametersJson": "={\"id\":\"{{$json[\"id\"] || $json[\"body\"]?.id}}\"}",
        "options": {
          "timeout": 30000,
          "retryOnFail": true,
          "maxRetries": 3,
          "ignoreResponseCode": false,
          "responseFormat": "json"
        }
      },
      "id": "HttpRequest_1",
      "name": "fetch-resource",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "position": [
        580,
        300
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "resourceId",
              "value": "={{$json[\"data\"]?.id || $json?.id}}"
            },
            {
              "name": "status",
              "value": "success"
            }
          ],
          "number": [
            {
              "name": "total",
              "value": "={{$json[\"data\"]?.total || 0}}"
            }
          ]
        },
        "options": {}
      },
      "id": "Set_1",
      "name": "transform-set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 2,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "responseBody": "={{$json}}",
        "responseCode": 200
      },
      "id": "Respond_1",
      "name": "respond-success",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1180,
        300
      ]
    },
    {
      "parameters": {},
      "id": "ErrorTrigger_1",
      "name": "on-error",
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        580,
        520
      ]
    },
    {
      "parameters": {
        "fromEmail": "alerts@example.com",
        "toEmail": "ops@example.com",
        "options": {
          "allowUnauthorizedCerts": false
        },
        "subject": "n8n workflow failed: {{$json.workflow.name}}",
        "text": "Execution ID: {{$json.execution.id}}\nError: {{$json.error.message}}\nNode: {{$json.node.name}}\nTime: {{$json.timestamp}}"
      },
      "id": "Email_1",
      "name": "notify-failure",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2,
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "position": [
        900,
        520
      ]
    },
    {
      "parameters": {
        "responseBody": "={\"status\":\"error\",\"message\":$json[\"error\"]?.message || \"Unknown error\"}",
        "responseCode": 500
      },
      "id": "Respond_2",
      "name": "respond-failure",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1180,
        520
      ]
    }
  ],
  "connections": {
    "trigger-webhook": {
      "main": [
        [
          {
            "node": "fetch-resource",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fetch-resource": {
      "main": [
        [
          {
            "node": "transform-set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "transform-set": {
      "main": [
        [
          {
            "node": "respond-success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "on-error": {
      "main": [
        [
          {
            "node": "notify-failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "notify-failure": {
      "main": [
        [
          {
            "node": "respond-failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveExecutionProgress": true
  },
  "staticData": {}
}

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

Golden Sample: webhook → http → transform → respond (+error path). Uses httpRequest, errorTrigger, emailSend. Webhook trigger; 7 nodes.

Source: https://github.com/jorgevz/n8n-workflows-maker/blob/42810c1706a44331151bff3e2a8851d0232242ab/samples/n8n-sample.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

&gt; ⚠️ Notice: &gt; Community nodes like @custom-js/n8n-nodes-pdf-toolkit-v2 can be installed on both self-hosted and Cloud instances of n8n. Just search for it via CustomJS.

HTTP Request, @Custom Js/N8N Nodes Pdf Toolkit, Email Send
Web Scraping

HireMind - Application Approval & Auto-Apply Handler. Uses httpRequest, emailSend. Webhook trigger; 10 nodes.

HTTP Request, Email Send
Web Scraping

User Onboarding Workflow. Uses httpRequest, emailSend. Webhook trigger; 7 nodes.

HTTP Request, Email Send
Web Scraping

Basic HTTP to Email. Uses httpRequest, emailSend. Webhook trigger; 3 nodes.

HTTP Request, Email Send
Web Scraping

PRIMA - Automatisation Prospection Sophie (nettoyé). Uses httpRequest, errorTrigger, emailSend. Scheduled trigger; 20 nodes.

HTTP Request, Error Trigger, Email Send