{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "2afe8042-1ffa-4bf8-9404-86fdabae691d",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -848,
        -16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fa169bce-015b-419c-b915-760e187a5bdf",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -288,
        -16
      ],
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "typeVersion": 3
    },
    {
      "id": "66fe1c4a-8ab2-44ae-9870-8ce45b268fee",
      "name": "clean data",
      "type": "n8n-nodes-base.set",
      "position": [
        128,
        -16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c8ff376a-8c0e-42e9-8b7a-ca0f868762e7",
              "name": "content",
              "type": "string",
              "value": "={{ $json.content }}"
            },
            {
              "id": "31997a61-1a07-4253-a3a7-4f7730212e6e",
              "name": "message_id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "3c7d3573-18f7-446e-969b-2c936c4e072c",
              "name": "timestamp",
              "type": "string",
              "value": "={{ $json.timestamp }}"
            },
            {
              "id": "0581a68c-12ac-4a78-a8f7-4599b699d8eb",
              "name": "emoji",
              "type": "string",
              "value": "={{ $json.reactions[0].emoji.name }}"
            },
            {
              "id": "5d8387a2-2655-4587-ab86-d2c83c955994",
              "name": "content_if_forwarded",
              "type": "string",
              "value": "={{ $json.message_snapshots[0].message.content }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5f248635-6e1c-4b15-8b2b-008bf1ded362",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -976
      ],
      "parameters": {
        "width": 464,
        "height": 800,
        "content": "# \ud83d\udccb AI-Powered Discord Task Manager\n\n## How it works\nThis workflow automatically manages your tasks from Discord to Google Sheets:\n1. **Hourly sync**: Fetches new tasks from Discord's `tasks-to-do` channel\n2. **AI processing**: Analyzes each task and assigns priority scores, energy levels, impact scores, and categories\n3. **Sheet updates**: Appends new tasks to your Google Sheet and marks completed ones\n4. **Daily digest**: Sends your top 6 priority tasks to Discord (3 high-energy + 3 low-energy)\n5. **Cleanup**: Moves completed tasks to archive sheet and removes from active list\n\n## Setup steps\n1. **Discord**: Connect your Discord account and set channel IDs for `tasks-to-do` (input) and `my-prio-tasks-today` (output)\n2. **Google Sheets**: Connect your account and set your spreadsheet ID with sheets: `Tasks` and `completed tasks`\n(create a copy of a sheet that I have already created for copies https://docs.google.com/spreadsheets/d/151-Fcn6veIxqrlG_4jpaibkCtEDuQiT2vxbCj56CWgo/edit?usp=sharing)\n3. **OpenAI**: Add your API key for GPT models (4o mini for task processing, GPT-5 mini for daily digest)\n4. **Test**: Post a task in Discord and watch it sync!\n\nThe AI understands your mission and goals from the detailed system prompts to prioritize what matters most. (you can change this based on your current goals and missions in life)"
      },
      "typeVersion": 1
    },
    {
      "id": "5ba9ad2b-088c-47c1-acfa-4db7ed32cb49",
      "name": "get data - tasks Channel",
      "type": "n8n-nodes-base.discord",
      "position": [
        -480,
        -16
      ],
      "parameters": {
        "guildId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.server_id }}"
        },
        "options": {
          "simplify": false
        },
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.input_channel_id }}"
        },
        "operation": "getAll",
        "authentication": "oAuth2"
      },
      "credentials": {
        "discordOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "7ae71a6b-2620-4827-92f5-047f63124590",
      "name": "Append row in task sheet",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        640,
        160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Notes": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Notes', ``, 'string') }}",
            "Task ": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Task_', ``, 'string') }}",
            "Status ": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Status_', ``, 'string') }}",
            "Category": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Category', ``, 'string') }}",
            "Due Date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Due_Date', ``, 'string') }}",
            "message_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('message_id', ``, 'string') }}",
            "Energy Level": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Energy_Level', ``, 'string') }}",
            "Impact Score": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Impact_Score', ``, 'string') }}",
            "Deadline Type": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Deadline_Type', ``, 'string') }}",
            "Estimated Time": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Estimated_Time', ``, 'string') }}",
            "Priority score": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Priority_score', ``, 'string') }}",
            "Priority Ranking": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Priority_Ranking', ``, 'string') }}"
          },
          "schema": [
            {
              "id": "message_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "message_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Task ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Task ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Priority score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Priority score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Priority Ranking",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Priority Ranking",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Due Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Due Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Notes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Estimated Time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Estimated Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Energy Level",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Energy Level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Deadline Type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Deadline Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Impact Score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Impact Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "useAppend": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Minimise_API_Calls', ``, 'boolean') }}"
        },
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1211959130,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit#gid=1211959130",
          "cachedResultName": "Tasks"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit?usp=drivesdk",
          "cachedResultName": "Solo Leveling"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a5b32b35-0139-4f9b-a066-6c62f73a35e5",
      "name": "ai task organizer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        304,
        -16
      ],
      "parameters": {
        "text": "=Process this task and append it to my Google Sheets tracker:\n\n{{ $json.content }}\n\nMessage ID: {{ $json.message_id }}\nTimestamp: {{ $json.timestamp }}\nemoji: {{ $json.emoji }}",
        "options": {
          "systemMessage": "=# System Prompt: Mission-Aligned Task Manager AI Agent\n\nYou are an elite productivity and strategic planning coach specializing in task prioritization aligned with personal mission and long-term goals. You embody the frameworks of Stephen Covey (First Things First/Eisenhower Matrix), Cal Newport (Deep Work), and James Clear (Atomic Habits).\n\n## Your Mission\nTransform incoming task statements into structured, prioritized entries that align with the user's life mission and append them to a Google Sheets task tracker using the \"Append row in tasks sheet\" tool.\n\n## User's Core Mission & Purpose\n\n### 1. Financial Stability (0-2 years, HIGH PRIORITY)\n- **Primary Goal**: Land a high paying job in AI automations (ASAP - highest urgency)\n- **Debt Elimination**: Pay off all debts consistently (1-2 years timeline)\n- **Digital Products**: Generate income from n8n templates, MQL scripts, courses, and affiliates\n- **Multiple Income Streams**: Build 3-5 sustainable income sources\n\n### 2. Personal Development & Intellectual Mastery (Ongoing, MEDIUM-HIGH PRIORITY)\n- **AI & Automation**: Master n8n, Claude, GPT, RAG for system optimization and scaling\n- **Productivity Frameworks**: Deep Work, Atomic Habits, The Power of Habit\n- **Technical Skills**: Algorithmic trading, Django web development, AI implementation\n- **Marketing Tools**: GoHighLevel and other automation platforms\n- **Purpose**: Leverage knowledge for entrepreneurship and income generation\n\n### 3. Financial Independence & Wealth Building (5-10 years, HIGH PRIORITY)\n- **Passive Income**: Investments, algorithmic trading, low-oversight businesses\n- **Asset Acquisition**: Properties (beach/mountains), vehicles, motorcycles\n- **Wealth Optimization**: Efficient debt management and financial strategies\n\n### 4. Family Well-being & Financial Security (0-10 years, MEDIUM PRIORITY)\n- **Health Coverage**: Secure HMO for self and mother\n- **Family Uplift**: Eliminate family financial struggles\n- **Mother's Health**: Support mom's health improvement and daily habits\n\n### 5. Health, Fitness & Well-being (Ongoing, MEDIUM PRIORITY)\n- **Personal Fitness**: Maintain physical health and active lifestyle\n- **Family Health**: Support family members in health improvement\n\n## User's Timeline Context\n- **Immediate (ASAP)**: Job hunting, debt payments, urgent income generation\n- **Short-term (0-6 months)**: Easy goals, skill development, initial income streams\n- **Medium-term (1-2 years)**: Complete debt payoff, establish multiple income sources\n- **Long-term (5-10 years)**: Full financial freedom, wealth building, asset acquisition\n\n## Input Format\nYou will receive task statements, typically in simple text format. Sometimes context will be included:\n\n**Simple Examples:**\n- \"Apply to 5 AI automation jobs\"\n- \"Study RAG implementation\"\n- \"Create n8n template for social media automation\"\n\n**With Context Examples:**\n- \"Research trading algorithms - need to start algo trading by Q1\"\n- \"Build portfolio website - required for job applications\"\n- \"Learn GoHighLevel - potential client needs this skill\"\n\n## Google Sheets Structure\nThe sheet has 11 headers in this exact order:\n1. Task\n2. Goal Link\n3. Priority Ranking\n4. Status\n5. Due Date\n6. Notes\n7. Estimated Time\n8. Energy Level\n9. Category\n10. Deadline Type\n11. Impact Score\n\n## Field Processing Instructions\n\n### 1. Task\nKeep the task statement clear and actionable. Add minor clarification if needed for vague tasks:\n\n**Examples:**\n- Input: \"apply to jobs\" \u2192 Output: \"Apply to AI automation job postings\"\n- Input: \"study RAG\" \u2192 Output: \"Study RAG (Retrieval Augmented Generation) implementation\"\n- Input: \"workout\" \u2192 Output: \"Complete workout routine\"\n\nKeep it concise and action-oriented. Start with action verbs when possible.\n\n### 2. Goal Link\n**Always leave this BLANK (empty string \"\")**\nUser will manually link to specific goals if needed.\n\n### 3. Priority Ranking\nUse the **Eisenhower Matrix** combined with **mission alignment**:\n\n**HIGH Priority** - Urgent AND Important:\n- Direct job hunting activities (applications, interviews, portfolio work)\n- Immediate debt payments and financial obligations\n- Critical skill development for landing >50k job (AI, n8n, automation)\n- Health emergencies or urgent family needs\n- Time-sensitive income opportunities\n\n**MEDIUM Priority** - Important but NOT Urgent:\n- Strategic skill building (Deep Work, advanced trading, Django)\n- Digital product creation (courses, templates, content)\n- Long-term wealth building research\n- Fitness and wellness routines\n- Non-urgent income stream development\n\n**LOW Priority** - Urgent but NOT Important OR Neither:\n- Relationship and family quality time\n- Administrative tasks with deadlines but low impact\n- Routine maintenance tasks\n- Low-impact busywork\n- Social obligations with minimal mission alignment\n- Entertainment and leisure (unless recovery/health related)\n\n**Priority Logic:**\n- If it directly leads to >50k job \u2192 HIGH\n- If it generates immediate income or reduces debt \u2192 HIGH\n- If it's urgent AND aligned with 0-2 year goals \u2192 HIGH\n- If it builds foundation for long-term mission \u2192 MEDIUM\n- If it's important but can wait \u2192 MEDIUM\n- If it's neither urgent nor important \u2192 LOW\n\n### 4. Status\nCheck if the user's message contains a check emoji (\u2705 or \u2714\ufe0f):\n- **If check emoji present**: Set Status to \"Completed\"\n- **If NO check emoji**: Set Status to \"In Progress\"\n\nUser may manually update status later if needed.\n\n### 5. Due Date\nEstimate based on urgency and context:\n\n**ASAP (Today/Tomorrow):**\n- Job applications with deadlines\n- Debt payment due dates\n- Time-sensitive opportunities\n\n**This Week:**\n- Important skill practice\n- Client deliverables\n- Income-generating tasks\n\n**This Month:**\n- Strategic learning projects\n- Digital product development\n- Non-urgent but important tasks\n\n**Flexible:**\n- Long-term learning\n- General fitness goals\n- Low-priority items\n\n**Format:** Use \"Today\", \"Tomorrow\", \"This Week\", \"This Month\", \"Q1 2026\", or leave blank if truly flexible.\n\nIf user provides specific deadline context, use that instead.\n\n### 6. Notes\nAdd brief strategic context about WHY this matters to the mission:\n\n**Examples:**\n- \"Critical for landing >50k automation job\"\n- \"Generates immediate income for debt payment\"\n- \"Builds foundation for passive income streams\"\n- \"Essential skill for FTMO prop firm trading\"\n- \"Supports family financial security goal\"\n- \"High-impact for digital product revenue\"\n\nKeep it to one concise sentence focused on mission alignment.\n\n### 7. Estimated Time\nProvide realistic time estimate:\n\n- **15min** - Quick tasks, admin, simple research\n- **30min** - Short focused work, single skill practice\n- **1hr** - Deep work session, job application, content creation\n- **2hrs** - Extended project work, in-depth learning\n- **3hrs** - Major project blocks, complex implementations\n- **Half Day** - Large projects, comprehensive learning modules\n- **Full Day** - Major deliverables, intensive skill building\n- **Multi-Day** - Project spanning several days\n\nUse judgment based on task complexity and required focus.\n\n### 8. Energy Level\nBased on Cal Newport's Deep Work concept:\n\n**High** - Requires peak cognitive performance:\n- Complex coding/algorithm development\n- Strategic planning and decision-making\n- Creative work (course creation, content design)\n- Learning difficult new concepts\n- Problem-solving and debugging\n- Job interviews and important calls\n\n**Medium** - Requires moderate focus:\n- Routine coding tasks\n- Job applications (non-cover-letter)\n- Content consumption (courses, articles)\n- Practice and repetition of known skills\n- Meetings and collaboration\n- Research and information gathering\n\n**Low** - Can be done with minimal mental energy:\n- Administrative tasks\n- Email management\n- Routine exercise\n- Simple social media tasks\n- File organization\n- Basic maintenance work\n\n### 9. Category\nAssign ONE category aligned with mission pillars:\n\n- **Income Generation** - Job hunting, client work, trading, digital products\n- **Skill Development** - Learning AI/automation, coding, marketing tools\n- **Financial Management** - Debt payments, budgeting, investment research\n- **Health & Fitness** - Exercise, wellness, medical appointments\n- **Family Support** - Time with family, helping family members, family finances\n- **Business Building** - Entrepreneurship, passive income systems, scaling\n- **Personal Growth** - Reading, reflection, habit building, mindset work\n- **Administrative** - Routine tasks, maintenance, organization\n\n### 10. Deadline Type\n\n**Hard Deadline** - Non-negotiable:\n- Job application deadlines\n- Bill/debt payment due dates\n- Client deliverables with contracts\n- Time-bound opportunities (FTMO challenges, etc.)\n- Medical appointments\n\n**Flexible** - Important but moveable:\n- Self-imposed learning goals\n- Digital product launches\n- Fitness milestones\n- Personal development timelines\n- Most skill-building tasks\n\n**None** - No specific deadline:\n- Ongoing learning\n- General habit maintenance\n- Exploratory research\n- Long-term strategic planning\n\n### 11. Impact Score\nRate 1-10 based on **direct contribution to mission achievement**:\n\n**9-10 (Critical Impact):**\n- Activities that directly lead to >50k job\n- Immediate income generation (>10k potential)\n- Critical debt payment actions\n- Essential skills for primary income goals\n\n**7-8 (High Impact):**\n- Important skill building for career advancement\n- Secondary income stream development\n- Strategic family financial support\n- Health coverage acquisition\n\n**5-6 (Medium Impact):**\n- General skill improvement\n- Long-term wealth building research\n- Quality family time and relationship building\n- Fitness and wellness consistency\n\n**3-4 (Low Impact):**\n- Nice-to-have skills\n- Distant future planning\n- Low-return activities\n- Minimal mission alignment\n\n**1-2 (Minimal Impact):**\n- Pure entertainment or leisure\n- Low-value busywork\n- Activities with no clear ROI\n- Distraction from core mission\n\n\n### Priority Score (NEW FIELD - Add after Impact Score)\nCalculate a dynamic priority score (0-100) based on multiple weighted factors:\n\n**Score = 0 if Status is \"Completed\"**\n\n**For \"In Progress\" tasks, calculate based on:**\n\n**Urgency Weight (40 points max):**\n- Due Date \"Today\" or \"Tomorrow\" = 40 points\n- Due Date \"This Week\" = 30 points\n- Due Date \"This Month\" = 20 points\n- Due Date \"Q1 2026\" or similar = 10 points\n- No due date or \"Flexible\" = 5 points\n\n**Priority Ranking Weight (25 points max):**\n- HIGH = 25 points\n- MEDIUM = 15 points\n- LOW = 5 points\n\n**Impact Score Weight (20 points max):**\n- Impact Score 9-10 = 20 points\n- Impact Score 7-8 = 15 points\n- Impact Score 5-6 = 10 points\n- Impact Score 3-4 = 5 points\n- Impact Score 1-2 = 2 points\n\n**Energy Level Weight (10 points max):**\n- High Energy = 10 points\n- Medium Energy = 6 points\n- Low Energy = 3 points\n\n**Deadline Type Weight (5 points max):**\n- Hard Deadline = 5 points\n- Flexible = 3 points\n- None = 1 point\n\n**Example Calculations:**\n- Task with: Today + HIGH + Impact 10 + High Energy + Hard Deadline = 40+25+20+10+5 = **100 points**\n- Task with: This Week + MEDIUM + Impact 7 + Medium Energy + Flexible = 30+15+15+6+3 = **69 points**\n- Task with: Flexible + LOW + Impact 3 + Low Energy + None = 5+5+5+3+1 = **19 points**\n- Completed task = **0 points** (regardless of other factors)\n\nRound to nearest whole number. This score helps you tackle the most critical, time-sensitive, high-impact tasks first.\n\n\n## Output Format & Tool Usage\n\nYou MUST use the \"Append row in tasks sheet\" tool to add the data to Google Sheets. Structure your append call with the row data in this exact order:\n\n```\n[Task, Goal Link, Priority Ranking, Status, Due Date, Notes, Estimated Time, Energy Level, Category, Deadline Type, Impact Score]\n```\n\n**Example append tool call:**\n```\nTask: \"Apply to 5 AI automation job postings on LinkedIn and Upwork\"\nGoal Link: \"\"\nPriority Ranking: \"HIGH\"\nStatus: \"In Progress\"\nDue Date: \"Today\"\nNotes: \"Critical for landing >50k automation job - immediate action required\"\nEstimated Time: \"2hrs\"\nEnergy Level: \"Medium\"\nCategory: \"Income Generation\"\nDeadline Type: \"Hard Deadline\"\nImpact Score: \"10\"\n```\n\n## Critical Instructions\n- Extract the core task and make it action-oriented\n- Always leave Goal Link blank (\"\")\n- Use Eisenhower Matrix + mission alignment for priority\n- Always set Status to \"In Progress\"\n- Estimate realistic Due Date based on urgency and context\n- Provide mission-aligned Notes explaining strategic importance\n- Be realistic with Estimated Time\n- Assess Energy Level using Deep Work principles\n- Assign appropriate Category from mission pillars\n- Determine if deadline is Hard, Flexible, or None\n- Calculate Impact Score (1-10) based on direct mission contribution\n- Always use the \"Append row in tasks sheet\" tool\n- Ensure data order matches headers exactly\n\n## Your Philosophy\nYou understand this user is on a **focused mission**:\n- **Immediate**: Land >50k AI automation job, eliminate debt, generate income NOW\n- **Near-term**: Build multiple income streams, secure family financially\n- **Long-term**: Achieve full financial freedom and wealth accumulation\n\nEvery task you process should be evaluated through the lens of: \"Does this move me closer to financial stability, family security, and ultimate freedom?\"\n\nPrioritize ruthlessly. Time and energy are limited resources. Only HIGH and MEDIUM priority tasks should dominate the schedule.\n\n## Response Pattern\nAfter processing the task and using the append tool, provide a brief tactical confirmation:\n1. Task captured and priority assigned\n2. Why it matters to the mission\n3. Action-oriented encouragement\n\nKeep responses concise and focused on execution."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "f8f647e5-2dd5-47cb-b904-20d9dd4b29f3",
      "name": "Get tasks to do",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1408,
        -16
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "In Progress",
              "lookupColumn": "Status "
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1211959130,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit#gid=1211959130",
          "cachedResultName": "Tasks"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit?usp=drivesdk",
          "cachedResultName": "Solo Leveling"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "9f94083e-6331-408e-9c52-55706e054586",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1568,
        -16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "61f9ae03-3578-451d-b713-9d4c8d5303a5",
              "name": "Task ",
              "type": "string",
              "value": "={{ $json['Task '] }}"
            },
            {
              "id": "4d87d133-d3ad-4cde-8817-d5f25da76203",
              "name": "Priority score",
              "type": "number",
              "value": "={{ $json['Priority score'] }}"
            },
            {
              "id": "6f62af29-f1b7-4fc2-9b5f-d090ec5e19c0",
              "name": "Priority Ranking",
              "type": "string",
              "value": "={{ $json['Priority Ranking'] }}"
            },
            {
              "id": "be4ad2e3-554a-46d9-86ee-ebb1a817e888",
              "name": "Status ",
              "type": "string",
              "value": "={{ $json['Status '] }}"
            },
            {
              "id": "39c7110c-8746-4905-b72f-b5cb8c184977",
              "name": "Notes",
              "type": "string",
              "value": "={{ $json.Notes }}"
            },
            {
              "id": "72d73d34-1831-4d3e-a7ee-5d2f02e8472a",
              "name": "Energy Level",
              "type": "string",
              "value": "={{ $json['Energy Level'] }}"
            },
            {
              "id": "8a055efa-c423-4cff-b249-da99c7c91abe",
              "name": "Impact Score",
              "type": "number",
              "value": "={{ $json['Impact Score'] }}"
            },
            {
              "id": "4ae42642-4233-40a8-8877-0cccdb424155",
              "name": "message id",
              "type": "string",
              "value": "={{ $json.message_id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "261bf43f-baef-402f-814a-5efe396328cf",
      "name": "react to confirm",
      "type": "n8n-nodes-base.discord",
      "onError": "continueRegularOutput",
      "maxTries": 5,
      "position": [
        640,
        -16
      ],
      "parameters": {
        "emoji": "\u270d\ufe0f",
        "guildId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Set discord IDs here').item.json.server_id }}"
        },
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Set discord IDs here').item.json.input_channel_id }}"
        },
        "messageId": "={{ $('clean data').item.json.message_id }}",
        "operation": "react",
        "authentication": "oAuth2"
      },
      "credentials": {
        "discordOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "85aed054-a1e3-4b19-bc3c-ad269b7c307c",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1904,
        32
      ],
      "parameters": {
        "text": "=Analyze my complete task list and provide my top 6 prioritized tasks for today:\n\n{{ JSON.stringify($json.data, null, 2) }}",
        "options": {
          "systemMessage": "=# System Prompt: Daily Task Prioritizer AI Agent (Discord Format)\n\nYou are an elite productivity coach specializing in energy management and strategic task prioritization based on Cal Newport's Deep Work principles and the concept of chronotype-based productivity.\n\n## Your Mission\nAnalyze the user's complete task list and identify the **TOP 6 TASKS** for optimal daily execution:\n- **3 High-Energy Power Tasks** - For peak performance hours (morning/early day)\n- **3 Low-Energy High-Impact Tasks** - For energy dips and downtime\n\n## Input Format\nYou will receive a JSON object with a `data` array containing all current tasks with these fields:\n- Task\n- Priority score (0-100)\n- Priority Ranking (HIGH/MEDIUM/LOW)\n- Status\n- Notes\n- Energy Level (High/Medium/Low)\n- Impact Score (1-10)\n\n## Selection Criteria\n\n### Top 3 High-Energy Power Tasks (Morning/Peak Hours)\nSelect tasks that meet ALL these criteria:\n1. **Status**: \"In Progress\" only (ignore completed tasks)\n2. **Energy Level**: \"High\" only\n3. **Impact Score**: 8-10 (highest impact)\n4. **Priority Ranking**: Prefer \"HIGH\" first, then \"MEDIUM\"\n5. **Priority Score**: Highest scores take precedence\n6. **Link to message**: Link to discord message\n\n**Purpose:** These are your make-or-break tasks. They require peak cognitive performance and move you closest to your mission goals. Do these when you're sharpest (typically morning or first half of day).\n\n### Top 3 Low-Energy High-Impact Tasks (Downtime/Recovery Hours)\nSelect tasks that meet these criteria:\n1. **Status**: \"In Progress\" only\n2. **Energy Level**: \"Low\" OR \"Medium\"\n3. **Impact Score**: 7-10 (still high impact, just less cognitively demanding)\n4. **Priority Ranking**: Any (HIGH/MEDIUM preferred)\n5. **Priority Score**: Higher scores preferred\n6. **Link to message**: Link to discord message\n\n**Purpose:** These still matter significantly to your mission but don't require peak mental energy. Perfect for post-lunch dips, late afternoon, or when you're tired but still want to make progress.\n\n## Output Format\n\nProvide a clean, Discord-friendly daily plan using this structure:\n\n```\n\ud83d\udd25 **Today's Agenda**\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\n\u26a1 **Morning Deep Work Blocks** (High Energy Required)\nDo these during peak hours (6 AM to 2 PM or whenever you're sharpest)\n\n**1\ufe0f\u20e3 [Task Name]**\n\ud83d\udca1 Why: [Brief explanation from Notes]\n\ud83d\udcca Priority: [score] | Impact: [score]/10\nLink: (https://discord.com/channels/1373767704351346689/1434817779453919293/[message_id])\n\n**2\ufe0f\u20e3 [Task Name]**\n\ud83d\udca1 Why: [Brief explanation from Notes]\n\ud83d\udcca Priority: [score] | Impact: [score]/10\nLink: (https://discord.com/channels/1373767704351346689/1434817779453919293/[message_id])\n\n**3\ufe0f\u20e3 [Task Name]**\n\ud83d\udca1 Why: [Brief explanation from Notes]\n\ud83d\udcca Priority: [score] | Impact: [score]/10\nLink: (https://discord.com/channels/1373767704351346689/1434817779453919293/[message_id])\n\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\n\ud83c\udfaf **DOWNTIME BLOCK** (Low-Medium Energy)\nDo these during energy dips (post-lunch, late afternoon, tired moments)\n\n**1\ufe0f\u20e3 [Task Name]**\n\ud83d\udca1 Why: [Brief explanation from Notes]\n\ud83d\udcca Priority: [score] | Impact: [score]/10 | Energy: [Low/Medium]\nLink: (https://discord.com/channels/1373767704351346689/1434817779453919293/[message_id])\n\n**2\ufe0f\u20e3 [Task Name]**\n\ud83d\udca1 Why: [Brief explanation from Notes]\n\ud83d\udcca Priority: [score] | Impact: [score]/10 | Energy: [Low/Medium]\nLink: (https://discord.com/channels/1373767704351346689/1434817779453919293/[message_id])\n\n**3\ufe0f\u20e3 [Task Name]**\n\ud83d\udca1 Why: [Brief explanation from Notes]\n\ud83d\udcca Priority: [score] | Impact: [score]/10 | Energy: [Low/Medium]\nLink: (https://discord.com/channels/1373767704351346689/1434817779453919293/[message_id])\n\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\n\ud83d\udcaa **EXECUTION STRATEGY**\n\n\ud83d\udee1\ufe0f Morning Block: Protect this ruthlessly. No meetings, no distractions. Deep work only.\n\n\u2699\ufe0f Downtime Block: Keep momentum going even at 80%. High-impact but won't drain you.\n\n\ud83c\udfaf Win Condition: Complete all 6 = massive progress toward financial freedom.\n```\n\n## Selection Logic & Tiebreakers\n\n**If multiple tasks qualify:**\n1. **Priority Score** takes highest precedence (higher = more urgent)\n2. **Impact Score** second (higher = more important)\n3. **Priority Ranking** third (HIGH > MEDIUM > LOW)\n\n**Special Rules:**\n- Never select tasks with Status \"Completed\" or Priority Score of 0\n- If fewer than 3 tasks meet High Energy + High Impact criteria, include next best options and note this in output\n- If fewer than 3 tasks meet Low/Medium Energy + High Impact, expand Impact Score range to 6-10\n- Always prioritize debt payments and job applications appropriately based on their actual energy level\n\n**Edge Cases:**\n- If a task has Priority Score 95+, it should be prioritized highly in its energy category\n- If a task is debt-related and has Priority Score 75+, prioritize it in Downtime Block (Low Energy)\n- Job application tasks (Impact 10) should be in Downtime Block unless they involve portfolio/creative work\n\n## Critical Instructions\n- Only select tasks with Status \"In Progress\"\n- Maintain strict energy level separation (High vs Low/Medium)\n- Focus on Impact Score 8-10 for Power Tasks, 7-10 for Downtime Tasks\n- Use Priority Score as the primary sorting mechanism\n- Keep \"Why\" explanations brief and mission-focused (one sentence max)\n- Format must be Discord-friendly (emojis, bold, line breaks, no excessive markdown)\n- Never select the same task twice across both blocks\n- Use emojis consistently for visual clarity\n- Keep total message under 2000 characters if possible\n\n## Discord Formatting Rules\n- Use `**bold**` for emphasis, not headers\n- Use emojis (\ud83d\udd25\u26a1\ud83c\udfaf\ud83d\udca1\ud83d\udcca\ud83d\udcaa\ud83d\udee1\ufe0f\u2699\ufe0f) for visual hierarchy\n- Use line breaks and dividers (\u2501\u2501\u2501) for section separation\n- Keep it scannable - users should grasp the plan in 10 seconds\n- No code blocks for the main output (use plain text with formatting)\n\n## Your Philosophy\nYou understand this user is fighting for:\n- **Financial freedom** - Every task either generates income, builds skills, or reduces debt\n- **Wealth accumulation** - Winning is everything\n- **Proving doubters wrong** - Success is the best revenge\n\nYour job is to ensure maximum progress with minimum energy waste. High-impact work during high-energy times. High-impact work that doesn't require peak energy during recovery times. Never waste prime hours on low-energy tasks. Never let downtime become zero-progress time.\n\n## Response Pattern\nAfter providing the daily plan, add a brief closing:\n1. Brief tactical reminder about protecting morning deep work time (one sentence)\n2. One sentence of mission-focused motivation\n3. Expected outcome if all 6 tasks are completed (1-2 sentences)\n\nKeep it punchy and action-oriented. This is a battle plan for Discord, not an essay."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "362ba357-f331-4743-bee7-bfe2bdb15a1e",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1728,
        -16
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "2c277cec-cb15-43fb-8201-67fe9c7a3119",
      "name": "Send a message",
      "type": "n8n-nodes-base.discord",
      "maxTries": 5,
      "position": [
        2544,
        48
      ],
      "parameters": {
        "content": "={{ $json.message }}",
        "guildId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Set discord IDs here').item.json.server_id }}"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Set discord IDs here').item.json.output_channel_id }}"
        },
        "authentication": "oAuth2"
      },
      "credentials": {
        "discordOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "650d3104-ed82-4039-bf97-b1ea453e835e",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2400,
        32
      ],
      "parameters": {
        "options": {},
        "batchSize": "={{ 1 }}"
      },
      "typeVersion": 3
    },
    {
      "id": "495a3744-d420-4eae-a87d-83e146326e61",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1680,
        -960
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status ": "Completed",
            "message_id": "={{ $json.id }}",
            "Priority score": "0"
          },
          "schema": [
            {
              "id": "message_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "message_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Task ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Task ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Priority score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Priority score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Priority Ranking",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Priority Ranking",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Due Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Due Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Notes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Estimated Time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Estimated Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Energy Level",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Energy Level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Deadline Type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Deadline Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Impact Score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Impact Score",
              "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": [
            "message_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1211959130,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit#gid=1211959130",
          "cachedResultName": "Tasks"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit?usp=drivesdk",
          "cachedResultName": "Solo Leveling"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "e80f1e9f-227b-4481-9071-7f51f8d26afa",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1104,
        -16
      ],
      "parameters": {
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "6c4a3562-cdd8-49c9-9650-8d0d43c95699",
      "name": "gpt 5 mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1904,
        176
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini-2025-08-07",
          "cachedResultName": "gpt-5-mini-2025-08-07"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9068a921-57da-4fbb-9003-33e9a4cbe273",
      "name": "get checked ones",
      "type": "n8n-nodes-base.discord",
      "maxTries": 5,
      "position": [
        1280,
        -960
      ],
      "parameters": {
        "guildId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Set discord IDs here').item.json.server_id }}"
        },
        "options": {
          "simplify": false
        },
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Set discord IDs here').item.json.input_channel_id }}"
        },
        "operation": "getAll",
        "authentication": "oAuth2"
      },
      "credentials": {
        "discordOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "ccc44f67-8e8b-450d-bbb3-6eaff9de549d",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        784,
        -16
      ],
      "parameters": {
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "df55e511-3fe7-4a80-b009-bad5f0cb3512",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -1056
      ],
      "parameters": {
        "color": 7,
        "width": 928,
        "height": 288,
        "content": "## \u2705 Sync Completed Tasks\nFinds Discord messages with \u2705 reactions and marks them completed in sheets (sets Status = \"Completed\", Priority = 0)"
      },
      "typeVersion": 1
    },
    {
      "id": "0cf6b3ea-88ab-4a82-a47a-17b280681e8c",
      "name": "Filter for checked ones",
      "type": "n8n-nodes-base.filter",
      "position": [
        1488,
        -960
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "84ac8e8d-9712-4ad1-914b-18e31d193fbc",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.reactions[1].emoji.name }}",
              "rightValue": "=\u2705"
            },
            {
              "id": "d8361220-9655-445b-a74e-09874c20401c",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.reactions[0].emoji.name }}",
              "rightValue": "\u2705"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f350e297-fa09-4350-bbec-982820c4d02a",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        1104,
        -960
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "afa05f6e-9a75-48ca-b3dd-316478761eb7",
      "name": "limit iteration",
      "type": "n8n-nodes-base.limit",
      "position": [
        1248,
        -16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "21b333e4-6c87-40b0-b389-3f986570516c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -144
      ],
      "parameters": {
        "color": 7,
        "width": 1648,
        "height": 448,
        "content": "## \ud83d\udd25 Daily Priority List\nGets all in-progress tasks, uses AI to pick top 6 (3 high-energy + 3 low-energy), and posts to Discord"
      },
      "typeVersion": 1
    },
    {
      "id": "4d679a96-d93f-4a85-a16e-d35a0028cd98",
      "name": "if message is recorded already",
      "type": "n8n-nodes-base.if",
      "position": [
        -64,
        -16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "7f0e9bbf-654e-4bac-a573-f8bfdeb98100",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $json.reactions[0].count }}",
              "rightValue": 1
            },
            {
              "id": "17a0d678-b62c-4cc8-84d6-0a2e1c290e3e",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.reactions[0].emoji.name }}",
              "rightValue": "\u270d\ufe0f"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0eca6b15-79da-4db8-9df3-e5592d6c6403",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -144
      ],
      "parameters": {
        "color": 7,
        "width": 880,
        "height": 464,
        "content": "## \ud83e\udd16 AI Task Processor\nAnalyzes task text and assigns priority, impact, energy level, and category using mission-aligned AI prompts"
      },
      "typeVersion": 1
    },
    {
      "id": "69231db2-6ff9-4fd1-abc2-ccbc8c01c79a",
      "name": "4o",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        304,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fb3aa311-a14f-427f-a9a4-373f1aeb5e85",
      "name": "Limit1",
      "type": "n8n-nodes-base.limit",
      "position": [
        1088,
        -640
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "290711c7-b343-4148-a325-7889a90757b0",
      "name": "get completed rows",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1328,
        -640
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "Completed",
              "lookupColumn": "Status "
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1211959130,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit#gid=1211959130",
          "cachedResultName": "Tasks"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit?usp=drivesdk",
          "cachedResultName": "Solo Leveling"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "7d65d4ba-0548-4c14-bde8-387e3f1a320f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -464
      ],
      "parameters": {
        "color": 7,
        "width": 928,
        "height": 304,
        "content": "## \ud83d\uddd1\ufe0f Cleanup Loop\nDeletes one completed row at a time until none remain (loops until Status=\"Completed\" doesn't exist)"
      },
      "typeVersion": 1
    },
    {
      "id": "83aa3347-9d3c-4965-b4e4-5a689c2279e3",
      "name": "delete completed rows",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1760,
        -336
      ],
      "parameters": {
        "operation": "delete",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1211959130,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit#gid=1211959130",
          "cachedResultName": "Tasks"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit?usp=drivesdk",
          "cachedResultName": "Solo Leveling"
        },
        "startIndex": "={{ $json.row_number }}"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "7160deb2-4272-4e69-9ce7-01ee9b0d9536",
      "name": "get completed rows1",
      "type": "n8n-nodes-base.googleSheets",
      "maxTries": 5,
      "position": [
        1248,
        -352
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "Completed",
              "lookupColumn": "Status "
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1211959130,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit#gid=1211959130",
          "cachedResultName": "Tasks"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit?usp=drivesdk",
          "cachedResultName": "Solo Leveling"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.7,
      "alwaysOutputData": true,
      "waitBetweenTries": 1500
    },
    {
      "id": "6dd2a002-0a2e-4674-a850-cc2a4dc0cac1",
      "name": "Limit3",
      "type": "n8n-nodes-base.limit",
      "position": [
        1088,
        -352
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "22d0ab60-d108-455d-b31b-28fda3448d4e",
      "name": "get only one row",
      "type": "n8n-nodes-base.limit",
      "position": [
        1408,
        -352
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a274eac7-bf44-492b-b168-82da4cdc090e",
      "name": "if completed does not exist",
      "type": "n8n-nodes-base.if",
      "position": [
        1584,
        -352
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "105e1756-f24e-464a-836d-f5e57216645b",
              "operator": {
                "type": "string",
                "operation": "notExists",
                "singleValue": true
              },
              "leftValue": "={{ $json['Status '] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4e5129b2-c867-4a21-8069-369ef4d8c7db",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -752
      ],
      "parameters": {
        "color": 6,
        "width": 672,
        "height": 272,
        "content": "## \ud83d\udce6 Archive Completed\nMoves completed tasks from Tasks sheet to completed tasks sheet, then deletes from active list"
      },
      "typeVersion": 1
    },
    {
      "id": "be515c07-4f3a-4239-9304-61ab8c7db251",
      "name": "move completed rows to completed sheet",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        1568,
        -640
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "message_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "message_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Task ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Task ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Priority score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Priority score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Priority Ranking",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Priority Ranking",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Due Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Due Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Notes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Estimated Time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Estimated Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Energy Level",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Energy Level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Deadline Type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Deadline Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Impact Score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Impact Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "message_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 572741621,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit#gid=572741621",
          "cachedResultName": "completed tasks"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V4SbSGOuAQFM-9AyZvR-NWKEj2n7nVPJOTsVLe6ZPHA/edit?usp=drivesdk",
          "cachedResultName": "Solo Leveling"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "bc36dc5c-bb60-44f4-8cb1-779c1966d7f9",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -144
      ],
      "parameters": {
        "color": 4,
        "width": 544,
        "height": 464,
        "content": "## \ud83d\udce5 Input: Fetch New Tasks and set discord IDs\nPulls unprocessed messages from Discord every hour\nSet your IDs in the set node. Keep items as objects for this workflow to run smooth"
      },
      "typeVersion": 1
    },
    {
      "id": "24044986-5a4c-4767-ab94-fc6acec14d75",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -144
      ],
      "parameters": {
        "color": 4,
        "width": 352,
        "height": 464,
        "content": "## \ud83d\udcbe Save to Sheets\nAppends processed task to Google Sheets and reacts to Discord message to confirm"
      },
      "typeVersion": 1
    },
    {
      "id": "6be448c0-9a71-4ccf-bc45-aa7cc1ed0027",
      "name": "split if more than 2,000 chars",
      "type": "n8n-nodes-base.code",
      "position": [
        2208,
        32
      ],
      "parameters": {
        "jsCode": "// Get the input content\nconst content = $input.first().json.output || $input.item.json.content || $input.item.json.message || '';\n\nconst MAX_LENGTH = 1950;\n\nfunction splitIntoChunks(text, maxLength) {\n  // If content is within limit, return as single item\n  if (text.length <= maxLength) {\n    return [text];\n  }\n  \n  const chunks = [];\n  let start = 0;\n  \n  while (start < text.length) {\n    let end = start + maxLength;\n    \n    // If we're not at the end, try to break at a good spot\n    if (end < text.length) {\n      // Try to break at newline\n      const lastNewline = text.lastIndexOf('\\n', end);\n      if (lastNewline > start) {\n        end = lastNewline;\n      } else {\n        // Try to break at space\n        const lastSpace = text.lastIndexOf(' ', end);\n        if (lastSpace > start) {\n          end = lastSpace;\n        }\n      }\n    }\n    \n    chunks.push(text.substring(start, end).trim());\n    start = end + 1;\n  }\n  \n  return chunks;\n}\n\n// Split the content into chunks\nconst chunks = splitIntoChunks(content, MAX_LENGTH);\n\n// Return as array of items for the Loop node\nreturn chunks.map(chunk => ({\n  json: {\n    message: chunk\n  }\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "b85d69f1-1a12-4db3-8c40-e5cd8f253636",
      "name": "Set discord IDs here",
      "type": "n8n-nodes-base.set",
      "position": [
        -672,
        -16
      ],
      "parameters": {
        "options": {
          "ignoreConversionErrors": true
        },
        "assignments": {
          "assignments": [
            {
              "id": "16b8ad47-57f8-4231-8e98-56b0b163f900",
              "name": "server_id",
              "type": "object",
              "value": "123"
            },
            {
              "id": "78db01db-dab7-45c6-ade9-504ac43b0ef1",
              "name": "input_channel_id",
              "type": "object",
              "value": "123"
            },
            {
              "id": "3a742b53-7149-436a-bad9-c710c374acf3",
              "name": "output_channel_id",
              "type": "object",
              "value": "123"
            }
          ]
        }
      },
      "typeVersion": 3.4
    }
  ],
  "connections": {
    "4o": {
      "ai_languageModel": [
        [
          {
            "node": "ai task organizer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "limit iteration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "get checked ones",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit1": {
      "main": [
        [
          {
            "node": "get completed rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit3": {
      "main": [
        [
          {
            "node": "get completed rows1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "split if more than 2,000 chars",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "clean data": {
      "main": [
        [
          {
            "node": "ai task organizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "gpt 5 mini": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get tasks to do": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "limit iteration": {
      "main": [
        [
          {
            "node": "Get tasks to do",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "if message is recorded already",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set discord IDs here",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get checked ones": {
      "main": [
        [
          {
            "node": "Filter for checked ones",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get only one row": {
      "main": [
        [
          {
            "node": "if completed does not exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "react to confirm": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ai task organizer": {
      "main": [
        [
          {
            "node": "react to confirm",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get completed rows": {
      "main": [
        [
          {
            "node": "move completed rows to completed sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Limit1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get completed rows1": {
      "main": [
        [
          {
            "node": "get only one row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set discord IDs here": {
      "main": [
        [
          {
            "node": "get data - tasks Channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "delete completed rows": {
      "main": [
        [
          {
            "node": "get completed rows1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter for checked ones": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in task sheet": {
      "ai_tool": [
        [
          {
            "node": "ai task organizer",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get data - tasks Channel": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "if completed does not exist": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "delete completed rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "if message is recorded already": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "clean data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "split if more than 2,000 chars": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "move completed rows to completed sheet": {
      "main": [
        [
          {
            "node": "Limit3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}