1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"createdAt":"2024-07-07T15:26:53.461Z","updatedAt":"2024-07-17T13:31:58.058Z","id":"iGw2rg9kxx5SmGQw","name":"Scrap web site copy - sub","active":false,"nodes":[{"parameters":{"url":"={{ $json.URL }}","options":{}},"id":"9584e149-033a-4f6b-8122-30ee6f5405ca","name":"HTTP Request","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[-1120,-160]},{"parameters":{"operation":"extractHtmlContent","sourceData":"binary","extractionValues":{"values":[{"key":"data","cssSelector":"body","returnValue":"html"}]},"options":{"cleanUpText":false}},"id":"3a504df0-ada0-4d7f-b75a-a246f0c1f381","name":"HTML","type":"n8n-nodes-base.html","typeVersion":1.2,"position":[-840,-160]},{"parameters":{"operation":"toJson","options":{}},"id":"99dfa97b-db80-46a6-aa04-7758fe35183b","name":"Convert to File","type":"n8n-nodes-base.convertToFile","typeVersion":1.1,"position":[-980,-160]},{"parameters":{"operation":"extractHtmlContent","extractionValues":{"values":[{"key":"key","cssSelector":"p","returnArray":true}]},"options":{}},"id":"8542f76a-4bf4-4a1b-b137-fdb3fc929d82","name":"HTML1","type":"n8n-nodes-base.html","typeVersion":1.2,"position":[-700,40]},{"parameters":{"operation":"extractHtmlContent","extractionValues":{"values":[{"key":"key","cssSelector":"a","returnValue":"attribute","attribute":"href","returnArray":true}]},"options":{"trimValues":true,"cleanUpText":true}},"id":"08fe30eb-ea27-49c1-8ce1-a3a2100c360c","name":"HTML2","type":"n8n-nodes-base.html","typeVersion":1.2,"position":[-700,-160]},{"parameters":{"fieldToSplitOut":"key","options":{}},"id":"eeb61f65-43e6-4718-b05d-ebfea297c5bb","name":"Split Out","type":"n8n-nodes-base.splitOut","typeVersion":1,"position":[-560,-160]},{"parameters":{"assignments":{"assignments":[{"id":"516f8fd8-cd1c-4cd1-aae6-fc5e1725f33a","name":"key","value":"={{ $json.URL }}","type":"string"}]},"options":{}},"id":"a8d4f11f-8e2e-4794-861c-3ce01f0c6ffd","name":"Edit Fields","type":"n8n-nodes-base.set","typeVersion":3.3,"position":[-560,-340]},{"parameters":{},"id":"98499ab0-b15d-408a-878a-00084d91aff5","name":"Execute Workflow Trigger","type":"n8n-nodes-base.executeWorkflowTrigger","typeVersion":1,"position":[-1540,-160]},{"parameters":{"operation":"extractHtmlContent","dataPropertyName":"key","extractionValues":{"values":[{"key":"key","cssSelector":":root","returnArray":true}]},"options":{}},"id":"81f838a1-2457-4947-93e5-881b9c553cd6","name":"HTML3","type":"n8n-nodes-base.html","typeVersion":1.2,"position":[-560,40]},{"parameters":{"operation":"create","docId":"pfyRAyDpaei1RyyPQYUqLV","tableId":"Scrapping","fieldsToSend":{"properties":[{"fieldId":"Url","fieldValue":"={{ $node['Execute Workflow Trigger'].json[\"URL\"] }}"},{"fieldId":"Contenu","fieldValue":"='{{ $node['Aggregate'].json['key'] }}'"},{"fieldId":"Etat","fieldValue":"En attente"}]}},"id":"4ce68267-83e4-4aec-8a25-0cb88fd8fea2","name":"Grist","type":"n8n-nodes-base.grist","typeVersion":1,"position":[180,120],"credentials":{"gristApi":{"id":"FP4qhcxgUb7jbXcL","name":"Grist account"}}},{"parameters":{"fieldsToAggregate":{"fieldToAggregate":[{"fieldToAggregate":"key"}]},"options":{"mergeLists":true}},"id":"5c7f9abc-fbe9-4a6a-9666-a2cb28a11da8","name":"Aggregate","type":"n8n-nodes-base.aggregate","typeVersion":1,"position":[-420,40]},{"parameters":{},"id":"40f2494d-1b24-4e86-9cff-b520bbb67737","name":"Merge","type":"n8n-nodes-base.merge","typeVersion":2.1,"position":[-420,-260]},{"parameters":{},"id":"810d685d-2d23-4310-9f2b-419561d4e047","name":"Remove Duplicates","type":"n8n-nodes-base.removeDuplicates","typeVersion":1.1,"position":[0,-260]},{"parameters":{"assignments":{"assignments":[{"id":"bdc8c167-cf54-4c4d-a663-b3c8b6fa6f45","name":"URL","value":"={{ $json.key.replaceAll('\\\\\"','').replace(/#(.*)$/,'') }}","type":"string"}]},"options":{}},"id":"045c7155-b9b2-4e15-b0c2-2a9df81405a7","name":"Edit Fields2","type":"n8n-nodes-base.set","typeVersion":3.3,"position":[-280,-260]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"ef2e7472-f243-4324-b119-90968b0c58c6","leftValue":"={{ $json.URL }}","rightValue":"","operator":{"type":"string","operation":"notEmpty","singleValue":true}},{"id":"b506e688-47e3-4def-971e-93375648fba6","leftValue":"={{ $json.URL }}","rightValue":".","operator":{"type":"string","operation":"notEquals"}},{"id":"03d2473c-99d8-41ce-a085-4f9935f3f768","leftValue":"={{ $json.URL }}","rightValue":"/","operator":{"type":"string","operation":"notEquals"}}],"combinator":"and"},"options":{}},"id":"efb25f7a-889c-4f67-8400-dc422596b59b","name":"Filter","type":"n8n-nodes-base.filter","typeVersion":2,"position":[-140,-260]},{"parameters":{"docId":"pfyRAyDpaei1RyyPQYUqLV","tableId":"Scrapping","additionalOptions":{"filter":{"filterProperties":[{"field":"Url","values":"={{ $node['Execute Workflow Trigger'].json[\"URL\"] }}"}]}}},"id":"f7c1593e-b57e-4265-b7c4-35876b41662d","name":"Grist1","type":"n8n-nodes-base.grist","typeVersion":1,"position":[-280,-40],"credentials":{"gristApi":{"id":"FP4qhcxgUb7jbXcL","name":"Grist account"}}},{"parameters":{},"id":"232309dd-c3a7-4988-b5c1-3d7d4de7ff8d","name":"No Operation, do nothing","type":"n8n-nodes-base.noOp","typeVersion":1,"position":[-280,120]},{"parameters":{"mode":"combine","combinationMode":"mergeByPosition","options":{}},"id":"8965b573-ec2f-4189-ae3c-b0588bca2221","name":"Merge1","type":"n8n-nodes-base.merge","typeVersion":2.1,"position":[-120,40]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"721501a6-0116-4044-9fea-22e4c6b8fac0","leftValue":"={{ $json.id }}","rightValue":"","operator":{"type":"number","operation":"exists","singleValue":true}}],"combinator":"and"},"options":{}},"id":"a38c005a-d944-4aa0-8e7f-1651304dbd5f","name":"If","type":"n8n-nodes-base.if","typeVersion":2,"position":[20,40]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"65590b9a-88c1-44c7-9e1b-79f367b0658e","leftValue":"={{ $json.URL }}","rightValue":"http","operator":{"type":"string","operation":"notStartsWith"}}],"combinator":"and"},"options":{}},"id":"73b1465d-dda4-46c6-bd03-cf24c85c4ac5","name":"Filter1","type":"n8n-nodes-base.filter","typeVersion":2,"position":[140,-260]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"65590b9a-88c1-44c7-9e1b-79f367b0658e","leftValue":"={{ $json.URL }}","rightValue":"http","operator":{"type":"string","operation":"startsWith"}}],"combinator":"and"},"options":{}},"id":"09d4a17f-67ba-47e1-80bc-7e20f28ae891","name":"Filter2","type":"n8n-nodes-base.filter","typeVersion":2,"position":[140,-400]},{"parameters":{},"id":"a022b08e-cb64-44fa-8a1f-a2fddb3412b5","name":"Merge3","type":"n8n-nodes-base.merge","typeVersion":2.1,"position":[420,-360]},{"parameters":{"options":{}},"id":"93e87ace-7f5c-483b-8779-51c6a4513d7b","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","typeVersion":3,"position":[280,-260]},{"parameters":{"assignments":{"assignments":[{"id":"37846938-e662-4117-80dc-fa3d88edaba6","name":"key","value":"={{ $node['Execute Workflow Trigger'].json[\"URL\"] }}{{ $json.URL }}","type":"string"}]},"options":{}},"id":"1ceaceec-c634-4fd5-8baf-671f6b3b516e","name":"Edit Fields1","type":"n8n-nodes-base.set","typeVersion":3.3,"position":[600,-40]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"00146068-d0bf-4ac5-abf8-4dc2e61638de","leftValue":"={{ $node['Execute Workflow Trigger'].json[\"URL\"] }}","rightValue":"/","operator":{"type":"string","operation":"notEndsWith"}},{"id":"b4526009-106b-4074-8dad-e7c458bf56e3","leftValue":"={{ $json.URL }}","rightValue":"/","operator":{"type":"string","operation":"notStartsWith"}}],"combinator":"and"},"options":{}},"id":"3e644b34-f3ca-4d9e-ab26-ab3ffa1d3608","name":"If1","type":"n8n-nodes-base.if","typeVersion":2,"position":[420,-160]},{"parameters":{"assignments":{"assignments":[{"id":"37846938-e662-4117-80dc-fa3d88edaba6","name":"key","value":"={{ $node['Execute Workflow Trigger'].json[\"URL\"] }}/{{ $json.URL }}","type":"string"}]},"options":{}},"id":"510599c6-fcbf-42fb-b366-d5270a13aa3b","name":"Edit Fields3","type":"n8n-nodes-base.set","typeVersion":3.3,"position":[600,-220]},{"parameters":{"workflowId":"iGw2rg9kxx5SmGQw","mode":"each","options":{"waitForSubWorkflow":false}},"id":"09841278-2bd5-44d2-94e8-c7ae074a897e","name":"Execute Workflow","type":"n8n-nodes-base.executeWorkflow","typeVersion":1,"position":[580,-380],"executeOnce":true},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"158da263-836c-46c1-a841-98b9ce19c5f2","leftValue":"={{ $json.URL }}","rightValue":"","operator":{"type":"string","operation":"empty","singleValue":true}}],"combinator":"and"},"options":{}},"id":"a84e2cca-1821-45a2-9d79-9ff3767b4d41","name":"If2","type":"n8n-nodes-base.if","typeVersion":2,"position":[-1400,-160]},{"parameters":{},"id":"d33b5b1e-caed-43d8-a8c4-f58628c18fca","name":"Stop and Error","type":"n8n-nodes-base.stopAndError","typeVersion":1,"position":[-1080,-560]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"a3261ca0-a637-4adc-810f-448812a6cedb","leftValue":"{{ $json.URL }}","rightValue":"http","operator":{"type":"string","operation":"notStartsWith"}}],"combinator":"and"},"options":{}},"id":"0dab09d0-b8b6-447f-b937-8670b4b792b4","name":"If3","type":"n8n-nodes-base.if","typeVersion":2,"position":[-1260,-160]}],"connections":{"HTTP Request":{"main":[[{"node":"Convert to File","type":"main","index":0}]]},"HTML":{"main":[[{"node":"HTML2","type":"main","index":0},{"node":"HTML1","type":"main","index":0}]]},"Convert to File":{"main":[[{"node":"HTML","type":"main","index":0}]]},"HTML2":{"main":[[{"node":"Split Out","type":"main","index":0}]]},"Split Out":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Edit Fields":{"main":[[{"node":"Merge","type":"main","index":0}]]},"HTML1":{"main":[[{"node":"HTML3","type":"main","index":0}]]},"HTML3":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"Aggregate":{"main":[[{"node":"Grist1","type":"main","index":0},{"node":"No Operation, do nothing","type":"main","index":0}]]},"Merge":{"main":[[{"node":"Edit Fields2","type":"main","index":0}]]},"Edit Fields2":{"main":[[{"node":"Filter","type":"main","index":0}]]},"Filter":{"main":[[{"node":"Remove Duplicates","type":"main","index":0}]]},"Grist1":{"main":[[{"node":"Merge1","type":"main","index":0}]]},"No Operation, do nothing":{"main":[[{"node":"Merge1","type":"main","index":1}]]},"Merge1":{"main":[[{"node":"If","type":"main","index":0}]]},"If":{"main":[[],[{"node":"Grist","type":"main","index":0}]]},"Remove Duplicates":{"main":[[{"node":"Filter1","type":"main","index":0},{"node":"Filter2","type":"main","index":0}]]},"Filter1":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Filter2":{"main":[[{"node":"Merge3","type":"main","index":0}]]},"Loop Over Items":{"main":[[{"node":"Merge3","type":"main","index":1}],[{"node":"If1","type":"main","index":0}]]},"Edit Fields1":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"If1":{"main":[[{"node":"Edit Fields3","type":"main","index":0}],[{"node":"Edit Fields1","type":"main","index":0}]]},"Edit Fields3":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"If2","type":"main","index":0},{"node":"Edit Fields","type":"main","index":0}]]},"If2":{"main":[[{"node":"Stop and Error","type":"main","index":0}],[{"node":"If3","type":"main","index":0}]]},"Merge3":{"main":[[{"node":"Execute Workflow","type":"main","index":0}]]},"If3":{"main":[[{"node":"Stop and Error","type":"main","index":0}],[{"node":"HTTP Request","type":"main","index":0}]]}},"settings":{"executionOrder":"v1"},"staticData":null,"meta":{"templateCredsSetupCompleted":true},"pinData":{},"versionId":"db6e32ac-ed41-4184-88ad-f0eb2745ad19","triggerCount":0,"tags":[]} |