AutomationFlowsWeb Scraping › Tutorial Practice Transformation

Tutorial Practice Transformation

Tutorial-Practice-Transformation. Uses httpRequest. Event-driven trigger; 23 nodes.

Event trigger★★★★☆ complexity23 nodesHTTP Request
Web Scraping Trigger: Event Nodes: 23 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
{
  "nodes": [
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "023851a2-287b-42d9-a72f-5a5bb83cbb56",
              "name": "name",
              "value": "Rabbit",
              "type": "string"
            },
            {
              "id": "62e4b794-6c1c-47df-be93-863bd0095317",
              "name": "age",
              "value": 11,
              "type": "string"
            },
            {
              "id": "feaf18f3-228f-4110-9596-416baf91216a",
              "name": "height",
              "value": "174",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1472,
        368
      ],
      "id": "322e4c8a-b35d-46c8-b501-bde24d17aa8e",
      "name": "Edit Fields"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        1120,
        576
      ],
      "id": "dd275e5e-844e-4ae7-afce-dc57e5665508",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "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 {\n  'name': $input.first().json.name ,\n  'age': Number($input.first().json.age),\n  'height': Number($input.first().json.height),\n}"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1872,
        368
      ],
      "id": "e8ddfd31-e2f6-4fa1-8862-b8d3a1d50655",
      "name": "To Number"
    },
    {
      "parameters": {
        "url": "https://api.dictionaryapi.dev/api/v2/entries/en/rabbit",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        1472,
        576
      ],
      "id": "7e201f87-604c-4d2a-b5c8-f01645dc838c",
      "name": "Get Definitions of Rabbit"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        2128,
        464
      ],
      "id": "03e4da8f-0429-4d1f-b092-22a99cea430d",
      "name": "Merge"
    },
    {
      "parameters": {
        "maxItems": 2
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        1664,
        576
      ],
      "id": "8a853720-422b-4c6a-8b76-ee7f7bd1dc92",
      "name": "Limit 1"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "92f61ecf-5f25-4428-8d54-f78c6410da74",
              "name": "definition",
              "value": "={{ $json.meanings[0].definitions[0].definition }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1872,
        576
      ],
      "id": "47ed308f-8571-4dd7-abdf-bfdaa331645f",
      "name": "Get definition"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "023851a2-287b-42d9-a72f-5a5bb83cbb56",
              "name": "words",
              "value": "={{ \"Rabbit,Elephant,Bird,Lion,Cat\".split(\",\") }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1472,
        784
      ],
      "id": "a7572910-5e27-4152-af37-9748b65a99b9",
      "name": "Input - Words"
    },
    {
      "parameters": {
        "fieldToSplitOut": "words",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1664,
        784
      ],
      "id": "aa4e048d-f644-44a6-813c-123e7d9f7e2b",
      "name": "Split Out"
    },
    {
      "parameters": {
        "url": "=https://api.dictionaryapi.dev/api/v2/entries/en/{{ $json.words }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        1872,
        784
      ],
      "id": "7a80d9fb-d988-4dfc-ad29-811ab9025d50",
      "name": "Get Definitions"
    },
    {
      "parameters": {
        "compare": "selectedFields",
        "fieldsToCompare": "word",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        2096,
        784
      ],
      "id": "368754b2-19ad-40f4-9d33-092c3af33b1a",
      "name": "Remove Duplicates"
    },
    {
      "parameters": {
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "phonetic"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        2304,
        784
      ],
      "id": "fc0ee683-56aa-4a2f-95e3-6307d7cb3b45",
      "name": "Aggregate1"
    },
    {
      "parameters": {
        "content": "## Practice With \"Transform\" Tools",
        "height": 1104,
        "width": 2192,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1008,
        272
      ],
      "id": "0664aa77-6ae4-418b-ba54-116060d82805",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Enrich data\n```json\n[\n    {\n        \"name\": \"Rabbit\",\n        \"age\": 11,\n        \"height\": 174,\n        \"definition\": \"A mammal...\"\n    }\n]\n```",
        "height": 272,
        "width": 592
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2336,
        336
      ],
      "id": "08c17d70-5868-4a8d-a8d6-f0232d0e5e4a",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "## Get All Phonetics (\u767c\u97f3)\n```json\n[\n    {\n        \"phonetic\": [\n            \"/\u02c8\u0279\u00e6b\u0259t/\",\n            \"/\u02c8\u025bl\u0259f\u0259nt/\",\n            \"/b\u025cd/\",\n            \"/\u02c8la\u026a\u0259n/\",\n            \"/kat/\"\n        ]\n    }\n]\n```",
        "height": 272,
        "width": 592
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2496,
        704
      ],
      "id": "eb83e4ca-9cad-4f61-8f50-9db85d17dcc7",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "jsCode": "\nreturn [\n  { 'title': 'watch', 'price': 4000},\n  { 'title': 'apple', 'price': 100},\n  { 'title': 'mouse', 'price': 1200},\n  { 'title': 'airpods', 'price': 5000},\n]"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1328,
        992
      ],
      "id": "fee25330-9830-4694-8bf4-1c4b7524c846",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "price"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        1760,
        992
      ],
      "id": "311090de-0e33-4c31-95c5-3763a97f3bc7",
      "name": "Aggregate"
    },
    {
      "parameters": {
        "language": "python",
        "pythonCode": "data = items[0]['json']\nprices = data['price']\n\n\ntotal = sum(prices)\nmin_val = min(prices)\nmax_val = max(prices)\navg = total / len(prices) if prices else None\n\nreturn [{\n  'json': {\n    'totoal': total,\n    'min_val': min_val,\n    'max_val': max_val,\n    'avg': avg\n  }\n}]\n\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1920,
        992
      ],
      "id": "65470ee4-68e4-4ffd-a33e-3bdd725e98e8",
      "name": "Code in Python (Beta)"
    },
    {
      "parameters": {
        "content": "## Summarize price\n```json\n[\n    {\n        \"totoal\": 10300,\n        \"min_val\": 100,\n        \"max_val\": 5000,\n        \"avg\": 2575\n    }\n]\n```",
        "height": 272,
        "width": 592
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2480,
        1024
      ],
      "id": "94b7f79b-4349-47f2-b696-477c152e8ae0",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "3b922205-0baa-48dd-8ff6-7ad93739dc07",
              "leftValue": "={{ $json.avg }}",
              "rightValue": 2000,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2096,
        992
      ],
      "id": "fe9b5ff0-41c5-4cd2-9646-3ceb604062cd",
      "name": "If"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "3b25bbf0-4e8a-46c1-9532-7eacc07c8575",
              "name": "message",
              "value": "TOO EXPENSIVE",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2288,
        928
      ],
      "id": "a730d018-b79d-4c7b-9886-4bb9960e90b5",
      "name": "Msg: Too Expensive"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "fe511ac1-db01-4991-9eea-356c6180b4f3",
              "name": "message",
              "value": "Affordable",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2288,
        1072
      ],
      "id": "02b330c8-209b-4caf-8852-44329f878c5f",
      "name": "Msg: Affordable"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "03fd3c30-dece-4c37-a3a6-31e58c4f9f93",
              "leftValue": "={{ $json.price }}",
              "rightValue": 100,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1520,
        992
      ],
      "id": "772d9a4d-fac5-4aa1-9f4f-da54a4533bb1",
      "name": "Filter"
    }
  ],
  "connections": {
    "Edit Fields": {
      "main": [
        [
          {
            "node": "To Number",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Definitions of Rabbit",
            "type": "main",
            "index": 0
          },
          {
            "node": "Input - Words",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "To Number": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Definitions of Rabbit": {
      "main": [
        [
          {
            "node": "Limit 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit 1": {
      "main": [
        [
          {
            "node": "Get definition",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get definition": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Input - Words": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Get Definitions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Definitions": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Code in Python (Beta)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in Python (Beta)": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Msg: Too Expensive",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Msg: Affordable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "meta": {
    "templateCredsSetupCompleted": true
  }
}
Pro

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

About this workflow

Tutorial-Practice-Transformation. Uses httpRequest. Event-driven trigger; 23 nodes.

Source: https://gist.github.com/FongX777/f457dd700d826df4ae5ac81ffbb02994 — 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 workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t

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

[n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration. Uses splitInBatches, stickyNote, httpRequest, html. Event-driven trigger; 56 nodes.

HTTP Request, GitHub, Stop And Error +1
Web Scraping

[](https://youtu.be/c7yCZhmMjtI)

HTTP Request, GitHub, Stop And Error +1
Web Scraping

This automation organizes your n8n workflows files into categorizes (Active, Template, Done, Archived) and uploads them directly to a categorized Google Drive folders. It is designed to help users man

Google Drive, HTTP Request, Time Saved
Web Scraping

Create Animated Stories using GPT-4o-mini, Midjourney, Kling and Creatomate API. Uses httpRequest. Event-driven trigger; 51 nodes.

HTTP Request