Task: Scrape European Clinical Trials Database of all clinical trials /  (Eudra CT) 

n8n workflow JSON:
{"meta":{"instanceId":"5e94c4e840a537eafad41834dc1cdea87e7b992e4a38d15d50e7b95cebc2ce55"},"nodes":[{"id":"75626571-6642-4b86-9c8c-87e38559db22","name":"On clicking 'execute'","type":"n8n-nodes-base.manualTrigger","position":[-180,220],"parameters":{},"typeVersion":1},{"id":"0489a7cd-5f06-4345-9627-7e286db4df42","name":"Fetch search results","type":"n8n-nodes-base.httpRequest","position":[40,220],"parameters":{"url":"https://www.clinicaltrialsregister.eu/ctr-search/search","options":{"timeout":10000,"allowUnauthorizedCerts":true},"sendQuery":true,"queryParameters":{"parameters":[{"name":"country","value":"de"},{"name":"query","value":"Schizophrenia OR PTSD"},{"name":"page","value":"={{ $runIndex + 1 }}"}]}},"typeVersion":3},{"id":"f5b6eb2c-ad37-4354-9658-5d55f9486fa5","name":"Item Lists","type":"n8n-nodes-base.itemLists","position":[920,220],"parameters":{"options":{"destinationFieldName":"result"},"fieldToSplitOut":"results"},"typeVersion":1},{"id":"b1c5bef5-9253-4dd1-8aee-a9e02354f2c7","name":"Extract results","type":"n8n-nodes-base.htmlExtract","position":[260,220],"parameters":{"options":{},"extractionValues":{"values":[{"key":"results","cssSelector":"table.result","returnArray":true,"returnValue":"html"}]}},"typeVersion":1},{"id":"74cb6c0f-ca96-4da1-84f6-5b481f218b53","name":"Wrap in <table>","type":"n8n-nodes-base.set","position":[1140,220],"parameters":{"values":{"string":[{"name":"result","value":"=<table class=\"result\">{{ $json[\"result\"] }}</table>"}]},"options":{}},"typeVersion":1},{"id":"f548564e-ed4c-49e4-b65b-87c6492d1176","name":"Extract fields","type":"n8n-nodes-base.htmlExtract","position":[1360,220],"parameters":{"options":{},"dataPropertyName":"result","extractionValues":{"values":[{"key":"Sponsor Name","cssSelector":"td:contains(\"Sponsor Name:\")"},{"key":"Medical condition","cssSelector":"td:contains(\"Medical condition:\")"}]}},"typeVersion":1},{"id":"3534929d-cd87-407c-8afe-8326de5e3640","name":"Trim field names","type":"n8n-nodes-base.set","position":[1560,220],"parameters":{"values":{"string":[{"name":"Sponsor Name","value":"={{ $json[\"Sponsor Name\"].replace('Sponsor Name:', '').trim() }}"},{"name":"Medical condition","value":"={{ $json[\"Medical condition\"].replace('Medical condition:', '').trim() }}"}]},"options":{}},"typeVersion":1},{"id":"e1c9d521-b24a-4c17-9244-0f10205009c5","name":"Full page?","type":"n8n-nodes-base.if","position":[480,220],"parameters":{"conditions":{"number":[{"value1":"={{ $json.results.length }}","value2":20,"operation":"equal"}]}},"typeVersion":1},{"id":"3020f91b-8d5f-4fa9-9ff6-d61fff5b57fc","name":"Merge loop items","type":"n8n-nodes-base.code","position":[700,220],"parameters":{"jsCode":"let results = [],\n  i = 0;\n\ndo {\n  try {\n    results = results.concat($(\"Extract results\").all(0, i));\n  } catch (error) {\n    return results;\n  }\n  i++;\n} while (true);\n"},"typeVersion":1},{"id":"29a3a74f-b3b0-4caf-8e81-0fce69703ba1","name":"Item Lists1","type":"n8n-nodes-base.itemLists","position":[2000,220],"parameters":{"options":{},"operation":"sort","sortFieldsUi":{"sortField":[{"fieldName":"Sponsor"}]}},"typeVersion":1},{"id":"df6dc6e2-e16e-4df8-8252-32f41474a167","name":"Set","type":"n8n-nodes-base.set","position":[1780,220],"parameters":{"values":{"string":[{"name":"Sponsor","value":"={{$json[\"Sponsor Name\"]}}"},{"name":"Condition","value":"={{$json[\"Medical condition\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"c04fa57c-40ab-4eac-900a-d029e8370120","name":"Transform Values","type":"n8n-nodes-base.function","position":[2200,40],"parameters":{"functionCode":"const unique_conditions = [...new Set(items.map(item => item.json.Condition))];\nconst unique_sponsors = [...new Set(items.map(item => item.json.Sponsor))];\n\nlet results = [];\n\nunique_conditions.forEach(Condition => {\n  let result = {\n    json: {\n      conditions: Condition\n    }\n  };\n  unique_sponsors.forEach(Sponsor=> {\n    result.json[Sponsor] = items.filter(item => item.json.Condition == Condition && item.json.Sponsor == Sponsor).length;\n  })\n  results.push(result);\n});\n\nreturn results;"},"typeVersion":1},{"id":"648b2a97-3206-426e-ad60-1c8f97927048","name":"Transform Values1","type":"n8n-nodes-base.function","position":[2220,420],"parameters":{"functionCode":"const unique_sponsors = [...new Set(items.map(item => item.json.Sponsor))];\nconst unique_conditions = [...new Set(items.map(item => item.json.Condition))];\n\n\nlet results = [];\n\nunique_sponsors.forEach(Sponsor => {\n  let result = {\n    json: {\n      conditions: Sponsor\n    }\n  };\n  unique_conditions.forEach(Condition=> {\n    result.json[Condition] = items.filter(item => item.json.Sponsor == Sponsor && item.json.Condition == Condition).length;\n  })\n  results.push(result);\n});\n\nreturn results;"},"typeVersion":1}],"connections":{"Set":{"main":[[{"node":"Item Lists1","type":"main","index":0}]]},"Full page?":{"main":[[{"node":"Fetch search results","type":"main","index":0}],[{"node":"Merge loop items","type":"main","index":0}]]},"Item Lists":{"main":[[{"node":"Wrap in <table>","type":"main","index":0}]]},"Item Lists1":{"main":[[{"node":"Transform Values","type":"main","index":0},{"node":"Transform Values1","type":"main","index":0}]]},"Extract fields":{"main":[[{"node":"Trim field names","type":"main","index":0}]]},"Extract results":{"main":[[{"node":"Full page?","type":"main","index":0}]]},"Wrap in <table>":{"main":[[{"node":"Extract fields","type":"main","index":0}]]},"Merge loop items":{"main":[[{"node":"Item Lists","type":"main","index":0}]]},"Trim field names":{"main":[[{"node":"Set","type":"main","index":0}]]},"Fetch search results":{"main":[[{"node":"Extract results","type":"main","index":0}]]},"On clicking 'execute'":{"main":[[{"node":"Fetch search results","type":"main","index":0}]]}}}