From 25fbd753082c88d3347e5f71017e288f25615001 Mon Sep 17 00:00:00 2001 From: nusquama Date: Tue, 25 Nov 2025 10:37:53 +0100 Subject: [PATCH] creation --- ...lead_outreach_tracking_with_gmail_gpt-4_email_sequencing.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 workflows/AI-Powered Lead Outreach & Tracking with Gmail, GPT-4 & Email Sequencing-10948/ai-powered_lead_outreach_tracking_with_gmail_gpt-4_email_sequencing.json diff --git a/workflows/AI-Powered Lead Outreach & Tracking with Gmail, GPT-4 & Email Sequencing-10948/ai-powered_lead_outreach_tracking_with_gmail_gpt-4_email_sequencing.json b/workflows/AI-Powered Lead Outreach & Tracking with Gmail, GPT-4 & Email Sequencing-10948/ai-powered_lead_outreach_tracking_with_gmail_gpt-4_email_sequencing.json new file mode 100644 index 000000000..c009933bb --- /dev/null +++ b/workflows/AI-Powered Lead Outreach & Tracking with Gmail, GPT-4 & Email Sequencing-10948/ai-powered_lead_outreach_tracking_with_gmail_gpt-4_email_sequencing.json @@ -0,0 +1 @@ +{"id":"C7wEtrTBgzELOlo8","meta":{"instanceId":"c91c5b6efe2709e07c37996245857ac5d863d575d07e0072127351337c204c40","templateCredsSetupCompleted":true},"name":"003-Auto Lead Follow Up and Qualification 2","tags":[{"id":"2V3HXFbv2wqNGm6s","name":"Dev","createdAt":"2025-06-17T05:42:41.949Z","updatedAt":"2025-06-17T05:42:41.949Z"}],"nodes":[{"id":"48285051-bb2e-4e5a-97c0-674ba9b2369e","name":"Send a message","type":"n8n-nodes-base.gmail","position":[400,592],"webhookId":"3e601c6c-72f9-4693-bb9b-30810f95f781","parameters":{"sendTo":"={{ $('Loop Over Items').item.json.Email }}","message":"={{ $('AI Agent').item.json.output.body }}\n{{ $json.trackingImage }}","options":{"appendAttribution":false},"subject":"={{ $('AI Agent').item.json.output.subject }}"},"credentials":{"gmailOAuth2":{"id":"lKNxzCikIoCJesk8","name":"Gmail account 10 - (DEV)"}},"typeVersion":2.1},{"id":"72e333c6-0dfb-41d1-934f-39d04036b8ba","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-176,592],"parameters":{"text":"=You are an expert email copywriter for iTechNotion. \nGenerate a warm, professional, and friendly cold outreach email subject and HTML body for a lead from our database.\n\nLead Data: \n- Lead Number: {{ $json.Number }} \n- Lead Name: {{ $json['Name '] }} \n- Lead Email: {{ $json.Email }}\n\nRequirements: \n1. Produce a concise email subject (5–8 words) that is professional and relevant (e.g., \"Quick Hello from iTechNotion Team\"). \n2. Produce the email body as clean HTML using only

and
tags. \n3. Body must start with:

Hi {{ $json['Name '] }},

\n4. Body should contain 3–4 short paragraphs with a warm, conversational, helpful, and non-pushy tone. \n5. Use this opening line: \n \"I hope you're doing well. I'm reaching out from iTechNotion as we noticed you in our network and wanted to reconnect and understand how we can support your upcoming initiatives.\" \n6. Briefly introduce our services in one sentence: AI Automation, mobile app development, web development, cloud solutions, and custom software development. \n7. Emphasize that we’d love to understand their goals or challenges and explore whether our team can assist. \n8. Invite them to share anything they’re currently working on or planning. \n9. End with this signature in its own

tag: \n

Best regards,
iTechNotion Team

\n10. DO NOT include , , , or any CSS. \n11. RETURN ONLY a single-line JSON object with exactly two keys: \"subject\" and \"body\". \n12. The \"body\" value must be a single-line string containing the HTML (no newline characters, no \\n). \n13. Do NOT output any explanation, notes, or formatting outside the one-line JSON.\n\nExample format (single line): \n{\"subject\":\"\",\"body\":\"

Hi Name,

...

Best regards,
iTechNotion Team

\"}","options":{},"promptType":"define","hasOutputParser":true},"typeVersion":2.2},{"id":"e54d6c06-c209-4eb5-a781-968c798c65b6","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-208,768],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4.1-mini"},"options":{}},"credentials":{"openAiApi":{"id":"N5q0rQ3pRpLiTkA9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"2a54ff42-75d8-43ae-84f5-6a26a5a379b9","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[-16,768],"parameters":{"jsonSchemaExample":"{\n\t\"subject\": \"\",\n\t\"body\": \"\"\n}"},"typeVersion":1.3},{"id":"864c8f4c-03c8-4977-98de-aefadde6c3d7","name":"Generates Tracking ID","type":"n8n-nodes-base.httpRequest","position":[176,592],"parameters":{"url":"https://api.inboxpl.us/user-emails/n8n/tracking-id","method":"POST","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"api_key","value":"ITN-8gq5W7B2bzWWMkM9wB-JSrD-z3sE3tWV50dzHCoTLfI"}]}},"typeVersion":4.2},{"id":"07ba0db0-7fc0-414f-98dc-517b03fdeaaa","name":"Fetches Email Data","type":"n8n-nodes-base.gmail","position":[624,592],"webhookId":"69e05d49-bd30-4770-bbd4-6fc57b0e878c","parameters":{"messageId":"={{ $json.id }}","operation":"get"},"credentials":{"gmailOAuth2":{"id":"lKNxzCikIoCJesk8","name":"Gmail account 10 - (DEV)"}},"typeVersion":2.1},{"id":"9c988b5b-4738-417f-bf3f-825e201fee53","name":"Starts Sequence","type":"n8n-nodes-base.httpRequest","position":[848,592],"parameters":{"url":"https://api.inboxpl.us/user-emails/n8n","method":"POST","options":{},"sendBody":true,"sendHeaders":true,"bodyParameters":{"parameters":[{"name":"recipient_email","value":"={{ $json.To }}"},{"name":"subject","value":"={{ $json.Subject }}"},{"name":"threadId","value":"={{ $json.threadId }}"},{"name":"message_id","value":"={{ $json.id }}"},{"name":"sender_email","value":"={{ $json.From }}"},{"name":"tracking_id","value":"={{ $('Generates Tracking ID').item.json.trackingId }}"},{"name":"sequenceId","value":"Your_Sequence_ID"}]},"headerParameters":{"parameters":[{"name":"api_key","value":"ITN-8gq5W7B2bzWWMkM9wB-JSrD-z3sE3tWV50dzHCoTLfI"}]}},"typeVersion":4.2,"alwaysOutputData":true},{"id":"2f5a0944-ca13-4f48-b12f-b64803bd65d2","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-880,320],"parameters":{"color":7,"width":976,"height":688,"content":"## Step 1: Get rows & Loop \nReads rows with Status = \"Pending\" from Google Sheets and splits them into individual items to process one-by-one.\n"},"typeVersion":1},{"id":"fe760d82-411c-420f-8ff5-da37f280537a","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[112,320],"parameters":{"color":7,"width":432,"height":688,"content":"## Step 2: AI Email & Tracking ID \nAI Agent (with OpenAI + parser) creates the subject and HTML body. A tracking ID is generated via InboxPlus and attached to the outgoing message.\n"},"typeVersion":1},{"id":"1a6f5342-a253-46ca-acc5-c0c05d1eb9fb","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[576,320],"parameters":{"color":7,"width":656,"height":688,"content":"## Step 3: Send, Fetch & Start Tracking \nSends email with Gmail, fetches the sent message details, then calls InboxPlus to start the tracking sequence and updates the sheet row to \"Done\".\n"},"typeVersion":1},{"id":"10b3ba26-0766-46ac-a435-40ff8d13e1c9","name":"Append or update row in sheet","type":"n8n-nodes-base.googleSheets","position":[1072,720],"parameters":{"columns":{"value":{"Email":"={{ $('Loop Over Items').item.json.Email }}","Name ":"={{ $('Loop Over Items').item.json[\"Name \"] }}","Number":"={{ $('Loop Over Items').item.json.Number }}","Status":"Done","Message":"={{ $('Loop Over Items').item.json.Message }}"},"schema":[{"id":"Name ","type":"string","display":true,"required":false,"displayName":"Name ","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Email","type":"string","display":true,"removed":false,"required":false,"displayName":"Email","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Number","type":"string","display":true,"required":false,"displayName":"Number","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Message","type":"string","display":true,"required":false,"displayName":"Message","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Status","type":"string","display":true,"required":false,"displayName":"Status","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["Email"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"appendOrUpdate","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16vN03K8d0zjNpmMORi26Bu_juodIDZdeujzVm0lvz0o/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"16vN03K8d0zjNpmMORi26Bu_juodIDZdeujzVm0lvz0o","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16vN03K8d0zjNpmMORi26Bu_juodIDZdeujzVm0lvz0o/edit?usp=drivesdk","cachedResultName":"Test Sheet Monday Workflow 2"}},"credentials":{"googleSheetsOAuth2Api":{"id":"wlOXumuB0DISq174","name":"Google Sheets account - (DEV)"}},"typeVersion":4.7},{"id":"2b1ccf41-1faa-4468-9a53-da4d351553cc","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-848,720],"parameters":{"rule":{"interval":[{"triggerAtHour":13}]}},"typeVersion":1.2},{"id":"e6bc0e8e-8c29-4a46-9570-b3f71b875c2f","name":"Get row(s) in sheet","type":"n8n-nodes-base.googleSheets","position":[-624,720],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"Pending","lookupColumn":"Status"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16vN03K8d0zjNpmMORi26Bu_juodIDZdeujzVm0lvz0o/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"16vN03K8d0zjNpmMORi26Bu_juodIDZdeujzVm0lvz0o","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16vN03K8d0zjNpmMORi26Bu_juodIDZdeujzVm0lvz0o/edit?usp=drivesdk","cachedResultName":"Test Sheet Monday Workflow 2"}},"credentials":{"googleSheetsOAuth2Api":{"id":"wlOXumuB0DISq174","name":"Google Sheets account - (DEV)"}},"typeVersion":4.7},{"id":"fca10c07-0b47-40ea-95f9-150a3932b724","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[-400,720],"parameters":{"options":{}},"typeVersion":3},{"id":"5d162142-cd21-4be5-8853-dc2e59904662","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-1456,320],"parameters":{"width":496,"height":688,"content":"## Automated Outreach & Email Tracking – Overview \nThis workflow runs daily and sends friendly outreach emails from your spreadsheet. It picks up rows marked \"Pending\", loops through each contact, uses an AI agent to generate a short subject and clean HTML email body, creates a tracking ID, and sends the email via Gmail. After sending, it fetches the sent message details and tells InboxPlus to start the tracking sequence. Finally, the workflow updates the sheet to mark the row as done.\n\n### How it works\n- Runs on schedule and reads pending rows \n- Loops each contact and generates email via AI \n- Creates tracking ID, sends email, fetches sent data \n- Starts tracking sequence and updates the sheet\n\n### Setup steps\n1. Connect Google Sheets, OpenAI, Gmail, and InboxPlus API key \n2. Set schedule time (currently 13:00) \n3. Confirm sheet columns (Email, Name, Number, Message, Status) \n4. Test with one sample row \n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"9bc25fc8-9458-488a-87f6-1f09ee1e3522","connections":{"AI Agent":{"main":[[{"node":"Generates Tracking ID","type":"main","index":0}]]},"Send a message":{"main":[[{"node":"Fetches Email Data","type":"main","index":0}]]},"Loop Over Items":{"main":[[],[{"node":"AI Agent","type":"main","index":0}]]},"Starts Sequence":{"main":[[{"node":"Append or update row in sheet","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Get row(s) in sheet","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Fetches Email Data":{"main":[[{"node":"Starts Sequence","type":"main","index":0}]]},"Get row(s) in sheet":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Generates Tracking ID":{"main":[[{"node":"Send a message","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"AI Agent","type":"ai_outputParser","index":0}]]},"Append or update row in sheet":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]}}} \ No newline at end of file