Task: Find anyone's email address with waterfall enrichment

n8n workflow:
{"meta":{"instanceId":"f0a68da631efd4ed052a324b63ff90f7a844426af0398a68338f44245d1dd9e5"},"nodes":[{"id":"c8106d5b-bc86-4578-b712-1f19d4ab3292","name":"Start","type":"n8n-nodes-base.start","position":[-180,300],"parameters":{},"typeVersion":1},{"id":"dcaee026-b8c1-4acf-9b4f-4d46751e82ba","name":"Dropcontact","type":"n8n-nodes-base.dropcontact","position":[520,300],"parameters":{"options":{},"additionalFields":{"website":"={{$json[\"domain\"]}}","last_name":"={{$json[\"lastName\"]}}","first_name":"={{$json[\"firstName\"]}}"}},"credentials":{"dropcontactApi":{"id":"1","name":"Dropcontact account"}},"retryOnFail":true,"typeVersion":1,"continueOnFail":true,"alwaysOutputData":true},{"id":"4c073297-80b5-4ae6-a596-2474b8d2859b","name":"Hunter","type":"n8n-nodes-base.hunter","position":[700,300],"parameters":{"domain":"={{$node[\"Get data\"].json[\"domain\"]}}","lastname":"={{$node[\"Get data\"].json[\"lastName\"]}}","firstname":"={{$node[\"Get data\"].json[\"firstName\"]}}","operation":"emailFinder"},"credentials":{"hunterApi":{"id":"20","name":"Hunter account"}},"typeVersion":1,"continueOnFail":true,"alwaysOutputData":true},{"id":"fb23870c-6102-4f34-8382-62948a3cbc22","name":"verify mails in Bouncer","type":"n8n-nodes-base.httpRequest","position":[2180,100],"parameters":{"url":"https://api.usebouncer.com/v1/email/verify","options":{},"authentication":"headerAuth","queryParametersUi":{"parameter":[{"name":"email","value":"={{$json[\"email\"]}}"}]}},"credentials":{"httpHeaderAuth":{"id":"21","name":"Bouncer"}},"typeVersion":1,"continueOnFail":true},{"id":"ea3d3637-bf72-459d-833e-af1c588c77c6","name":"score results","type":"n8n-nodes-base.functionItem","position":[2520,100],"parameters":{"functionCode":"\nswitch (item.emailStatus){\n  case \"deliverable\":\n  item.score = 20\n  break;\n  case \"risky\":\n  item.score=10\n  break;\n  case \"unknown\":\n  item.score=10\n  break;\n  default:\n  item.score=0\n  break;\n}\n\n\nswitch (item.provider){\n  case \"Dropcontact\":\n  item.score += 2\n  break;\n\n  case \"Findymail\":\n  item.score+=3\n  break;\n  case \"Hunter\":\n  item.score+=1\n  break;\n  default:\n  item.score+=0\n  break;\n}\n\nreturn item;"},"typeVersion":1},{"id":"b7920e87-2985-47ee-9183-40076748c170","name":"Merge","type":"n8n-nodes-base.merge","position":[3240,280],"parameters":{"mode":"mergeByIndex"},"typeVersion":1},{"id":"8db622c8-fbfd-46fa-98d3-77030f2afb63","name":"SplitInBatches","type":"n8n-nodes-base.splitInBatches","position":[1280,300],"parameters":{"options":{},"batchSize":1},"typeVersion":1},{"id":"41643732-9a42-4b50-9bfa-06dd97f154f2","name":"Create an array with all the emails","type":"n8n-nodes-base.functionItem","position":[1480,300],"parameters":{"functionCode":"item.allemails = []\n\nitem.allemails.push({\"email\":item.Dropcontact,\"provider\":\"Dropcontact\"})\nitem.allemails.push({\"email\":item.Hunter,\"provider\":\"Hunter\"})\nitem.allemails.push({\"email\":item.Findymail,\"provider\":\"Findymail\"})\n\nreturn item;"},"typeVersion":1},{"id":"909b1290-5b69-4906-81ca-335474d70d66","name":"Split emails to be checked by Bouncer","type":"n8n-nodes-base.itemLists","position":[1760,120],"parameters":{"options":{},"fieldToSplitOut":"allemails"},"typeVersion":1},{"id":"1213c1bd-22b5-4c74-86eb-1a8db81fbfb2","name":"sort by score","type":"n8n-nodes-base.itemLists","position":[2700,100],"parameters":{"options":{},"operation":"sort","sortFieldsUi":{"sortField":[{"order":"descending","fieldName":"score"}]}},"executeOnce":false,"typeVersion":1},{"id":"7b6865d4-0bfd-44b2-a339-d9224c8022b5","name":"Keep best email","type":"n8n-nodes-base.itemLists","position":[2880,100],"parameters":{"operation":"limit"},"typeVersion":1},{"id":"ebf88b92-9d2e-4b52-8fb5-937212cbfe74","name":"Data sample","type":"n8n-nodes-base.function","position":[80,300],"parameters":{"functionCode":"\n\n\n\nreturn [{json: {\"userId\":\"user1\",\n               \"firstName\":\"Lucas\", \n               \"lastName\": \"Perret\",\n               \"domain\": \"lempire.com\"}},\n               {json: {\"userId\":\"user2\",\n                \"firstName\":\"Guillaume\", \n               \"lastName\": \"Moubeche\",\n               \"domain\": \"lemlist.com\"}},\n        {json: {\"userId\":\"user3\",\n                \"firstName\":\"John\", \n               \"lastName\": \"Do\",\n               \"domain\": \"lempire.com\"}}\n \n               \n               \n               ];"},"typeVersion":1},{"id":"718fc141-9466-42e7-89ef-d106941ed85b","name":"Note","type":"n8n-nodes-base.stickyNote","position":[2460,-260],"parameters":{"width":200,"height":540,"content":"## Score the results\nThe scoring is made under 2 parameters: \n- email validity\n- provider rank\n\nVerified emails will be prioritized but if there is emails found with the same status. We will prioritize our favorite email provider. \n\nWe use the function node to do it. \n\n"},"typeVersion":1},{"id":"4f853625-d344-4949-b86e-83cc69485906","name":"Note1","type":"n8n-nodes-base.stickyNote","position":[2680,-260],"parameters":{"width":360,"height":540,"content":"## Keep the best result\n\nThen we sort the records in descending order to have the best email in the 1st position. \n\nFinally we limit the output to 1 item so we end with only the email with the highest score."},"typeVersion":1},{"id":"ffde1bab-4665-4f3a-abdb-f37933addf68","name":"Note2","type":"n8n-nodes-base.stickyNote","position":[1420,-20],"parameters":{"width":500,"height":500,"content":"## Iterate on each emails found\n\nThose 2 nodes allow me to iterate email verification on all the emails found per leads. "},"typeVersion":1},{"id":"e53dbd16-ed1e-40d7-9255-6f9bccbefe38","name":"Remove empty emails","type":"n8n-nodes-base.if","position":[1960,120],"parameters":{"conditions":{"string":[{"value1":"={{$json[\"email\"]}}","operation":"isNotEmpty"}]}},"typeVersion":1},{"id":"91ea4ed9-ccdd-4f46-a1ca-fbd31365390e","name":"clean output","type":"n8n-nodes-base.set","position":[2340,100],"parameters":{"values":{"string":[{"name":"emailStatus","value":"={{$json[\"status\"]}}"},{"name":"bestEmailFound","value":"={{$json[\"email\"]}}"},{"name":"provider","value":"={{$node[\"Split emails to be checked by Bouncer\"].json[\"provider\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"33c63492-289e-4a20-8657-a43e073ce1be","name":"Get data","type":"n8n-nodes-base.set","position":[320,300],"parameters":{"values":{"string":[{"name":"id","value":"={{$json[\"userId\"]}}"},{"name":"firstName","value":"={{$json[\"firstName\"]}}"},{"name":"lastName","value":"={{$json[\"lastName\"]}}"},{"name":"domain","value":"={{$json[\"domain\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"5c7d63da-0d45-424e-823c-1979816ff10d","name":"Add email results to items","type":"n8n-nodes-base.set","position":[1060,300],"parameters":{"values":{"string":[{"name":"Findymail","value":"={{$node[\"Findymail\"].json[\"contact\"][\"email\"] }}"},{"name":"Dropcontact","value":"={{$node[\"Dropcontact\"].json[\"email\"][0][\"email\"]}}"},{"name":"Hunter","value":"={{$node[\"Hunter\"].json[\"email\"]}}"},{"name":"id","value":"={{$node[\"Get data\"].json[\"id\"]}}"},{"name":"firstName","value":"={{$node[\"Get data\"].json[\"firstName\"]}}"},{"name":"lastName","value":"={{$node[\"Get data\"].json[\"lastName\"]}}"},{"name":"domain","value":"={{$node[\"Get data\"].json[\"domain\"]}}"}]},"options":{}},"typeVersion":1},{"id":"219bc7a7-fc4e-4cde-a89f-d1aa54013be8","name":"Note3","type":"n8n-nodes-base.stickyNote","position":[480,-20],"parameters":{"width":520,"height":500,"content":"## Email finders chain\n\nIn nodes settings: \n\n**Always Output Data** and **Continue on fail** are activated so the workflows continue to the end - even if 1 tool didn't find any data for a lead.  \n"},"typeVersion":1},{"id":"477cb504-ca50-40bc-b853-6aebc50fee6e","name":"If worfklow is done","type":"n8n-nodes-base.if","position":[2240,560],"parameters":{"conditions":{"boolean":[{"value1":"={{$node[\"SplitInBatches\"].context[\"noItemsLeft\"]}}","value2":true}]}},"typeVersion":1},{"id":"50733f40-e9f5-44db-8149-00a20a56eb43","name":"Return all items","type":"n8n-nodes-base.function","position":[2540,540],"parameters":{"functionCode":"const allData = []\n\nlet counter = 0;\ndo {\n  try {\n    const items = $items(\"Merge\", 0, counter).map(item => item.json);\n    allData.push.apply(allData, items);\n  } catch (error) {\n    return [{json: {allData}}];  \n  }\n\n  counter++;\n} while(true);"},"typeVersion":1},{"id":"1cdc63b5-6ef9-4a72-9e0d-1c086c0c2bdf","name":"Item Lists","type":"n8n-nodes-base.itemLists","position":[2760,540],"parameters":{"options":{},"fieldToSplitOut":"allData"},"typeVersion":1},{"id":"f66efe35-5246-4f48-a4f2-7249352ce338","name":"Set clean output","type":"n8n-nodes-base.set","position":[2980,540],"parameters":{"values":{"string":[{"name":"id","value":"={{$json[\"id\"]}}"},{"name":"bestEmail","value":"={{$json[\"bestEmailFound\"]}}"},{"name":"firstName","value":"={{$json[\"firstName\"]}}"},{"name":"lastName","value":"={{$json[\"lastName\"]}}"},{"name":"domain","value":"={{$json[\"domain\"]}}"},{"name":"FindymailEmail","value":"={{$json[\"Findymail\"]}}"},{"name":"DropcontactEmail","value":"={{$json[\"Dropcontact\"]}}"},{"name":"HunterEmail","value":"={{$json[\"Hunter\"]}}"},{"name":"bestEmailStatus","value":"={{ $json[\"emailStatus\"] }}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"7c199646-b6a2-4228-a707-59464a9eea6a","name":"Note4","type":"n8n-nodes-base.stickyNote","position":[260,-20],"parameters":{"width":209.34884845288315,"height":499.35203498593495,"content":"## Map your variables here\n\nCould look like this: \nfirst_name -> firstName\nlast_name -> lastName\nwebsite -> domain"},"typeVersion":1},{"id":"57624e0c-7d20-4585-9594-c2592a594e82","name":"Note5","type":"n8n-nodes-base.stickyNote","position":[0,-20],"parameters":{"width":232.99402250351613,"height":499.7899085794657,"content":"## Change this node with your own data\n\nYou must communicate: \n- firstName\n- lastName\n- domain"},"typeVersion":1},{"id":"d4552890-6cf2-458c-af65-642ee2c80686","name":"Note6","type":"n8n-nodes-base.stickyNote","position":[3140,500],"parameters":{"width":412.4127274525317,"height":187.36709959563996,"content":"## Send the data in your favorite tools\n\n-> Lemlist\n-> CRM\n-> Email Marketing Platform\n"},"typeVersion":1},{"id":"a0ed1c0d-157f-40b9-ae64-5c6bdf8df0a4","name":"Findymail","type":"n8n-nodes-base.httpRequest","position":[880,300],"parameters":{"url":"https://app.findymail.com/api/search/name","method":"POST","options":{"batching":{"batch":{"batchSize":10}}},"sendBody":true,"authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"name","value":"={{$node[\"Get data\"].json[\"firstName\"]}} {{$node[\"Get data\"].json[\"lastName\"]}}"},{"name":"domain","value":"={{$node[\"Get data\"].json[\"domain\"]}}"}]},"genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"76","name":"findymail"}},"typeVersion":3,"continueOnFail":true,"alwaysOutputData":true}],"connections":{"Merge":{"main":[[{"node":"If worfklow is done","type":"main","index":0}]]},"Start":{"main":[[{"node":"Data sample","type":"main","index":0}]]},"Hunter":{"main":[[{"node":"Findymail","type":"main","index":0}]]},"Get data":{"main":[[{"node":"Dropcontact","type":"main","index":0}]]},"Findymail":{"main":[[{"node":"Add email results to items","type":"main","index":0}]]},"Item Lists":{"main":[[{"node":"Set clean output","type":"main","index":0}]]},"Data sample":{"main":[[{"node":"Get data","type":"main","index":0}]]},"Dropcontact":{"main":[[{"node":"Hunter","type":"main","index":0}]]},"clean output":{"main":[[{"node":"score results","type":"main","index":0}]]},"score results":{"main":[[{"node":"sort by score","type":"main","index":0}]]},"sort by score":{"main":[[{"node":"Keep best email","type":"main","index":0}]]},"SplitInBatches":{"main":[[{"node":"Create an array with all the emails","type":"main","index":0}]]},"Keep best email":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Return all items":{"main":[[{"node":"Item Lists","type":"main","index":0}]]},"If worfklow is done":{"main":[[{"node":"Return all items","type":"main","index":0}],[{"node":"SplitInBatches","type":"main","index":0}]]},"Remove empty emails":{"main":[[{"node":"verify mails in Bouncer","type":"main","index":0}]]},"verify mails in Bouncer":{"main":[[{"node":"clean output","type":"main","index":0}]]},"Add email results to items":{"main":[[{"node":"SplitInBatches","type":"main","index":0}]]},"Create an array with all the emails":{"main":[[{"node":"Split emails to be checked by Bouncer","type":"main","index":0},{"node":"Merge","type":"main","index":1}]]},"Split emails to be checked by Bouncer":{"main":[[{"node":"Remove empty emails","type":"main","index":0}]]}}}