{ "nodes": [ { "id": "search-sheet-contacts-with-icypeas-start", "name": "Run the search", "type": "n8n-nodes-base.manualTrigger", "position": [ 360, 1700 ], "parameters": {}, "typeVersion": 1 }, { "id": "search-sheet-contacts-with-icypeas-read", "name": "Read contact rows", "type": "n8n-nodes-base.googleSheets", "position": [ 580, 1700 ], "parameters": { "sheetName": { "__rl": true, "mode": "list", "value": "" }, "documentId": { "__rl": true, "mode": "list", "value": "" } }, "typeVersion": 4.1 }, { "id": "search-sheet-contacts-with-icypeas-batch", "name": "Prepare batches", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 800, 1700 ], "parameters": { "jsCode": "const rows=$input.all().map(item=>item.json).map(x=>[String(x.firstname??''),String(x.lastname??''),String(x.company??'')]);for(const r of rows)if((!r[0]&&!r[1])||!r[2])throw Error('Each row needs a first or last name and company');const out=[];for(let i=0;i{if(item.json.success!==true||typeof item.json.file!=='string'||!item.json.file)throw Error('Icypeas did not confirm batch; it may have been submitted');return item});" } }, { "id": "search-sheet-contacts-with-icypeas-wait", "name": "Wait between requests", "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ 1680, 1700 ], "parameters": { "amount": 1, "unit": "seconds" } } ], "pinData": {}, "connections": { "Run the search": { "main": [ [ { "node": "Read contact rows", "type": "main", "index": 0 } ] ] }, "Read contact rows": { "main": [ [ { "node": "Prepare batches", "type": "main", "index": 0 } ] ] }, "Prepare batches": { "main": [ [ { "node": "Next batch", "type": "main", "index": 0 } ] ] }, "Next batch": { "main": [ [], [ { "node": "Submit a search batch", "type": "main", "index": 0 } ] ] }, "Submit a search batch": { "main": [ [ { "node": "Confirm submission", "type": "main", "index": 0 } ] ] }, "Confirm submission": { "main": [ [ { "node": "Wait between requests", "type": "main", "index": 0 } ] ] }, "Wait between requests": { "main": [ [ { "node": "Next batch", "type": "main", "index": 0 } ] ] } }, "name": "Search Sheet Contacts with Icypeas", "active": false }