{"name":"Filtrat — Bulk Email Finder from Google Sheets","nodes":[{"parameters":{},"id":"manual-trigger","name":"Manual Trigger","type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[240,300]},{"parameters":{"operation":"read","documentId":{"__rl":true,"mode":"id","value":""},"sheetName":{"__rl":true,"mode":"name","value":"Sheet1"},"options":{}},"id":"read-sheet","name":"Read Contacts","type":"n8n-nodes-base.googleSheets","typeVersion":4.5,"position":[460,300],"credentials":{"googleSheetsOAuth2Api":{"id":"","name":"Google Sheets"}}},{"parameters":{"method":"GET","url":"https://api.filtrat.io/v1/billing/status","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"id":"check-balance","name":"Check Balance","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[680,300],"credentials":{"httpHeaderAuth":{"id":"","name":"Filtrat API"}}},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":""},"conditions":[{"leftValue":"={{ $json.total_balance }}","rightValue":"={{ $('Read Contacts').all().length * 20 }}","operator":{"type":"number","operation":"gte"}}]}},"id":"enough-credits","name":"Enough Credits?","type":"n8n-nodes-base.if","typeVersion":2,"position":[900,300]},{"parameters":{"batchSize":1,"options":{"reset":false}},"id":"loop-contacts","name":"Loop Over Contacts","type":"n8n-nodes-base.splitInBatches","typeVersion":3,"position":[1120,200]},{"parameters":{"method":"POST","url":"https://api.filtrat.io/v1/finder/search","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendBody":true,"specifyBody":"json","jsonBody":"={{ JSON.stringify({ first_name: $json.first_name, last_name: $json.last_name, full_name: $json.full_name || undefined, domain_or_url: $json.domain }) }}"},"id":"find-email","name":"Find Email","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[1340,200],"credentials":{"httpHeaderAuth":{"id":"","name":"Filtrat API"}},"retryOnFail":true,"maxTries":3,"waitBetweenTries":3000,"onError":"continueRegularOutput"},{"parameters":{"amount":1,"unit":"seconds"},"id":"wait-rate-limit","name":"Wait 1s","type":"n8n-nodes-base.wait","typeVersion":1.1,"position":[1560,200]},{"parameters":{"operation":"append","documentId":{"__rl":true,"mode":"id","value":""},"sheetName":{"__rl":true,"mode":"name","value":"Results"},"columns":{"mappingMode":"defineBelow","value":{"first_name":"={{ $('Loop Over Contacts').item.json.first_name }}","last_name":"={{ $('Loop Over Contacts').item.json.last_name }}","domain":"={{ $('Loop Over Contacts').item.json.domain }}","found_email":"={{ $('Find Email').item.json.found_email || '' }}","status":"={{ $('Find Email').item.json.status }}","confidence":"={{ $('Find Email').item.json.confidence || '' }}"}},"options":{}},"id":"write-results","name":"Write Results","type":"n8n-nodes-base.googleSheets","typeVersion":4.5,"position":[1780,200],"credentials":{"googleSheetsOAuth2Api":{"id":"","name":"Google Sheets"}}},{"parameters":{"errorMessage":"={{ 'Insufficient Filtrat credits. Need ~' + ($('Read Contacts').all().length * 20) + ' credits for ' + $('Read Contacts').all().length + ' contacts. Balance: ' + $json.total_balance + '. Top up at app.filtrat.io.' }}"},"id":"error-low-credits","name":"Error: Low Credits","type":"n8n-nodes-base.stopAndError","typeVersion":1,"position":[1120,420]},{"parameters":{"content":"## Setup — do this first\n\n1. **Create a Filtrat API credential:**\n   - Go to Credentials → Add Credential → Header Auth\n   - Name: `Filtrat API`\n   - Header Name: `Authorization`\n   - Header Value: `Bearer ak_your_key_here`\n   - Get your key in filtrat on API → API keys: [filtrat.io/app/api?tab=keys](https://filtrat.io/app/api?tab=keys)\n\n2. **Connect Google Sheets credential:**\n   - Go to Credentials → Add Credential → Google Sheets OAuth2\n   - Follow the Google OAuth flow\n\n3. **Set your Spreadsheet ID** in both the \"Read Contacts\" and \"Write Results\" nodes\n   - Open your spreadsheet → copy the ID from the URL\n   - `https://docs.google.com/spreadsheets/d/`**THIS_PART**`/edit`","width":440,"height":380,"color":4},"id":"note-setup","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[220,-160]},{"parameters":{"content":"## Google Sheets format\n\n### Input sheet (\"Sheet1\")\nYour sheet must have these column headers in row 1:\n\n| first_name | last_name | domain |\n|---|---|---|\n| John | Doe | company.com |\n| Jane | Smith | acme.io |\n\nOr use a single `full_name` column instead of first/last:\n\n| full_name | domain |\n|---|---|\n| Dr. John Doe PhD | company.com |\n\nTitles and suffixes are stripped automatically.\n\n### Results sheet (\"Results\")\nCreate a second sheet tab called **Results** with these headers:\n\n| first_name | last_name | domain | found_email | status | confidence |\n|---|---|---|---|---|---|\n\nResults are appended row by row as each contact is processed.","width":440,"height":350,"color":6},"id":"note-sheets","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[680,-160]},{"parameters":{"content":"## Credit costs & rate limits\n\n- **Found** → 20 credits per email; 25 when a catch-all domain is resolved (catch-all detection is free)\n- **Not found** → free\n- Rate limit: the finder allows 200 requests/min; the 1s wait keeps this workflow at about 60\n\nThe workflow checks your balance before starting and estimates worst-case cost (all contacts found). Actual cost will be lower if some are not found.\n\n### Production usage\nReplace Manual Trigger with your own trigger (Schedule, Webhook, etc.). You can also swap Google Sheets for any other data source — just make sure the output has `first_name`, `last_name`, and `domain` fields.","width":400,"height":340,"color":6},"id":"note-costs","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1140,-160]}],"connections":{"Manual Trigger":{"main":[[{"node":"Read Contacts","type":"main","index":0}]]},"Read Contacts":{"main":[[{"node":"Check Balance","type":"main","index":0}]]},"Check Balance":{"main":[[{"node":"Enough Credits?","type":"main","index":0}]]},"Enough Credits?":{"main":[[{"node":"Loop Over Contacts","type":"main","index":0}],[{"node":"Error: Low Credits","type":"main","index":0}]]},"Loop Over Contacts":{"main":[[{"node":"Find Email","type":"main","index":0}],[]]},"Find Email":{"main":[[{"node":"Wait 1s","type":"main","index":0}]]},"Wait 1s":{"main":[[{"node":"Write Results","type":"main","index":0}]]},"Write Results":{"main":[[{"node":"Loop Over Contacts","type":"main","index":0}]]}},"pinData":{},"settings":{"executionOrder":"v1"},"staticData":null,"tags":[{"name":"filtrat","id":"filtrat"}],"triggerCount":0,"versionId":"finder-bulk-sheets-v2"}