{"workflow":{"id":14019,"name":"Track menstrual cycles and send Gmail phase reminders with GPT-4o and Google Sheets","views":319,"recentViews":3,"totalViews":319,"createdAt":"2026-03-13T10:42:49.577Z","description":"## 📊 Description\nMost period tracking apps tell you when your period is coming. This workflow goes further — it tracks every phase of every subscriber's unique cycle, sends the right email at exactly the right time, and delivers GPT-4o powered wellness coaching every week tailored to where each woman is in her cycle.\nBuilt for women's health platforms, wellness coaches, femtech creators, and community builders who want to deliver genuinely useful cycle-aware health support at scale without building a custom app.\n\n## What This Workflow Does\n- 📝 Subscribers fill in a simple form — name, email, last period date, and cycle length\n- 🧮 Instantly calculates all key cycle dates — next period, ovulation day, fertile window start and end, and PMS window start\n- 📧 Sends a personalized welcome email with their complete cycle overview\n- 🕐 Runs every morning at 8AM checking all active subscribers\n- 🔍 Detects which phase event is happening today for each subscriber\n- 📬 Sends the right phase-specific reminder email on the exact right day: \n- - 3 days before period — preparation tips\n- - Period start day — comfort and self-care tips\n- - Ovulation day — fertility awareness and energy tips\n- - PMS window start — mood, energy, and boundary tips\n- 🔒 Duplicate send prevention ensures each email type is only sent once per cycle per subscriber\n- 📝 Updates each subscriber's last email sent record after every send\n- 📊 Logs every delivery to Send Log sheet with date, phase, cycle day, and email type\n- 💜 Every Sunday generates a personalized weekly wellness digest for every subscriber using GPT-4o based on their current cycle phase — with energy, nutrition, movement, and mindset tips\n\n## Key Benefits\n✅ Fully automated — set up once and runs forever\n✅ Every subscriber gets emails timed to their unique cycle not a generic schedule\n✅ 4 different phase-specific reminder emails with tailored content and colors\n✅ GPT-4o generates unique wellness tips per phase every week — never repetitive\n✅ Duplicate send prevention — no subscriber ever gets the same email twice in one cycle\n✅ Auto-recalculates cycle dates on period start for continuous tracking\n✅ Full send log for tracking delivery history and engagement patterns\n\n## How It Works\n\nSW1 — Subscriber Intake & Cycle Calculator Subscribers open the form and enter their name, email, last period start date, and average cycle length. The workflow immediately calculates all key dates using standard cycle science — next period is last period plus cycle length, ovulation is next period minus 14 days, fertile window opens 5 days before ovulation and closes 1 day after, and PMS window starts 5 days before the next period. All dates are saved to the Subscribers sheet and a branded welcome email is sent instantly showing the subscriber their complete cycle overview with all dates laid out clearly.\n\nSW2 — Daily Cycle Monitor & Smart Reminders Every morning at 8AM the workflow reads all active subscribers and calculates where each one is in their cycle today. It checks if today matches any of the 4 key trigger dates — 3 days before period, period start, ovulation day, or PMS start. If there is a match it builds the appropriate phase-specific HTML email with tailored tips, colors, and messaging and sends it via Gmail. Before sending it checks the last email sent field to prevent duplicate sends within the same cycle. After every send it updates the subscriber record and logs the delivery to the Send Log sheet.\n\nSW3 — Weekly Wellness Digest Every Sunday at 9AM the workflow reads all active subscribers and calculates each one's current cycle phase — Menstrual, Follicular, Fertile, Ovulation, or PMS. It builds a personalized prompt for each subscriber including their name, phase, cycle day, and days until next period and sends it to GPT-4o. The AI generates phase-specific tips across 5 categories — energy management, nutrition, movement, mindset, and what to expect this week — plus a weekly affirmation. The response is assembled into a branded HTML email where the header color and emoji adapt automatically to the current phase. Every send is logged to the Send Log sheet.\n\n## Features\n- n8n Form intake — no external form tool needed\n- Automatic cycle date calculation from last period and cycle length\n- 4 phase-specific trigger emails with unique content per phase\n- Duplicate send prevention per cycle per subscriber\n- Phase detection engine covering all 5 cycle phases\n- GPT-4o weekly wellness coaching per phase\n- Phase-adaptive email colors and emojis\n- 5 wellness categories per digest — energy, nutrition, movement, mindset, what to expect\n- Weekly affirmation generated per phase\n- Full delivery logging to Send Log sheet\n- Active subscriber filtering — easy to pause or deactivate users\n\n## Requirements\n- OpenAI API key (GPT-4o access)\n- Google Sheets OAuth2 connection\n- Gmail OAuth2 connection\n- A configured Google Sheet with 2 sheets — Subscribers and Send Log\n\n## Setup Steps\n- Create a Google Sheet called \"Period Health Tracker\" with 2 sheets — Subscribers and Send Log\n- Paste your Sheet ID into all Google Sheets nodes\n- Connect your Google Sheets OAuth2 credentials\n- Add your OpenAI API key to the GPT-4o node\n- Connect your Gmail OAuth2 credentials\n\n## Target Audience\n🌸 Women's health and wellness platforms delivering cycle-aware content\n💼 Femtech creators building automated health tracking without a custom app\n🧘 Wellness coaches who want to deliver personalized cycle coaching at scale\n🤖 Automation agencies building health and wellness products for women's communities\n","workflow":{"id":"d3RJdXx9kS9rjU5x","meta":{"instanceId":"8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177","templateCredsSetupCompleted":true},"name":"AI-Powered Menstrual Cycle Tracker With Personalized Phase Reminders and Weekly Wellness Coaching","tags":[],"nodes":[{"id":"679a5cab-eb40-461f-b221-8c4702acdc2c","name":"Calculate Cycle Dates","type":"n8n-nodes-base.code","position":[-112,-16],"parameters":{"jsCode":"const name = $input.first().json['Full Name'] || '';\nconst email = $input.first().json['Email Address'] || '';\nconst lastPeriodRaw = $input.first().json['Last Period Start Date'] || '';\nconst cycleLength = parseInt($input.first().json['Cycle Length (days)']) || 28;\n\nconst lastPeriod = new Date(lastPeriodRaw);\n\n// Core cycle calculations\nconst nextPeriod = new Date(lastPeriod);\nnextPeriod.setDate(nextPeriod.getDate() + cycleLength);\n\nconst ovulationDate = new Date(nextPeriod);\novulationDate.setDate(ovulationDate.getDate() - 14);\n\nconst fertileStart = new Date(ovulationDate);\nfertileStart.setDate(fertileStart.getDate() - 5);\n\nconst fertileEnd = new Date(ovulationDate);\nfertileEnd.setDate(fertileEnd.getDate() + 1);\n\nconst pmsStart = new Date(nextPeriod);\npmsStart.setDate(pmsStart.getDate() - 5);\n\n// Format dates as YYYY-MM-DD\nconst fmt = d => d.toISOString().split('T')[0];\n\nreturn [{\n  json: {\n    name,\n    email,\n    last_period_date: fmt(lastPeriod),\n    cycle_length: cycleLength,\n    subscribed_date: fmt(new Date()),\n    next_period: fmt(nextPeriod),\n    ovulation_date: fmt(ovulationDate),\n    fertile_start: fmt(fertileStart),\n    fertile_end: fmt(fertileEnd),\n    pms_start: fmt(pmsStart),\n    last_email_sent: '',\n    active: 'true'\n  }\n}];"},"typeVersion":2},{"id":"a5a8ca61-18b8-452c-a291-5ec7c510c2af","name":"Build Welcome Email","type":"n8n-nodes-base.code","position":[304,-16],"parameters":{"jsCode":"const data = $input.first().json;\n\nconst htmlEmail = `<!DOCTYPE html>\n<html>\n<head>\n  <style>\n    body { font-family: Arial, sans-serif; background: #fff0f7; margin: 0; padding: 0; }\n    .container { max-width: 600px; margin: 30px auto; background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }\n    .header { background: linear-gradient(135deg, #e91e8c, #f06292); padding: 30px; text-align: center; color: white; }\n    .header h1 { margin: 0; font-size: 24px; }\n    .body { padding: 30px; color: #333; }\n    .date-card { background: #fff0f7; border-left: 4px solid #e91e8c; padding: 14px 18px; border-radius: 8px; margin: 12px 0; }\n    .date-label { font-weight: bold; color: #e91e8c; font-size: 13px; text-transform: uppercase; }\n    .date-value { font-size: 16px; margin-top: 4px; }\n    .footer { background: #fff0f7; padding: 16px; text-align: center; font-size: 12px; color: #999; }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <div class=\"header\">\n      <h1>🌸 Welcome to Cycle Wellness</h1>\n    </div>\n    <div class=\"body\">\n      <p>Hi ${data.name} 👋</p>\n      <p>You're all set! Here's your personalized cycle overview based on the information you provided:</p>\n\n      <div class=\"date-card\">\n        <div class=\"date-label\">🩸 Next Period</div>\n        <div class=\"date-value\">${data.next_period}</div>\n      </div>\n      <div class=\"date-card\">\n        <div class=\"date-label\">🥚 Ovulation Day</div>\n        <div class=\"date-value\">${data.ovulation_date}</div>\n      </div>\n      <div class=\"date-card\">\n        <div class=\"date-label\">💚 Fertile Window</div>\n        <div class=\"date-value\">${data.fertile_start} → ${data.fertile_end}</div>\n      </div>\n      <div class=\"date-card\">\n        <div class=\"date-label\">😮‍💨 PMS Window Starts</div>\n        <div class=\"date-value\">${data.pms_start}</div>\n      </div>\n\n      <p style=\"margin-top: 24px;\">You'll receive timely reminders before each phase — period incoming alerts, ovulation notifications, PMS prep tips, and weekly wellness emails to support you through every stage of your cycle.</p>\n      <p>💜 Take care of yourself — you've got this.</p>\n    </div>\n    <div class=\"footer\">You subscribed to Cycle Wellness reminders.<br/>Reply STOP to unsubscribe.</div>\n  </div>\n</body>\n</html>`;\n\nreturn [{\n  json: {\n    ...data,\n    htmlEmail,\n    subject: `🌸 Welcome ${data.name} — Your Cycle Overview is Ready`\n  }\n}];"},"typeVersion":2},{"id":"2869a51e-4fbe-4dd3-b7bf-3b529555c63e","name":"Send Welcome Email","type":"n8n-nodes-base.gmail","position":[512,-16],"webhookId":"1dcc58a9-5418-494b-845d-2e2cc0c01913","parameters":{"sendTo":"={{ $json.email  }}","message":"={{ $json.htmlEmail }}","options":{},"subject":"={{ $json.subject }}"},"credentials":{"gmailOAuth2":{"id":"gEIaWCTvGfYjMSb3","name":"Gmail credentials"}},"typeVersion":2.2},{"id":"e0eeb76d-dba1-4564-ad8a-334f5ad364a1","name":"Daily 8AM Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-400,320],"parameters":{"rule":{"interval":[{"triggerAtHour":8}]}},"typeVersion":1.3},{"id":"d7c87250-1136-4b92-982a-a3388c0facfb","name":"Build Reminder Email","type":"n8n-nodes-base.code","position":[752,304],"parameters":{"jsCode":"const data = $input.first().json;\n\nconst emailTemplates = {\n  period_incoming: {\n    subject: `🔴 Heads Up ${data.name} — Your Period is Coming in 3 Days`,\n    heading: '🔴 Period Incoming',\n    color1: '#c0392b',\n    color2: '#e74c3c',\n    intro: `Your period is expected to start in 3 days on <strong>${data.nextPeriodStr}</strong>. Now is a great time to prepare.`,\n    tips: [\n      '🛍️ Stock up on pads, tampons, or your preferred products',\n      '💊 If you experience cramps, consider having pain relief on hand',\n      '🍫 Reduce caffeine and salty foods to minimize bloating',\n      '🧘 Light stretching or yoga can help ease incoming discomfort',\n      '😴 Prioritize sleep over the next few nights'\n    ],\n    closing: 'Listen to your body over the next few days. Rest when you need to. 💜'\n  },\n  period_start: {\n    subject: `🩸 Your Period Has Started — Self-Care Tips for ${data.name}`,\n    heading: '🩸 Your Period Has Started',\n    color1: '#922b21',\n    color2: '#c0392b',\n    intro: `Your period is here. Be gentle with yourself today and over the coming days.`,\n    tips: [\n      '🌡️ A hot water bottle on your lower abdomen can ease cramps',\n      '💧 Stay hydrated — aim for at least 8 glasses of water today',\n      '🥗 Iron-rich foods like spinach and lentils help replenish what you lose',\n      '🚶 Light walks can improve circulation and reduce pain',\n      '📵 It is okay to say no to things today — rest is productive'\n    ],\n    closing: 'You handle this every month. You are stronger than you think. 🌸'\n  },\n  ovulation: {\n    subject: `🥚 Ovulation Window Alert for ${data.name}`,\n    heading: '🥚 You Are in Your Ovulation Window',\n    color1: '#1a7a4a',\n    color2: '#27ae60',\n    intro: `Today is your ovulation day. Your fertile window runs from <strong>${data.fertileStartStr}</strong> to <strong>${data.fertileEndStr}</strong>.`,\n    tips: [\n      '⚡ Energy levels are often highest during ovulation — use this time well',\n      '💪 This is a great phase for high intensity workouts',\n      '🗣️ Many women feel more confident and social during ovulation',\n      '🧠 Cognitive sharpness tends to peak — great time for presentations or decisions',\n      '💤 Some women experience mild ovulation pain — this is normal'\n    ],\n    closing: 'Your body is working exactly as it should. Stay in tune with it. 💚'\n  },\n  pms_prep: {\n    subject: `😮‍💨 PMS Window Starting Soon — Tips for ${data.name}`,\n    heading: '😮‍💨 PMS Window is Starting',\n    color1: '#6c3483',\n    color2: '#8e44ad',\n    intro: `Your PMS window starts today and runs until your period on <strong>${data.nextPeriodStr}</strong>. A little preparation goes a long way.`,\n    tips: [\n      '🧘 Reduce stress with meditation, journaling, or gentle movement',\n      '🍬 Cravings are normal — satisfy them mindfully without guilt',\n      '📵 Set boundaries this week — protect your energy',\n      '😴 Sleep at least 7-8 hours to help regulate mood',\n      '💬 Let someone close to you know you might need extra support'\n    ],\n    closing: 'PMS is real and valid. Take care of yourself without apology. 💜'\n  }\n};\n\nconst template = emailTemplates[data.emailType];\nconst tipsList = template.tips.map(t => `<li style=\"margin-bottom: 10px;\">${t}</li>`).join('');\n\nconst htmlEmail = `<!DOCTYPE html>\n<html>\n<head>\n  <style>\n    body { font-family: Arial, sans-serif; background: #fff0f7; margin: 0; padding: 0; }\n    .container { max-width: 600px; margin: 30px auto; background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }\n    .header { background: linear-gradient(135deg, ${template.color1}, ${template.color2}); padding: 30px; text-align: center; color: white; }\n    .header h1 { margin: 0; font-size: 22px; }\n    .body { padding: 30px; color: #333; }\n    .tip-box { background: #fff0f7; border-left: 4px solid ${template.color1}; padding: 16px 20px; border-radius: 8px; margin: 20px 0; }\n    .footer { background: #fff0f7; padding: 16px; text-align: center; font-size: 12px; color: #999; }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <div class=\"header\">\n      <h1>${template.heading}</h1>\n    </div>\n    <div class=\"body\">\n      <p>Hi ${data.name} 👋</p>\n      <p>${template.intro}</p>\n      <div class=\"tip-box\">\n        <strong>💡 Tips for Today:</strong>\n        <ul style=\"padding-left: 20px; margin-top: 12px;\">\n          ${tipsList}\n        </ul>\n      </div>\n      <p>${template.closing}</p>\n      <p style=\"font-size: 13px; color: #888;\">📅 Cycle Day ${data.cycleDay} &nbsp;|&nbsp; Phase: ${data.phase}</p>\n    </div>\n    <div class=\"footer\">You subscribed to Cycle Wellness reminders.<br/>Reply STOP to unsubscribe.</div>\n  </div>\n</body>\n</html>`;\n\nreturn [{\n  json: {\n    ...data,\n    htmlEmail,\n    subject: template.subject\n  }\n}];"},"typeVersion":2},{"id":"baa29ebc-f4db-4ca3-a1ec-1fa0e2a0db88","name":"Send Reminder Email","type":"n8n-nodes-base.gmail","position":[960,304],"webhookId":"1dcc58a9-5418-494b-845d-2e2cc0c01913","parameters":{"sendTo":"={{ $json.email}}","message":"={{ $json.htmlEmail }}","options":{},"subject":"={{ $json.subject }}"},"credentials":{"gmailOAuth2":{"id":"gEIaWCTvGfYjMSb3","name":"Gmail credentials"}},"typeVersion":2.2},{"id":"741fc1fb-e0b8-41dd-a95f-762816416ca4","name":"Log to Send Log","type":"n8n-nodes-base.googleSheets","position":[1392,304],"parameters":{"columns":{"value":{"date":"={{ new Date().toISOString().split('T')[0] }}","name":"={{ $('Build Reminder Email').item.json.name }}","email":"={{ $json.email }}","phase":"={{ $('Build Reminder Email').item.json.phase }}","subject":"={{ $('Build Reminder Email').item.json.subject }}","cycle_day":"={{ $('Build Reminder Email').item.json.cycleDay }}","email_type":"={{ $('Build Reminder Email').item.json.emailType }}"},"schema":[{"id":"date","type":"string","display":true,"removed":false,"required":false,"displayName":"date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"email","type":"string","display":true,"required":false,"displayName":"email","defaultMatch":false,"canBeUsedToMatch":true},{"id":"name","type":"string","display":true,"required":false,"displayName":"name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"email_type","type":"string","display":true,"removed":false,"required":false,"displayName":"email_type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"cycle_day","type":"string","display":true,"removed":false,"required":false,"displayName":"cycle_day","defaultMatch":false,"canBeUsedToMatch":true},{"id":"phase","type":"string","display":true,"removed":false,"required":false,"displayName":"phase","defaultMatch":false,"canBeUsedToMatch":true},{"id":"subject","type":"string","display":true,"removed":false,"required":false,"displayName":"subject","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":1965817482,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit#gid=1965817482","cachedResultName":"Send Log"},"documentId":{"__rl":true,"mode":"list","value":"16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit?usp=drivesdk","cachedResultName":"Period Health Tracker"}},"credentials":{"googleSheetsOAuth2Api":{"id":"ajCmdXdhjJqZW6RE","name":"automations"}},"typeVersion":4.7},{"id":"dff6bf49-17d0-4a22-866d-8babb2c28e46","name":"Weekly Sunday 9AM Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-400,720],"parameters":{"rule":{"interval":[{"field":"weeks","triggerAtHour":9}]}},"typeVersion":1.3},{"id":"19f3e83e-c717-4928-9956-887873a795c4","name":"Send Wellness Digest","type":"n8n-nodes-base.gmail","position":[1104,720],"webhookId":"1dcc58a9-5418-494b-845d-2e2cc0c01913","parameters":{"sendTo":"={{ $json.email }}","message":"={{ $json.htmlEmail }}","options":{},"subject":"={{ $json.subject }}"},"credentials":{"gmailOAuth2":{"id":"gEIaWCTvGfYjMSb3","name":"Gmail credentials"}},"typeVersion":2.2},{"id":"38e19bed-dd3d-491b-bf97-f0e5bed902ec","name":"Log to Send Log1","type":"n8n-nodes-base.googleSheets","position":[1376,720],"parameters":{"columns":{"value":{"date":"={{ new Date().toISOString().split('T')[0] }}","name":"={{ $('Parse & Build Wellness Email').item.json.name }}","email":"={{ $('Parse & Build Wellness Email').item.json.email }}","phase":"={{ $('Parse & Build Wellness Email').item.json.phase }}","subject":"={{ $('Parse & Build Wellness Email').item.json.subject }}","cycle_day":"={{ $('Parse & Build Wellness Email').item.json.cycleDay }}","email_type":"=weekly_digest"},"schema":[{"id":"date","type":"string","display":true,"removed":false,"required":false,"displayName":"date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"email","type":"string","display":true,"required":false,"displayName":"email","defaultMatch":false,"canBeUsedToMatch":true},{"id":"name","type":"string","display":true,"required":false,"displayName":"name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"email_type","type":"string","display":true,"removed":false,"required":false,"displayName":"email_type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"cycle_day","type":"string","display":true,"removed":false,"required":false,"displayName":"cycle_day","defaultMatch":false,"canBeUsedToMatch":true},{"id":"phase","type":"string","display":true,"removed":false,"required":false,"displayName":"phase","defaultMatch":false,"canBeUsedToMatch":true},{"id":"subject","type":"string","display":true,"removed":false,"required":false,"displayName":"subject","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":1965817482,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit#gid=1965817482","cachedResultName":"Send Log"},"documentId":{"__rl":true,"mode":"list","value":"16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit?usp=drivesdk","cachedResultName":"Period Health Tracker"}},"credentials":{"googleSheetsOAuth2Api":{"id":"ajCmdXdhjJqZW6RE","name":"automations"}},"typeVersion":4.7},{"id":"0d94d46b-1172-45aa-9d5f-57d10abfeee4","name":"Cycle Wellness Form","type":"n8n-nodes-base.formTrigger","position":[-352,-16],"webhookId":"2d564c97-8de1-45f5-b189-c8e16b1c1e08","parameters":{"options":{},"formTitle":"Period Health & Cycle Wellness","formFields":{"values":[{"fieldLabel":"Full Name","placeholder":"Enter your full name","requiredField":true},{"fieldType":"email","fieldLabel":"Email Address","placeholder":"Enter your email address","requiredField":true},{"fieldType":"date","fieldLabel":"Last Period Start Date","requiredField":true},{"fieldType":"number","fieldLabel":"Cycle Length (days)","placeholder":"28","requiredField":true}]},"formDescription":"Track your cycle and receive personalized health reminders and wellness tips."},"typeVersion":2.3},{"id":"c17d3fc9-5382-4122-865c-0cb63c67104f","name":"Save to Subscribers","type":"n8n-nodes-base.googleSheets","position":[96,-16],"parameters":{"columns":{"value":{"name":"={{ $json.name }}","email":"={{ $json.email }}","active":"={{ $json.active }}","pms_start":"={{ $json.pms_start }}","fertile_end":"={{ $json.fertile_end }}","next_period":"={{ $json.next_period }}","cycle_length":"={{ $json.cycle_length }}","fertile_start":"={{ $json.fertile_start }}","ovulation_date":"={{ $json.ovulation_date }}","last_email_sent":"={{ $json.last_email_sent }}","subscribed_date":"={{ $json.subscribed_date }}","last_period_date":"={{ $json.last_period_date }}"},"schema":[{"id":"name","type":"string","display":true,"required":false,"displayName":"name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"email","type":"string","display":true,"required":false,"displayName":"email","defaultMatch":false,"canBeUsedToMatch":true},{"id":"last_period_date","type":"string","display":true,"required":false,"displayName":"last_period_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"cycle_length","type":"string","display":true,"required":false,"displayName":"cycle_length","defaultMatch":false,"canBeUsedToMatch":true},{"id":"subscribed_date","type":"string","display":true,"required":false,"displayName":"subscribed_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"next_period","type":"string","display":true,"required":false,"displayName":"next_period","defaultMatch":false,"canBeUsedToMatch":true},{"id":"ovulation_date","type":"string","display":true,"required":false,"displayName":"ovulation_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pms_start","type":"string","display":true,"required":false,"displayName":"pms_start","defaultMatch":false,"canBeUsedToMatch":true},{"id":"fertile_start","type":"string","display":true,"required":false,"displayName":"fertile_start","defaultMatch":false,"canBeUsedToMatch":true},{"id":"fertile_end","type":"string","display":true,"required":false,"displayName":"fertile_end","defaultMatch":false,"canBeUsedToMatch":true},{"id":"last_email_sent","type":"string","display":true,"required":false,"displayName":"last_email_sent","defaultMatch":false,"canBeUsedToMatch":true},{"id":"active","type":"string","display":true,"required":false,"displayName":"active","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit#gid=0","cachedResultName":"Subscribers"},"documentId":{"__rl":true,"mode":"list","value":"16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit?usp=drivesdk","cachedResultName":"Period Health Tracker"}},"credentials":{"googleSheetsOAuth2Api":{"id":"ajCmdXdhjJqZW6RE","name":"automations"}},"typeVersion":4.7},{"id":"eb8c683c-422b-4820-9756-8a1aa83adad3","name":"Read All Subscribers","type":"n8n-nodes-base.googleSheets","position":[-176,320],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit#gid=0","cachedResultName":"Subscribers"},"documentId":{"__rl":true,"mode":"list","value":"16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit?usp=drivesdk","cachedResultName":"Period Health Tracker"}},"credentials":{"googleSheetsOAuth2Api":{"id":"ajCmdXdhjJqZW6RE","name":"automations"}},"typeVersion":4.7},{"id":"611b0434-0ad5-45e6-8e70-1ff8c1529154","name":"Filter Active Subscribers","type":"n8n-nodes-base.filter","position":[80,320],"parameters":{"options":{},"conditions":{"options":{"version":3,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"ca26b90f-cfb2-4726-b916-8eb953340507","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{ $json.active }}","rightValue":"="}]}},"typeVersion":2.3},{"id":"10f858df-f10e-4a96-9b5b-ee59328a80a8","name":"Calculate Today's Phase","type":"n8n-nodes-base.code","position":[288,320],"parameters":{"jsCode":"const today = new Date();\ntoday.setHours(0, 0, 0, 0);\nconst fmt = d => new Date(d).toISOString().split('T')[0];\nconst todayStr = fmt(today);\n\nconst results = [];\n\nfor (const item of $input.all()) {\n  const u = item.json;\n\n  const nextPeriod = new Date(u.next_period);\n  const ovulationDate = new Date(u.ovulation_date);\n  const fertileStart = new Date(u.fertile_start);\n  const fertileEnd = new Date(u.fertile_end);\n  const pmsStart = new Date(u.pms_start);\n  const lastPeriod = new Date(u.last_period_date);\n\n  // Set all to midnight for clean comparison\n  [nextPeriod, ovulationDate, fertileStart, fertileEnd, pmsStart, lastPeriod].forEach(d => d.setHours(0,0,0,0));\n\n  // Calculate cycle day\n  const cycleDay = Math.floor((today - lastPeriod) / 86400000) + 1;\n\n  // 3 days before period\n  const threeDaysBefore = new Date(nextPeriod);\n  threeDaysBefore.setDate(threeDaysBefore.getDate() - 3);\n  threeDaysBefore.setHours(0,0,0,0);\n\n  // Determine what to send today\n  let emailType = null;\n\n  if (fmt(today) === fmt(nextPeriod)) {\n    emailType = 'period_start';\n  } else if (fmt(today) === fmt(threeDaysBefore)) {\n    emailType = 'period_incoming';\n  } else if (fmt(today) === fmt(ovulationDate)) {\n    emailType = 'ovulation';\n  } else if (fmt(today) === fmt(pmsStart)) {\n    emailType = 'pms_prep';\n  }\n\n  // Determine current phase label\n  let phase = 'Follicular';\n  if (today >= pmsStart && today < nextPeriod) phase = 'PMS';\n  else if (today >= nextPeriod && cycleDay <= 5) phase = 'Menstrual';\n  else if (today >= fertileStart && today <= fertileEnd) phase = 'Fertile';\n  else if (fmt(today) === fmt(ovulationDate)) phase = 'Ovulation';\n\n  // Skip if no email to send today\n  if (!emailType) continue;\n\n  // Skip if this email type already sent this cycle\n  const lastSent = u.last_email_sent || '';\n  if (lastSent.includes(`${emailType}_${u.next_period}`)) continue;\n\n  results.push({\n    json: {\n      ...u,\n      today: todayStr,\n      cycleDay,\n      phase,\n      emailType,\n      nextPeriodStr: fmt(nextPeriod),\n      ovulationStr: fmt(ovulationDate),\n      fertileStartStr: fmt(fertileStart),\n      fertileEndStr: fmt(fertileEnd),\n      pmsStartStr: fmt(pmsStart)\n    }\n  });\n}\n\nreturn results.length > 0 ? results : [{ json: { skip: true } }];"},"typeVersion":2},{"id":"048ff18a-cee7-442f-8cb9-0a284da42a4e","name":"IF Email to Send","type":"n8n-nodes-base.if","position":[496,320],"parameters":{"options":{},"conditions":{"options":{"version":3,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"fed2911d-b2b6-4a70-a274-48a65ac8ada7","operator":{"type":"string","operation":"notEquals"},"leftValue":"={{ $json.skip }}","rightValue":"true"}]}},"typeVersion":2.3},{"id":"28ffc1f6-b3cb-4544-aa7b-b85f56e36c5a","name":"Update Last Email Sent","type":"n8n-nodes-base.googleSheets","position":[1184,304],"parameters":{"columns":{"value":{"email":"={{ $('Build Reminder Email').item.json.email }}","last_email_sent":"={{ $('Build Reminder Email').item.json.emailType + '_' + $('Build Reminder Email').item.json.next_period }}"},"schema":[{"id":"name","type":"string","display":true,"removed":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":"last_period_date","type":"string","display":true,"removed":true,"required":false,"displayName":"last_period_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"cycle_length","type":"string","display":true,"removed":true,"required":false,"displayName":"cycle_length","defaultMatch":false,"canBeUsedToMatch":true},{"id":"subscribed_date","type":"string","display":true,"removed":true,"required":false,"displayName":"subscribed_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"next_period","type":"string","display":true,"removed":true,"required":false,"displayName":"next_period","defaultMatch":false,"canBeUsedToMatch":true},{"id":"ovulation_date","type":"string","display":true,"removed":true,"required":false,"displayName":"ovulation_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pms_start","type":"string","display":true,"removed":true,"required":false,"displayName":"pms_start","defaultMatch":false,"canBeUsedToMatch":true},{"id":"fertile_start","type":"string","display":true,"removed":true,"required":false,"displayName":"fertile_start","defaultMatch":false,"canBeUsedToMatch":true},{"id":"fertile_end","type":"string","display":true,"removed":true,"required":false,"displayName":"fertile_end","defaultMatch":false,"canBeUsedToMatch":true},{"id":"last_email_sent","type":"string","display":true,"removed":false,"required":false,"displayName":"last_email_sent","defaultMatch":false,"canBeUsedToMatch":true},{"id":"active","type":"string","display":true,"removed":true,"required":false,"displayName":"active","defaultMatch":false,"canBeUsedToMatch":true},{"id":"row_number","type":"number","display":true,"removed":true,"readOnly":true,"required":false,"displayName":"row_number","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["email"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit#gid=0","cachedResultName":"Subscribers"},"documentId":{"__rl":true,"mode":"list","value":"16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit?usp=drivesdk","cachedResultName":"Period Health Tracker"}},"credentials":{"googleSheetsOAuth2Api":{"id":"ajCmdXdhjJqZW6RE","name":"automations"}},"typeVersion":4.7},{"id":"1d810899-b02a-4c4b-829a-7f85067d40a7","name":"Read All Subscribers1","type":"n8n-nodes-base.googleSheets","position":[-160,720],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit#gid=0","cachedResultName":"Subscribers"},"documentId":{"__rl":true,"mode":"list","value":"16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o","cachedResultUrl":"https://docs.google.com/spreadsheets/d/16Ul8TmV1DeYdxDoymkOoZ5y2jD9ZsgDuWoUc7_RPo_o/edit?usp=drivesdk","cachedResultName":"Period Health Tracker"}},"credentials":{"googleSheetsOAuth2Api":{"id":"ajCmdXdhjJqZW6RE","name":"automations"}},"typeVersion":4.7},{"id":"1384ff73-3ff8-45bc-ab40-18506487ac3f","name":"Filter Active Subscribers1","type":"n8n-nodes-base.filter","position":[80,720],"parameters":{"options":{},"conditions":{"options":{"version":3,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"ca26b90f-cfb2-4726-b916-8eb953340507","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{ $json.active }}","rightValue":"="}]}},"typeVersion":2.3},{"id":"5b2a9a48-d1a4-4faf-a84f-8319abdbb3b7","name":"Calculate Phase & Build Prompt","type":"n8n-nodes-base.code","position":[304,720],"parameters":{"jsCode":"const today = new Date();\ntoday.setHours(0, 0, 0, 0);\n\nreturn $input.all().map(item => {\n  const u = item.json;\n\n  const nextPeriod = new Date(u.next_period);\n  const ovulationDate = new Date(u.ovulation_date);\n  const fertileStart = new Date(u.fertile_start);\n  const fertileEnd = new Date(u.fertile_end);\n  const pmsStart = new Date(u.pms_start);\n  const lastPeriod = new Date(u.last_period_date);\n\n  [nextPeriod, ovulationDate, fertileStart, fertileEnd, pmsStart, lastPeriod].forEach(d => d.setHours(0,0,0,0));\n\n  const cycleDay = Math.floor((today - lastPeriod) / 86400000) + 1;\n\n  // Determine phase\n  let phase = 'Follicular';\n  if (today >= pmsStart && today < nextPeriod) phase = 'PMS';\n  else if (cycleDay <= 5) phase = 'Menstrual';\n  else if (today >= fertileStart && today <= fertileEnd) phase = 'Fertile';\n  else if (today.toISOString().split('T')[0] === ovulationDate.toISOString().split('T')[0]) phase = 'Ovulation';\n\n  const daysUntilPeriod = Math.ceil((nextPeriod - today) / 86400000);\n\n  const prompt = `You are a warm and knowledgeable women's health and wellness coach. Generate a personalized weekly wellness digest for a woman currently in her ${phase} phase of her menstrual cycle.\n\nUser:\n- Name: ${u.name}\n- Current Phase: ${phase}\n- Cycle Day: ${cycleDay}\n- Days Until Next Period: ${daysUntilPeriod}\n- Cycle Length: ${u.cycle_length} days\n\nRespond ONLY in this JSON format:\n{\n  \"phase_summary\": \"2-3 sentences explaining what happens in the body during this phase\",\n  \"energy_tip\": \"One specific tip for managing energy this week\",\n  \"nutrition_tip\": \"One specific nutrition recommendation for this phase\",\n  \"movement_tip\": \"One specific exercise or movement recommendation\",\n  \"mindset_tip\": \"One specific mental wellness tip for this phase\",\n  \"weekly_affirmation\": \"A powerful affirmation for women in this phase\",\n  \"what_to_expect\": \"One thing she should expect physically or emotionally this week\"\n}\n\nRules:\n- Use her name throughout\n- Be warm, sisterly, and empowering\n- Give specific practical tips not generic advice\n- Keep each tip to 1-2 sentences`;\n\n  return {\n    json: {\n      ...u,\n      phase,\n      cycleDay,\n      daysUntilPeriod,\n      prompt\n    }\n  };\n});"},"typeVersion":2},{"id":"9bb474c4-2c90-48f3-a95d-d71c80cbb2e4","name":"Wellness Coach","type":"@n8n/n8n-nodes-langchain.openAi","position":[512,720],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"responses":{"values":[{"content":"={{ $json.prompt }}"}]},"builtInTools":{}},"credentials":{"openAiApi":{"id":"5Kzt6hGSZ1JHZqWN","name":"OpenAi account 2"}},"typeVersion":2.1},{"id":"745e553c-cd0f-4ea9-8d1a-373663c9e114","name":"Parse & Build Wellness Email","type":"n8n-nodes-base.code","position":[864,720],"parameters":{"jsCode":"const response = items[0].json.output[0].content[0].text;\nconst cleaned = response.replace(/```json|```/g, '').trim();\nconst parsed = JSON.parse(cleaned);\n\nconst userData = $('Calculate Phase & Build Prompt').item.json;\n\nconst phaseColors = {\n  Menstrual: { color1: '#922b21', color2: '#c0392b', emoji: '🩸' },\n  Follicular: { color1: '#1a5276', color2: '#2980b9', emoji: '🌱' },\n  Fertile: { color1: '#1a7a4a', color2: '#27ae60', emoji: '💚' },\n  Ovulation: { color1: '#1a7a4a', color2: '#27ae60', emoji: '🥚' },\n  PMS: { color1: '#6c3483', color2: '#8e44ad', emoji: '😮‍💨' }\n};\n\nconst colors = phaseColors[userData.phase] || phaseColors.Follicular;\n\nconst htmlEmail = `<!DOCTYPE html>\n<html>\n<head>\n  <style>\n    body { font-family: Arial, sans-serif; background: #fff0f7; margin: 0; padding: 0; }\n    .container { max-width: 600px; margin: 30px auto; background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }\n    .header { background: linear-gradient(135deg, ${colors.color1}, ${colors.color2}); padding: 30px; text-align: center; color: white; }\n    .header h1 { margin: 0; font-size: 22px; }\n    .badge { display: inline-block; background: rgba(255,255,255,0.25); padding: 4px 14px; border-radius: 20px; font-size: 13px; margin-top: 8px; }\n    .body { padding: 30px; color: #333; }\n    .tip-card { background: #fff0f7; border-left: 4px solid ${colors.color1}; padding: 14px 18px; border-radius: 8px; margin: 14px 0; }\n    .tip-label { font-weight: bold; color: ${colors.color1}; font-size: 12px; text-transform: uppercase; margin-bottom: 6px; }\n    .affirmation { background: linear-gradient(135deg, ${colors.color1}, ${colors.color2}); color: white; padding: 20px; border-radius: 8px; text-align: center; font-size: 16px; font-style: italic; margin: 20px 0; }\n    .footer { background: #fff0f7; padding: 16px; text-align: center; font-size: 12px; color: #999; }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <div class=\"header\">\n      <h1>${colors.emoji} Weekly Wellness Digest</h1>\n      <span class=\"badge\">${userData.phase} Phase · Day ${userData.cycleDay} · ${userData.daysUntilPeriod} days until period</span>\n    </div>\n    <div class=\"body\">\n      <p>Hi ${userData.name} 👋</p>\n      <p>${parsed.phase_summary}</p>\n\n      <div class=\"tip-card\">\n        <div class=\"tip-label\">⚡ Energy This Week</div>\n        ${parsed.energy_tip}\n      </div>\n      <div class=\"tip-card\">\n        <div class=\"tip-label\">🥗 Nutrition Tip</div>\n        ${parsed.nutrition_tip}\n      </div>\n      <div class=\"tip-card\">\n        <div class=\"tip-label\">🏃 Movement Tip</div>\n        ${parsed.movement_tip}\n      </div>\n      <div class=\"tip-card\">\n        <div class=\"tip-label\">🧠 Mindset Tip</div>\n        ${parsed.mindset_tip}\n      </div>\n      <div class=\"tip-card\">\n        <div class=\"tip-label\">📅 What to Expect This Week</div>\n        ${parsed.what_to_expect}\n      </div>\n\n      <div class=\"affirmation\">\n        💜 ${parsed.weekly_affirmation}\n      </div>\n    </div>\n    <div class=\"footer\">You subscribed to Cycle Wellness reminders.<br/>Reply STOP to unsubscribe.</div>\n  </div>\n</body>\n</html>`;\n\nreturn [{\n  json: {\n    ...userData,\n    htmlEmail,\n    subject: `${colors.emoji} Your Weekly Wellness Digest — ${userData.phase} Phase · Day ${userData.cycleDay}`\n  }\n}];"},"typeVersion":2},{"id":"6f3100af-2cc2-44fe-af82-4ffc4ed6aca4","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1232,-528],"parameters":{"width":384,"height":592,"content":"## Weekly Automation\n\nEvery woman's cycle is different. This workflow \ntracks each subscriber's unique cycle, sends \nperfectly timed reminders before every phase, and \ndelivers personalized weekly wellness tips powered \nby GPT-4o — all completely automatically.\n\n### HOW IT WORKS\n\nSubscribers fill in a simple form with their last \nperiod date and cycle length. The workflow calculates \nall key dates — next period, ovulation, fertile \nwindow, and PMS start. Every morning it checks all \nsubscribers and sends the right email at the right \ntime. Every Sunday it generates a personalized \nwellness digest based on each subscriber's current \ncycle phase.\n\n### SETUP STEPS\n\n1. Create the Google Sheet with 2 sheets —\n   Subscribers and Send Log\n2. Connect Google Sheets, OpenAI, and Gmail \n   credentials\n3. Test by submitting the form with your own email"},"typeVersion":1},{"id":"680fc0ba-37a1-4db8-975a-706cc321cf0b","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-496,-128],"parameters":{"color":7,"width":1216,"height":304,"content":"Triggered when a subscriber submits the form. Collects name, email, last period date, and cycle length. Calculates next period, ovulation day, fertile window, and PMS start date automatically. Saves full profile to Subscribers sheet and sends a welcome email with their complete cycle overview."},"typeVersion":1},{"id":"8519a174-db23-4674-909b-f53cd7c28d73","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-496,208],"parameters":{"color":7,"width":2112,"height":352,"content":"Runs every morning at 8AM. Reads all active subscribers, calculates today's cycle phase for each one, and sends the right email only on the right day — period incoming (3 days before), period start, ovulation alert, or PMS prep. Duplicate send prevention ensures each email type is only sent once per cycle."},"typeVersion":1},{"id":"6b394e20-d3f8-4cd5-8872-5a6c05641b7e","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-480,608],"parameters":{"color":7,"width":2128,"height":288,"content":"Runs every Sunday at 9AM. Calculates each subscriber's current cycle phase and generates a fully personalized wellness email using GPT-4o with energy, nutrition, movement, and mindset tips specific to their phase. Email design and colors adapt automatically to the current phase."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"29137dc9-597b-4bff-ad4e-80bf62fd5a21","connections":{"Wellness Coach":{"main":[[{"node":"Parse & Build Wellness Email","type":"main","index":0}]]},"IF Email to Send":{"main":[[{"node":"Build Reminder Email","type":"main","index":0}]]},"Daily 8AM Trigger":{"main":[[{"node":"Read All Subscribers","type":"main","index":0}]]},"Build Welcome Email":{"main":[[{"node":"Send Welcome Email","type":"main","index":0}]]},"Cycle Wellness Form":{"main":[[{"node":"Calculate Cycle Dates","type":"main","index":0}]]},"Save to Subscribers":{"main":[[{"node":"Build Welcome Email","type":"main","index":0}]]},"Send Reminder Email":{"main":[[{"node":"Update Last Email Sent","type":"main","index":0}]]},"Build Reminder Email":{"main":[[{"node":"Send Reminder Email","type":"main","index":0}]]},"Read All Subscribers":{"main":[[{"node":"Filter Active Subscribers","type":"main","index":0}]]},"Send Wellness Digest":{"main":[[{"node":"Log to Send Log1","type":"main","index":0}]]},"Calculate Cycle Dates":{"main":[[{"node":"Save to Subscribers","type":"main","index":0}]]},"Read All Subscribers1":{"main":[[{"node":"Filter Active Subscribers1","type":"main","index":0}]]},"Update Last Email Sent":{"main":[[{"node":"Log to Send Log","type":"main","index":0}]]},"Calculate Today's Phase":{"main":[[{"node":"IF Email to Send","type":"main","index":0}]]},"Filter Active Subscribers":{"main":[[{"node":"Calculate Today's Phase","type":"main","index":0}]]},"Weekly Sunday 9AM Trigger":{"main":[[{"node":"Read All Subscribers1","type":"main","index":0}]]},"Filter Active Subscribers1":{"main":[[{"node":"Calculate Phase & Build Prompt","type":"main","index":0}]]},"Parse & Build Wellness Email":{"main":[[{"node":"Send Wellness Digest","type":"main","index":0}]]},"Calculate Phase & Build Prompt":{"main":[[{"node":"Wellness Coach","type":"main","index":0}]]}}},"lastUpdatedBy":1,"workflowInfo":{"nodeCount":26,"nodeTypes":{"n8n-nodes-base.if":{"count":1},"n8n-nodes-base.code":{"count":6},"n8n-nodes-base.gmail":{"count":3},"n8n-nodes-base.filter":{"count":2},"n8n-nodes-base.stickyNote":{"count":4},"n8n-nodes-base.formTrigger":{"count":1},"n8n-nodes-base.googleSheets":{"count":6},"n8n-nodes-base.scheduleTrigger":{"count":2},"@n8n/n8n-nodes-langchain.openAi":{"count":1}}},"status":"published","readyToDemo":null,"user":{"name":"Rahul Joshi","username":"rahul08","bio":"Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.\n\n","verified":true,"links":["https://www.linkedin.com/in/callrahul/"],"avatar":"https://gravatar.com/avatar/b6cf57822463143589b36ada06fbf6cb1509223a740fae3160b28f1ce41ccc12?r=pg&d=retro&size=200"},"nodes":[{"id":18,"icon":"file:googleSheets.svg","name":"n8n-nodes-base.googleSheets","codex":{"data":{"alias":["CSV","Sheet","Spreadsheet","GS"],"resources":{"generic":[{"url":"https://n8n.io/blog/love-at-first-sight-ricardos-n8n-journey/","icon":"❤️","label":"Love at first sight: Ricardo’s n8n journey"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/creating-triggers-for-n8n-workflows-using-polling/","icon":"⏲","label":"Creating triggers for n8n workflows using polling"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n/","icon":"📈","label":"Migrating Community Metrics to Orbit using n8n"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/your-business-doesnt-need-you-to-operate/","icon":" 🖥️","label":"Hey founders! Your business doesn't need you to operate"},{"url":"https://n8n.io/blog/how-honest-burgers-use-automation-to-save-100k-per-year/","icon":"🍔","label":"How Honest Burgers Use Automation to Save $100k per year"},{"url":"https://n8n.io/blog/how-a-digital-strategist-uses-n8n-for-online-marketing/","icon":"💻","label":"How a digital strategist uses n8n for online marketing"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/","icon":"📈","label":"How a Membership Development Manager automates his work and investments"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Data & Storage","Productivity"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"input\",\"output\"]","defaults":{"name":"Google Sheets"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGZpbGw9IiMyOEI0NDYiIGQ9Ik0zNS42OSAxIDUyIDE3LjIyNXYzOS4wODdhMy42NyAzLjY3IDAgMCAxLTEuMDg0IDIuNjFBMy43IDMuNyAwIDAgMSA0OC4yOTMgNjBIMTIuNzA3YTMuNyAzLjcgMCAwIDEtMi42MjMtMS4wNzhBMy42NyAzLjY3IDAgMCAxIDkgNTYuMzEyVjQuNjg4YTMuNjcgMy42NyAwIDAgMSAxLjA4NC0yLjYxQTMuNyAzLjcgMCAwIDEgMTIuNzA3IDF6Ii8+PHBhdGggZmlsbD0iIzZBQ0U3QyIgZD0iTTM1LjY5IDEgNTIgMTcuMjI1SDM5LjM5N2MtMi4wNTQgMC0zLjcwNy0xLjgyOS0zLjcwNy0zLjg3MnoiLz48cGF0aCBmaWxsPSIjMjE5QjM4IiBkPSJNMzkuMjExIDE3LjIyNSA1MiAyMi40OHYtNS4yNTV6Ii8+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTIwLjEyIDMxLjk3NWMwLS44MTcuNjYyLTEuNDc1IDEuNDgzLTEuNDc1aDE3Ljc5NGMuODIxIDAgMS40ODIuNjU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MS40NzYgMS40NzYgMCAwIDEtMS40ODItMS40NzRWMzAuOTc0em0yLjIyNSAxLjQ3NWg2LjY3MnYyLjIxMmgtNi42NzJ6bTAgNS4xNjJoNi42NzJ2Mi4yMTNoLTYuNjcyem0wIDUuMTYzaDYuNjcydjIuMjEyaC02LjY3MnptOS42MzgtMTAuMzI1aDYuNjcydjIuMjEyaC02LjY3MnptMCA1LjE2Mmg2LjY3MnYyLjIxM2gtNi42NzJ6bTAgNS4xNjNoNi42NzJ2Mi4yMTJoLTYuNjcyeiIvPjwvZz48L3N2Zz4="},"displayName":"Google Sheets","typeVersion":5,"nodeCategories":[{"id":3,"name":"Data & Storage"},{"id":4,"name":"Productivity"}]},{"id":20,"icon":"fa:map-signs","name":"n8n-nodes-base.if","codex":{"data":{"alias":["Router","Filter","Condition","Logic","Boolean","Branch"],"details":"The IF node can be used to implement binary conditional logic in your workflow. You can set up one-to-many conditions to evaluate each item of data being inputted into the node. That data will either evaluate to TRUE or FALSE and route out of the node accordingly.\n\nThis node has multiple types of conditions: Bool, String, Number, and Date & Time.","resources":{"generic":[{"url":"https://n8n.io/blog/learn-to-automate-your-factorys-incident-reporting-a-step-by-step-guide/","icon":"🏭","label":"Learn to Automate Your Factory's Incident Reporting: A Step by Step Guide"},{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/create-a-toxic-language-detector-for-telegram/","icon":"🤬","label":"Create a toxic language detector for Telegram in 4 step"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/","icon":"🔗","label":"How to build a low-code, self-hosted URL shortener in 3 steps"},{"url":"https://n8n.io/blog/automate-your-data-processing-pipeline-in-9-steps-with-n8n/","icon":"⚙️","label":"Automate your data processing pipeline in 9 steps"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/automation-for-maintainers-of-open-source-projects/","icon":"🏷️","label":"How to automatically manage contributions to open-source projects"},{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/","icon":"🎖","label":"Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.if/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow"]}}},"group":"[\"transform\"]","defaults":{"name":"If","color":"#408000"},"iconData":{"icon":"map-signs","type":"icon"},"displayName":"If","typeVersion":2,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":356,"icon":"file:gmail.svg","name":"n8n-nodes-base.gmail","codex":{"data":{"alias":["email","human","form","wait","hitl","approval"],"resources":{"generic":[{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/your-business-doesnt-need-you-to-operate/","icon":" 🖥️","label":"Hey founders! Your business doesn't need you to operate"},{"url":"https://n8n.io/blog/using-automation-to-boost-productivity-in-the-workplace/","icon":"💪","label":"Using Automation to Boost Productivity in the Workplace"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Communication","HITL"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"HITL":["Human in the Loop"]}}},"group":"[\"transform\"]","defaults":{"name":"Gmail"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTYiIGhlaWdodD0iMTkzIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZmlsbD0iIzQyODVGNCIgZD0iTTU4LjE4MiAxOTIuMDVWOTMuMTRMMjcuNTA3IDY1LjA3NyAwIDQ5LjUwNHYxMjUuMDkxYzAgOS42NTggNy44MjUgMTcuNDU1IDE3LjQ1NSAxNy40NTV6Ii8+PHBhdGggZmlsbD0iIzM0QTg1MyIgZD0iTTE5Ny44MTggMTkyLjA1aDQwLjcyN2M5LjY1OSAwIDE3LjQ1NS03LjgyNiAxNy40NTUtMTcuNDU1VjQ5LjUwNWwtMzEuMTU2IDE3LjgzNy0yNy4wMjYgMjUuNzk4eiIvPjxwYXRoIGZpbGw9IiNFQTQzMzUiIGQ9Im01OC4xODIgOTMuMTQtNC4xNzQtMzguNjQ3IDQuMTc0LTM2Ljk4OUwxMjggNjkuODY4bDY5LjgxOC01Mi4zNjQgNC42NyAzNC45OTItNC42NyA0MC42NDRMMTI4IDE0NS41MDR6Ii8+PHBhdGggZmlsbD0iI0ZCQkMwNCIgZD0iTTE5Ny44MTggMTcuNTA0VjkzLjE0TDI1NiA0OS41MDRWMjYuMjMxYzAtMjEuNTg1LTI0LjY0LTMzLjg5LTQxLjg5LTIwLjk0NXoiLz48cGF0aCBmaWxsPSIjQzUyMjFGIiBkPSJtMCA0OS41MDQgMjYuNzU5IDIwLjA3TDU4LjE4MiA5My4xNFYxNy41MDRMNDEuODkgNS4yODZDMjQuNjEtNy42NiAwIDQuNjQ2IDAgMjYuMjN6Ii8+PC9zdmc+"},"displayName":"Gmail","typeVersion":2,"nodeCategories":[{"id":6,"name":"Communication"},{"id":28,"name":"HITL"}]},{"id":565,"icon":"fa:sticky-note","name":"n8n-nodes-base.stickyNote","codex":{"data":{"alias":["Comments","Notes","Sticky"],"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"input\"]","defaults":{"name":"Sticky Note","color":"#FFD233"},"iconData":{"icon":"sticky-note","type":"icon"},"displayName":"Sticky Note","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":834,"icon":"file:code.svg","name":"n8n-nodes-base.code","codex":{"data":{"alias":["cpde","Javascript","JS","Python","Script","Custom Code","Function"],"details":"The Code node allows you to execute JavaScript in your workflow.","resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Code"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTcxXzQ0MSkiPgo8cGF0aCBkPSJNMTcwLjI4MyA0OEgxOTYuNUMyMDMuMTI3IDQ4IDIwOC41IDQyLjYyNzQgMjA4LjUgMzZWMTJDMjA4LjUgNS4zNzI1OCAyMDMuMTI3IDAgMTk2LjUgMEgxNzAuMjgzQzEyNi4xIDAgOTAuMjgzIDM1LjgxNzIgOTAuMjgzIDgwVjE3NkM5MC4yODMgMjA2LjkyOCA2NS4yMTA5IDIzMiAzNC4yODMgMjMySDIzQzE2LjM3MjYgMjMyIDExIDIzNy4zNzIgMTEgMjQ0VjI2OEMxMSAyNzQuNjI3IDE2LjM3MjQgMjgwIDIyLjk5OTYgMjgwTDM0LjI4MyAyODBDNjUuMjEwOSAyODAgOTAuMjgzIDMwNS4wNzIgOTAuMjgzIDMzNlY0NDBDOTAuMjgzIDQ3OS43NjQgMTIyLjUxOCA1MTIgMTYyLjI4MyA1MTJIMTk2LjVDMjAzLjEyNyA1MTIgMjA4LjUgNTA2LjYyNyAyMDguNSA1MDBWNDc2QzIwOC41IDQ2OS4zNzMgMjAzLjE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OTAgMjMyTDQ3OC45NzkgMjMyQzQ0OC4wNTEgMjMyIDQyMi45NzggMjA2LjkyOCA0MjIuOTc4IDE3NlY4MEM0MjIuOTc4IDM1LjgxNzIgMzg3LjE2MSAwIDM0Mi45NzkgMEgzMTdDMzEwLjM3MyAwIDMwNSA1LjM3MjU4IDMwNSAxMlYzNloiIGZpbGw9IiNGRjk5MjIiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTcxXzQ0MSI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},"displayName":"Code","typeVersion":2,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":839,"icon":"fa:clock","name":"n8n-nodes-base.scheduleTrigger","codex":{"data":{"alias":["Time","Scheduler","Polling","Cron","Interval"],"resources":{"generic":[],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"trigger\",\"schedule\"]","defaults":{"name":"Schedule Trigger","color":"#31C49F"},"iconData":{"icon":"clock","type":"icon"},"displayName":"Schedule Trigger","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":844,"icon":"fa:filter","name":"n8n-nodes-base.filter","codex":{"data":{"alias":["Router","Filter","Condition","Logic","Boolean","Branch"],"details":"The Filter node can be used to filter items based on a condition. If the condition is met, the item will be passed on to the next node. If the condition is not met, the item will be omitted. Conditions can be combined together by AND(meet all conditions), or OR(meet at least one condition).","resources":{"generic":[],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.filter/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Filter","color":"#229eff"},"iconData":{"icon":"filter","type":"icon"},"displayName":"Filter","typeVersion":2,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":1225,"icon":"file:form.svg","name":"n8n-nodes-base.formTrigger","codex":{"data":{"alias":["table","submit","post"],"resources":{"generic":[],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.formtrigger/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Other Trigger Nodes"]}}},"group":"[\"trigger\"]","defaults":{"name":"On form submission"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0NiIgaGVpZ2h0PSI0MCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwQjdCQyIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzQuOTc4IDM3LjczMmExLjU2IDEuNTYgMCAwIDEtMS41NjIgMS41NjNINi4yNmExLjU2IDEuNTYgMCAwIDEtMS41NjMtMS41NjNWOS42MDdjMC0uNDA1LjE1Ny0uNzk0LjQzOC0xLjA4Nmw2LjMwNC02LjUzMXY1LjM0NEg4LjIxM2ExLjE3MiAxLjE3MiAwIDEgMCAwIDIuMzQzaDQuNDNhMS4xNyAxLjE3IDAgMCAwIDEuMTcxLTEuMTcxVi4yMzJoMTkuNjAyYTEuNTYgMS41NiAwIDAgMSAxLjU2MiAxLjU2M3YxMC4zMjdsLTIuODYgMi44Ni04LjI1MiA4LjI3NmE0MTMuMDA2IDQxMy4wMDYgMCAwIDEtMS42NTQgMS42NjJsLS4zMzcuMzM3YTIgMiAwIDAgMC0uNTU3IDEuMDhMMjAuMyAzMS45MjJjLS4xMDguNjM4LS4yMTUgMS4wNzkuMjExIDEuNDE4LjQwMy4zMi45LjE3NCAxLjU0LjA2Nm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IuMjRjMCAuNDE0LS4xNjMuODEtLjQ1NCAxLjEwMmwtLjkyMi45MTQtMy44NTItMy44MjguOTMtLjkzYTEuNTYzIDEuNTYzIDAgMCAxIDIuMjAzIDBsMS42NCAxLjY0MWMuMjkxLjI5My40NTUuNjkuNDU1IDEuMTAyIi8+PC9zdmc+"},"displayName":"n8n Form Trigger","typeVersion":3,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":1250,"icon":"file:openAi.svg","name":"@n8n/n8n-nodes-langchain.openAi","codex":{"data":{"alias":["LangChain","ChatGPT","Sora","DallE","whisper","audio","transcribe","tts","assistant"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Agents","Miscellaneous","Root Nodes"]}}},"group":"[\"transform\"]","defaults":{"name":"OpenAI"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTM2Ljg2NzEgMTYuMzcxOEMzNy43NzQ2IDEzLjY0OCAzNy40NjIxIDEwLjY2NDIgMzYuMDEwOCA4LjE4NjYxQzMzLjgyODIgNC4zODY1MyAyOS40NDA3IDIuNDMxNDkgMjUuMTU1NiAzLjM1MTUxQzIzLjI0OTMgMS4yMDM5NiAyMC41MTA1IC0wLjAxNzMxNDggMTcuNjM5MiAwLjAwMDE4NTUzM0MxMy4yNTkxIC0wLjAwOTgxNDY4IDkuMzcyNzMgMi44MTAyNSA4LjAyNTIgNi45Nzc4M0M1LjIxMTM5IDcuNTU0MSAyLjc4MjU4IDkuMzE1MzggMS4zNjEzIDExLjgxMTdDLTAuODM3NDkzIDE1LjYwMTggLTAuMzM2MjMyIDIwLjM3OTQgM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IDM0LjQwMiAxNC4zNzNMMjYuNDM2OCA5Ljc3Mjg5QzI2LjAzMzEgOS41MzY2NCAyNS41MzMxIDkuNTM2NjQgMjUuMTI4MSA5Ljc3Mjg5TDE1LjQwNDEgMTUuMzg4VjExLjUwMDRDMTUuNDAxNiAxMS40NjA0IDE1LjQyMDQgMTEuNDIxNyAxNS40NTE2IDExLjM5NjdMMjMuNTAzIDYuNzUxNThDMjcuMDg5NCA0LjY4Mjc5IDMxLjY3NDUgNS45MTQwNiAzMy43NDIgOS41MDE2NEMzNC42MTU4IDExLjAxNjcgMzQuOTMyIDEyLjc5MDUgMzQuNjM1OCAxNC41MTQySDM0LjYzODNaTTEzLjU3NDEgMjEuNDQzMUwxMC4yMDY1IDE5LjQ5OTRDMTAuMTcwMiAxOS40ODE5IDEwLjE0NjUgMTkuNDQ2OCAxMC4xNDE1IDE5LjQwNjhWMTAuMTA3OUMxMC4xNDQgNS45Njc4MSAxMy41MDI4IDIuNjEyNzQgMTcuNjQyOSAyLjYxNTI0QzE5LjM5NDIgMi42MTUyNCAyMS4wODkyIDMuMjMwMjUgMjIuNDM1NSA0LjM1MDI4QzIyLjM3NDMgNC4zODI3OCAyMi4yNjkzIDQuNDQxNTMgMjIuMTk5MiA0LjQ4NDAzTDE0LjIzNDEgOS4wODQxM0MxMy44MjY2IDkuMzE1MzggMTMuNTc2NiA5Ljc0Nzg5IDEzLjU3OTEgMTAuMjE2N0wxMy41NzQxIDIxLjQ0MDZWMjEuNDQzMVpNMTUuNDAyOSAxNy41MDA2TDE5LjczNDIgMTQuOTk5M0wyNC4wNjU1IDE3LjQ5OTNWMjIuNTAwN0wxOS43MzQyIDI1LjAwMDdMMTUuNDAyOSAyMi41MDA3VjE3LjUwMDZaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"},"displayName":"OpenAI","typeVersion":2,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]}],"categories":[{"id":43,"name":"Personal Productivity"},{"id":51,"name":"Multimodal AI"}],"image":[]}}