{
  "id": "8zTGMaCzesMzXtYG",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Task Management Workflow",
  "tags": [],
  "nodes": [
    {
      "id": "9afd2b69-ef86-4bf5-bcfd-7f5f38807bcb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2800,
        32
      ],
      "parameters": {
        "width": 544,
        "height": 624,
        "content": "## AI Task Management Workflow\n\nAutomates task intake, validation, prioritization, and routing using Webhook, Google Sheets, AI, Gmail, Slack, and Google Tasks.\n\n## Flow:\n\nWebhook \u2192 Validate Task \u2192 Check Validity \u2192 Save to Sheet \u2192 API Response  \nManual/Scheduled Trigger \u2192 Read Tasks \u2192 Filter & Sort \u2192 Priority Check\n\n## Setup Steps\n\nConfigure the Webhook to use Respond to Webhook Node and ensure the Google Sheet includes all task fields, status, and timestamps. Set up credentials for Google Sheets, Slack, Gmail, Google Tasks, and the AI node. Confirm field mappings, validation rules, and update steps are correctly aligned across both intake and processing flows. \n\n\n## How It Works\n\nTasks enter through the Webhook, where input is validated and valid records are stored in Google Sheets with an API response. A manual or scheduled flow then reads pending tasks, filters and sorts them by priority. High-priority tasks trigger Google Tasks and Slack alerts, while medium/low tasks generate AI email summaries."
      },
      "typeVersion": 1
    },
    {
      "id": "38d6b95f-c46c-4b34-b19d-b463306a6454",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1856,
        128
      ],
      "parameters": {
        "color": 7,
        "width": 544,
        "height": 512,
        "content": "## Task Validation Gateway\n\nReceives incoming task data through Webhook, validates required fields and formatting in JavaScript, then uses an IF condition to separate valid tasks from invalid or incomplete submissions."
      },
      "typeVersion": 1
    },
    {
      "id": "d96d7e7d-64a2-467c-b04c-f080e6895fa2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        128
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 512,
        "content": "## Prepare Task Record\n\nProcesses validated task data, formats required fields, stores the task in Google Sheets, returns a success response for valid entries, and routes invalid task submissions to rejection handling."
      },
      "typeVersion": 1
    },
    {
      "id": "977c07b2-745e-4537-bd81-6100e4b7994c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1872,
        736
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 704,
        "content": "## Scheduled Task Fetch\n\nTriggers the workflow automatically on a schedule and retrieves task records from Google Sheets, enabling regular processing of stored tasks without requiring any manual execution or intervention."
      },
      "typeVersion": 1
    },
    {
      "id": "f2500279-e7ad-4d4b-b3b8-7482751c1d2a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        736
      ],
      "parameters": {
        "color": 7,
        "width": 528,
        "height": 704,
        "content": "## Task Prioritization Logic\n\nProcesses fetched tasks through JavaScript, sorts them by importance or urgency, and uses a conditional check to route records into different handling paths based on priority level."
      },
      "typeVersion": 1
    },
    {
      "id": "2c2fcd42-dee0-4ab6-b1b5-ecfd49ac4c0f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        736
      ],
      "parameters": {
        "color": 7,
        "width": 768,
        "height": 304,
        "content": "## High Priority Task Routing\n\nRoutes urgent tasks into the high-priority branch, where they can be assigned, tracked, and pushed into immediate action workflows for faster execution and visibility."
      },
      "typeVersion": 1
    },
    {
      "id": "fa7dae69-54ed-4b04-91de-a3403618fcf4",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        1136
      ],
      "parameters": {
        "color": 7,
        "width": 768,
        "height": 304,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## AI Email Summary Flow\n\nFormats medium and low-priority tasks, sends them to an AI model for summarization, and delivers the generated task digest through email for organized follow-up."
      },
      "typeVersion": 1
    },
    {
      "id": "2ad7eb16-5c1c-4cb3-93e7-083beab05bb5",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        736
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 704,
        "content": "## Task Status Update\n\nUpdates processed task records in Google Sheets after routing, ensuring statuses, actions, and completion details are tracked correctly to avoid duplicate handling in future workflow runs."
      },
      "typeVersion": 1
    },
    {
      "id": "4513769c-69c8-474c-8cd8-d1d9d9e05842",
      "name": "Receive New Task Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1824,
        368
      ],
      "parameters": {
        "path": "12b98afd-a7a7-4861-a42c-1bea853d943e",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "5a59653b-885b-429b-b48d-7a27dc699139",
      "name": "Validate and Format Task Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -1632,
        368
      ],
      "parameters": {
        "jsCode": "const results = [];\n\nfor (const item of $input.all()) {\n  const data = item.json.body || {};\n\n  const taskName = (data[\"Task Name\"] || \"\").trim();\n  const priority = (data[\"Priority\"] || \"\").trim().toLowerCase();\n  const category = (data[\"Category\"] || \"\").trim();\n  const dueDateRaw = (data[\"Due Date\"] || \"\").trim();\n\n  let dueDate = \"\";\n\n  // Convert MM/DD/YYYY to YYYY-MM-DD if needed\n  if (dueDateRaw) {\n    const parts = dueDateRaw.split(\"/\");\n    if (parts.length === 3) {\n      const [month, day, year] = parts;\n      dueDate = `${year}-${month.padStart(2, \"0\")}-${day.padStart(2, \"0\")}`;\n    } else {\n      dueDate = dueDateRaw;\n    }\n  }\n\n  const validPriorities = [\"high\", \"medium\", \"low\"];\n  const errors = [];\n\n  if (!taskName) errors.push(\"Task Name is required\");\n  if (!priority || !validPriorities.includes(priority)) {\n    errors.push(\"Priority must be High, Medium, or Low\");\n  }\n\n  results.push({\n    json: {\n      taskName,\n      priority,\n      category,\n      dueDate,\n      isValid: errors.length === 0,\n      errors,\n      status: \"pending\",\n      createdAt: new Date().toISOString()\n    }\n  });\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "29d86c86-9507-4064-af24-65e3b1e66aed",
      "name": "Is Task Valid?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1440,
        368
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "7c1c6b72-76dc-485a-9498-d1c8e6967d5b",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.isValid }}",
              "rightValue": true
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.3
    },
    {
      "id": "5df3efbf-6b7f-4710-a732-5edddebfc7d9",
      "name": "Save Task to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -912,
        288
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "={{ $json.status }}",
            "dueDate": "={{ $json['Due Date'] }}",
            "category": "={{ $json.Category }}",
            "priority": "={{ $json.Priority }}",
            "taskName": "={{ $json['Task Name'] }}",
            "createdAt": "={{ $json.createdAt }}"
          },
          "schema": [
            {
              "id": "taskName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "taskName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "priority",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "priority",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "dueDate",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "dueDate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "createdAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "createdAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "processedAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "processedAt",
              "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/1lqLTqsEEBeKH0huGm6KAlAaUsFv4YMPNFeNU57mwCU0/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1vyOm_vm8l0ba0Mb2ug35jcNUE1sjzNiSSjm9JelcjuA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1vyOm_vm8l0ba0Mb2ug35jcNUE1sjzNiSSjm9JelcjuA/edit?usp=drivesdk",
          "cachedResultName": "sheet_a"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "01dadf4a-e622-4e5c-a38a-fe155c68d9a9",
      "name": "Send Success Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -704,
        288
      ],
      "parameters": {
        "options": {},
        "respondWith": "allIncomingItems"
      },
      "typeVersion": 1.5
    },
    {
      "id": "5419888b-7150-49ab-9ae5-510b5437aacd",
      "name": "Reject Invalid Task",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -1104,
        496
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4fa064d8-af04-41fb-a873-2c719a0f52ce",
      "name": "Run Task Processing Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1840,
        1040
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "17a36c8c-9a07-4f37-bbc9-cd4d5fc864aa",
      "name": "Fetch Pending Tasks from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1648,
        1040
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1vyOm_vm8l0ba0Mb2ug35jcNUE1sjzNiSSjm9JelcjuA/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1vyOm_vm8l0ba0Mb2ug35jcNUE1sjzNiSSjm9JelcjuA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1vyOm_vm8l0ba0Mb2ug35jcNUE1sjzNiSSjm9JelcjuA/edit?usp=drivesdk",
          "cachedResultName": "sheet_a"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "45c541de-3f11-473a-aaca-559988699f06",
      "name": "Prepare Task Data for Prioritization",
      "type": "n8n-nodes-base.code",
      "position": [
        -1456,
        1040
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// Step 1: keep only pending tasks\nconst pendingTasks = items.filter(item => {\n  return (item.json.status || \"\").toString().trim().toLowerCase() === \"pending\";\n});\n\n// Step 2: remove duplicates\nconst seen = new Set();\nconst uniqueTasks = [];\n\nfor (const item of pendingTasks) {\n  const taskName = (item.json.taskName || \"\").toString().trim();\n  const dueDate = (item.json.dueDate || \"\").toString().trim();\n  const priorityRaw = (item.json.priority || \"\").toString().trim().toLowerCase();\n  const category = (item.json.category || \"\").toString().trim();\n  const createdAt = (item.json.createdAt || \"\").toString().trim();\n\n  const uniqueKey = `${taskName.toLowerCase()}_${dueDate}_${priorityRaw}`;\n\n  if (!seen.has(uniqueKey)) {\n    seen.add(uniqueKey);\n\n    let priority = \"Low\";\n    let priorityRank = 3;\n\n    if (priorityRaw === \"high\") {\n      priority = \"High\";\n      priorityRank = 1;\n    } else if (priorityRaw === \"medium\") {\n      priority = \"Medium\";\n      priorityRank = 2;\n    } else if (priorityRaw === \"low\") {\n      priority = \"Low\";\n      priorityRank = 3;\n    }\n\n    uniqueTasks.push({\n      json: {\n        row_number: item.json.row_number,\n        taskName,\n        priority,\n        priorityRank,\n        category,\n        dueDate,\n        status: \"pending\",\n        createdAt\n      }\n    });\n  }\n}\n\nreturn uniqueTasks;"
      },
      "typeVersion": 2
    },
    {
      "id": "5b7cd1c5-6ff0-4976-9f9f-9184f75be861",
      "name": "Sort Tasks by Priority",
      "type": "n8n-nodes-base.sort",
      "position": [
        -1280,
        1040
      ],
      "parameters": {
        "options": {},
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "priorityRank"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ca581f57-06a9-44d7-9368-31372041fc26",
      "name": "Is Task High Priority?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1088,
        1040
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "21320958-78cf-4470-a3c1-86a7b4120400",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $json.priorityRank }}",
              "rightValue": 1
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "7323744f-70fa-4439-8a9b-01450f10fb1c",
      "name": "Create Google Task for Urgent Item",
      "type": "n8n-nodes-base.googleTasks",
      "position": [
        -768,
        864
      ],
      "parameters": {
        "task": "MDQ5NjkxNjA1OTI5NDc0NjYzNjQ6MDow",
        "title": "={{ $json.taskName }}",
        "additionalFields": {
          "notes": "=Priority: {{ $json.priority }}\nCategory: {{ $json.category }} \nStatus: {{ $json.status }} \nCreated At: {{ $json.createdAt }}"
        }
      },
      "credentials": {
        "googleTasksOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c2451dfc-78bd-4142-ae92-3af12f6ce7bb",
      "name": "Send Slack Alert for High Priority Task",
      "type": "n8n-nodes-base.slack",
      "position": [
        -512,
        864
      ],
      "parameters": {
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "3c5917c9-a53e-4ba3-90e4-290025aca295",
      "name": "Format Tasks for AI Summary",
      "type": "n8n-nodes-base.code",
      "position": [
        -848,
        1168
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// If no tasks, return empty\nif (!items.length) {\n  return [];\n}\n\n// Create task list text\nconst taskLines = items.map((item, index) => {\n  return `${index + 1}. ${item.json.taskName} | Priority: ${item.json.priority} | Category: ${item.json.category} | Due: ${item.json.dueDate}`;\n});\n\n// Create one combined digest input\nconst digestText = `Here are today's Medium and Low priority tasks:\\n\\n${taskLines.join(\"\\n\")}`;\n\n// Return one single item for AI/Gmail\nreturn [\n  {\n    json: {\n      taskCount: items.length,\n      tasks: items.map(item => item.json),\n      digestText: digestText\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "ef871eb4-3dfb-4cc1-94dc-f1ecd8b49e7e",
      "name": "Generate AI Task Summary",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -640,
        1168
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "content": "=You are an assistant helping summarize daily tasks into a professional email digest.\n\nBelow is a list of Medium and Low priority tasks for today:\n\n{{ $json.digestText }}\n\nYour job:\n1. Write a clean and professional email summary\n2. Group tasks clearly in bullet points\n3. Keep it short and readable\n4. Add a polite closing line\n\nReturn only the final email body text."
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "05e3b3d0-73ea-4135-a076-db4fa853f93c",
      "name": "Send AI Task Summary Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -304,
        1168
      ],
      "parameters": {
        "message": "={{ $json.output[0].content[0].text }}",
        "options": {},
        "subject": "task"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c2bed2db-2915-4902-8419-84bd8360747c",
      "name": "Update Task Status in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -32,
        1024
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "Processed",
            "row_number": "={{ $('Is Task High Priority?').item.json.row_number }}",
            "processedAt": "={{ $now }}"
          },
          "schema": [
            {
              "id": "taskName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "taskName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "priority",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "priority",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "dueDate",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "dueDate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "createdAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "createdAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "processedAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "processedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1lqLTqsEEBeKH0huGm6KAlAaUsFv4YMPNFeNU57mwCU0/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1vyOm_vm8l0ba0Mb2ug35jcNUE1sjzNiSSjm9JelcjuA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1vyOm_vm8l0ba0Mb2ug35jcNUE1sjzNiSSjm9JelcjuA/edit?usp=drivesdk",
          "cachedResultName": "sheet_a"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "fa57e571-8adf-49aa-b017-9f965eb47e01",
      "name": "Edit The data For Sheet",
      "type": "n8n-nodes-base.set",
      "position": [
        -1104,
        288
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "aa4150b7-fddc-4df5-aa57-da346ac2cdd4",
              "name": "=taskName",
              "type": "string",
              "value": "={{$json.taskName}}"
            },
            {
              "id": "038bf618-cb44-454e-9009-f5d42a9efbed",
              "name": "=priority",
              "type": "string",
              "value": "={{$json.priority}}"
            },
            {
              "id": "bd169598-a266-48c7-8705-63af2016c12d",
              "name": "category",
              "type": "string",
              "value": "={{$json.category}}"
            },
            {
              "id": "ab3539a0-8a30-4630-896d-f430cbd30910",
              "name": "dueDate",
              "type": "string",
              "value": "={{$json.dueDate}}"
            },
            {
              "id": "9747b314-3573-4abf-806a-363f07f35a5f",
              "name": "status",
              "type": "string",
              "value": "={{$json.status}}"
            },
            {
              "id": "1b62b54f-b4fe-4349-b5c3-c2535b1eee02",
              "name": "createdAt",
              "type": "string",
              "value": "={{$json.createdAt}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "3907a57b-d6d1-43be-ab4b-937eedb2c49b",
  "connections": {
    "Is Task Valid?": {
      "main": [
        [
          {
            "node": "Edit The data For Sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reject Invalid Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Task High Priority?": {
      "main": [
        [
          {
            "node": "Create Google Task for Urgent Item",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Tasks for AI Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort Tasks by Priority": {
      "main": [
        [
          {
            "node": "Is Task High Priority?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit The data For Sheet": {
      "main": [
        [
          {
            "node": "Save Task to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Task Summary": {
      "main": [
        [
          {
            "node": "Send AI Task Summary Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive New Task Request": {
      "main": [
        [
          {
            "node": "Validate and Format Task Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Task to Google Sheets": {
      "main": [
        [
          {
            "node": "Send Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send AI Task Summary Email": {
      "main": [
        [
          {
            "node": "Update Task Status in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Tasks for AI Summary": {
      "main": [
        [
          {
            "node": "Generate AI Task Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Task Processing Schedule": {
      "main": [
        [
          {
            "node": "Fetch Pending Tasks from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate and Format Task Data": {
      "main": [
        [
          {
            "node": "Is Task Valid?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Pending Tasks from Sheet": {
      "main": [
        [
          {
            "node": "Prepare Task Data for Prioritization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Google Task for Urgent Item": {
      "main": [
        [
          {
            "node": "Send Slack Alert for High Priority Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Task Data for Prioritization": {
      "main": [
        [
          {
            "node": "Sort Tasks by Priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Slack Alert for High Priority Task": {
      "main": [
        [
          {
            "node": "Update Task Status in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}