{"active":false,"connections":{"Compose Email":{"main":[[{"index":0,"node":"Send Email","type":"main"}]]},"Daily Outreach Timer":{"main":[[{"index":0,"node":"Read Unsent Leads","type":"main"}]]},"Mark Lead Sent":{"main":[[{"index":0,"node":"Process Leads One-by-One","type":"main"}]]},"Process Leads One-by-One":{"main":[[],[{"index":0,"node":"Write First Line (AI)","type":"main"}]]},"Read Unsent Leads":{"main":[[{"index":0,"node":"Process Leads One-by-One","type":"main"}]]},"Send Email":{"main":[[{"index":0,"node":"Wait 90 Seconds","type":"main"}]]},"Unsubscribe Webhook":{"main":[[{"index":0,"node":"Mark Opted Out","type":"main"}]]},"Wait 90 Seconds":{"main":[[{"index":0,"node":"Mark Lead Sent","type":"main"}]]},"Write First Line (AI)":{"main":[[{"index":0,"node":"Compose Email","type":"main"}]]}},"meta":{"instanceId":"","templateCredsSetupCompleted":false},"name":"Hyper-Personalized Cold Email Outreach","nodes":[{"id":"d4e5f6a7-3301-4a5b-8c9d-111111111111","name":"Daily Outreach Timer","parameters":{"rule":{"interval":[{"cronExpression":"0 9 * * *","field":"cron"}]}},"position":[240,300],"type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2},{"credentials":{"googleSheetsOAuth2Api":{"id":"","name":"Google Sheets API"}},"id":"d4e5f6a7-3302-4a5b-8c9d-222222222222","name":"Read Unsent Leads","parameters":{"documentId":{"__rl":true,"mode":"id","value":"YOUR_SPREADSHEET_ID"},"filtersUI":{"values":[{"lookupColumn":"status","lookupValue":"unsent"}]},"operation":"read","options":{},"resource":"sheetWithinDocument","sheetName":{"__rl":true,"cachedResultName":"Leads","mode":"list","value":"Leads"}},"position":[480,300],"type":"n8n-nodes-base.googleSheets","typeVersion":4.5},{"id":"d4e5f6a7-3303-4a5b-8c9d-333333333333","name":"Process Leads One-by-One","parameters":{"batchSize":1,"options":{}},"position":[720,300],"type":"n8n-nodes-base.splitInBatches","typeVersion":3},{"credentials":{"openAiApi":{"id":"","name":"OpenAI API"}},"id":"d4e5f6a7-3304-4a5b-8c9d-444444444444","name":"Write First Line (AI)","parameters":{"messages":{"values":[{"content":"You write hyper-personalized cold email openers. Rules: 1-2 sentences, reference something specific about the lead, no flattery, no exclamation marks, plain text, never use placeholders like [Name]. Output only the opener, nothing else.","role":"system"},{"content":"=Lead: {{ $('Read Unsent Leads').item.json.first_name }} {{ $('Read Unsent Leads').item.json.last_name }}, {{ $('Read Unsent Leads').item.json.role }} at {{ $('Read Unsent Leads').item.json.company }}. Recent activity: {{ $('Read Unsent Leads').item.json.recent_post }}.","role":"user"}]},"model":{"__rl":true,"cachedResultName":"gpt-4o-mini","mode":"list","value":"gpt-4o-mini"},"operation":"message","options":{},"resource":"text"},"position":[960,300],"type":"n8n-nodes-base.openAi","typeVersion":1},{"id":"d4e5f6a7-3305-4a5b-8c9d-555555555555","name":"Compose Email","parameters":{"assignments":{"assignments":[{"id":"d4e5f6a7-33a1-4a5b-8c9d-a1a1a1a1a1a1","name":"to","type":"string","value":"={{ $('Read Unsent Leads').item.json.email }}"},{"id":"d4e5f6a7-33a2-4a5b-8c9d-a2a2a2a2a2a2","name":"subject","type":"string","value":"={{ 'Quick idea for ' + $('Read Unsent Leads').item.json.company }}"},{"id":"d4e5f6a7-33a3-4a5b-8c9d-a3a3a3a3a3a3","name":"body","type":"string","value":"={{ '<p>Hi ' + $('Read Unsent Leads').item.json.first_name + ',</p><p>' + $json.choices[0].message.content + '</p><p>I help teams automate repetitive outreach without sounding robotic. Open to a 15-minute chat next week?</p><p>Best,<br>Your Name<br>Your Company</p><p style=\"font-size:12px;color:#888;\">No longer interested? <a href=\"https://yourdomain.com/unsubscribe?email=' + $('Read Unsent Leads').item.json.email + '\">Unsubscribe</a> — one click, no login required.</p>' }}"}]},"include":"none","options":{}},"position":[1200,300],"type":"n8n-nodes-base.set","typeVersion":3.4},{"credentials":{"gmailOAuth2":{"id":"","name":"Gmail API"}},"id":"d4e5f6a7-3306-4a5b-8c9d-666666666666","name":"Send Email","parameters":{"emailType":"html","message":"={{ $json.body }}","operation":"send","options":{"appendAttribution":false},"resource":"message","sendTo":"={{ $json.to }}","subject":"={{ $json.subject }}"},"position":[1440,300],"type":"n8n-nodes-base.gmail","typeVersion":2.1},{"id":"d4e5f6a7-3307-4a5b-8c9d-777777777777","name":"Wait 90 Seconds","parameters":{"amount":90,"resume":"afterTimeInterval","unit":"seconds"},"position":[1680,300],"type":"n8n-nodes-base.wait","typeVersion":1.1},{"credentials":{"googleSheetsOAuth2Api":{"id":"","name":"Google Sheets API"}},"id":"d4e5f6a7-3308-4a5b-8c9d-888888888888","name":"Mark Lead Sent","parameters":{"columns":{"mappingMode":"defineBelow","matchingColumns":["email"],"schema":[{"canBeUsedToMatch":true,"defaultMatch":true,"display":true,"displayName":"email","id":"email","removed":false,"required":false,"type":"string"},{"canBeUsedToMatch":true,"defaultMatch":false,"display":true,"displayName":"status","id":"status","removed":false,"required":false,"type":"string"}],"value":{"email":"={{ $('Read Unsent Leads').item.json.email }}","status":"sent"}},"documentId":{"__rl":true,"mode":"id","value":"YOUR_SPREADSHEET_ID"},"operation":"update","options":{},"resource":"sheetWithinDocument","sheetName":{"__rl":true,"cachedResultName":"Leads","mode":"list","value":"Leads"}},"position":[1920,300],"type":"n8n-nodes-base.googleSheets","typeVersion":4.5},{"id":"d4e5f6a7-3309-4a5b-8c9d-999999999999","name":"Unsubscribe Webhook","parameters":{"httpMethod":"POST","options":{},"path":"cortexflow-unsubscribe"},"position":[240,700],"type":"n8n-nodes-base.webhook","typeVersion":2,"webhookId":"cortexflow-unsubscribe"},{"credentials":{"googleSheetsOAuth2Api":{"id":"","name":"Google Sheets API"}},"id":"d4e5f6a7-3310-4a5b-8c9d-000000000000","name":"Mark Opted Out","parameters":{"columns":{"mappingMode":"defineBelow","matchingColumns":["email"],"schema":[{"canBeUsedToMatch":true,"defaultMatch":true,"display":true,"displayName":"email","id":"email","removed":false,"required":false,"type":"string"},{"canBeUsedToMatch":true,"defaultMatch":false,"display":true,"displayName":"status","id":"status","removed":false,"required":false,"type":"string"}],"value":{"email":"={{ $json.query.email }}","status":"opted-out"}},"documentId":{"__rl":true,"mode":"id","value":"YOUR_SPREADSHEET_ID"},"operation":"update","options":{},"resource":"sheetWithinDocument","sheetName":{"__rl":true,"cachedResultName":"Leads","mode":"list","value":"Leads"}},"position":[480,700],"type":"n8n-nodes-base.googleSheets","typeVersion":4.5},{"id":"d4e5f6a7-3311-4a5b-8c9d-000000000001","name":"Sticky Note","parameters":{"color":4,"content":"## Hyper-Personalized Cold Email Outreach\n\n**Setup:**\n1. Build your lead sheet with columns: email, first_name, last_name, company, role, recent_post, status. ONLY use contacts you have permission to email.\n2. Create a **Google Sheets** credential; select your spreadsheet + Leads sheet in *Read Unsent Leads* and *Mark Lead Sent*. The read filters status=unsent — keep at most 20 unsent rows queued per day so sends stay paced.\n3. Create a **Gmail** credential (OAuth); select it in *Send Email*.\n4. Create an **OpenAI** credential; select it in *Write First Line (AI)*.\n5. In *Compose Email* replace https://yourdomain.com/unsubscribe with your real one-click unsubscribe URL (must work without a login).\n6. Point that unsubscribe link at the *Unsubscribe Webhook* URL with ?email=... appended — it flips the lead to opted-out so they are never emailed again.\n7. Activate. YOU monitor replies — any reply means a human takes over; the workflow never auto-replies to responses.\n\n**Compliance:** only email people you may legally contact; always include the working unsubscribe link; honor opt-outs immediately (CAN-SPAM / GDPR). This template gives you the mechanics — the list is your responsibility.\n\n**How it works:** Daily 9am -> read unsent leads -> loop one-by-one: AI writes a personalized opener -> email composed -> sent via Gmail -> 90s pause -> marked sent -> next lead.","height":460,"width":480},"position":[160,-80],"type":"n8n-nodes-base.stickyNote","typeVersion":1}],"pinData":{},"settings":{"executionOrder":"v1"},"tags":[{"name":"cortexflow-template"}],"versionId":"cortexflow-cold-email-outreach-automation-v1"}