{
  "id": "me2HK2ZBjo6ri8t3",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Developer Onboarding Q&A Audit",
  "tags": [],
  "nodes": [
    {
      "id": "78b2e6d5-14d7-4f2c-9c38-2e7af9df5e40",
      "name": "Section: Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        1632
      ],
      "parameters": {
        "color": 4,
        "height": 180,
        "content": "## 1. Capture New Tasks\n\nTriggers whenever a task is created in your ClickUp workspace."
      },
      "typeVersion": 1
    },
    {
      "id": "6d2eb8f5-835d-475d-a0c5-11ee8732e85f",
      "name": "New Task Created",
      "type": "n8n-nodes-base.clickUpTrigger",
      "position": [
        -48,
        1856
      ],
      "parameters": {
        "team": "9016683627",
        "events": [
          "taskCreated"
        ],
        "filters": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "clickUpOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d64c6622-2687-4383-9022-1e632f96daff",
      "name": "Section: Data Prep",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        1632
      ],
      "parameters": {
        "color": 4,
        "height": 180,
        "content": "## 2. Data Preparation\n\nExtracts and formats task details for logging and AI analysis."
      },
      "typeVersion": 1
    },
    {
      "id": "2cf8930b-2be7-4261-a508-6383f028f503",
      "name": "Extract Task Data",
      "type": "n8n-nodes-base.set",
      "position": [
        176,
        1856
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "task",
              "name": "task",
              "type": "string",
              "value": "={{ $json.name }}"
            },
            {
              "id": "assignee",
              "name": "assignee",
              "type": "string",
              "value": "={{ $json.assignees && $json.assignees.length > 0 ? $json.assignees[0].username : 'Unassigned' }}"
            },
            {
              "id": "description",
              "name": "description",
              "type": "string",
              "value": "={{ $json.description || 'No description' }}"
            },
            {
              "id": "task_id",
              "name": "task_id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "task_url",
              "name": "task_url",
              "type": "string",
              "value": "={{ $json.url }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1d3d4a50-bd24-4014-b964-ea7ad984e27b",
      "name": "Log to Tracking Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        1856
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Pending Review",
            "Assignee": "={{ $json.assignee }}",
            "Task name": "={{ $json.task }}",
            "Description": "={{ $json.description }}"
          },
          "schema": [
            {
              "id": "Task name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Task name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Assignee",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Assignee",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": []
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1770504814,
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1uN_D7qOoP_-5o0mmRxGtdB7-TQLW5fKJsivgGJOBL-k",
          "cachedResultName": "Untitled spreadsheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "993bab6b-392f-493c-b420-08c638368486",
      "name": "Section: AI Audit",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        1632
      ],
      "parameters": {
        "color": 4,
        "height": 180,
        "content": "## 3. AI Quality Analysis\n\nGPT-4o-mini evaluates task completeness and scores it 0-100."
      },
      "typeVersion": 1
    },
    {
      "id": "344d3b10-be0b-482c-a7b0-16c9d8d830a1",
      "name": "AI Quality Analyzer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        624,
        1856
      ],
      "parameters": {
        "text": "=Analyze this developer onboarding task for completeness:\n\nTask: {{ $json.task }}\nDescription: {{ $json.description }}\n\nEvaluate these critical areas:\n1. **Tooling** (25 pts): Are required tools, IDEs, packages mentioned?\n2. **Credentials** (25 pts): Are account setups, API keys, access instructions covered?\n3. **Environment** (25 pts): Are local configs, dependencies, setup steps explained?\n4. **Documentation** (25 pts): Are instructions clear with examples?\n\nProvide your response in this exact format:\nScore: [number 0-100]\nMissing: [comma-separated list]\nRecommendations: [specific improvements]\nStatus: [Complete/Incomplete]",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "04972ecd-5bff-44b3-a88d-d30a17f7c9c5",
      "name": "GPT-4o Mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        696,
        2080
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "25d0c0ca-15da-48dc-91f8-04bb580d2f56",
      "name": "Section: Processing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        1632
      ],
      "parameters": {
        "color": 4,
        "height": 180,
        "content": "## 4. Parse & Route\n\nExtracts AI score and routes to appropriate path based on quality threshold."
      },
      "typeVersion": 1
    },
    {
      "id": "874f0480-49f4-4b55-96de-99c996a1f510",
      "name": "Parse AI Score",
      "type": "n8n-nodes-base.code",
      "position": [
        976,
        1856
      ],
      "parameters": {
        "jsCode": "// Parse AI output and extract score\nconst output = $input.item.json.output || \"\";\nconst scoreMatch = output.match(/Score:\\s*(\\d+)/);\nconst score = scoreMatch ? parseInt(scoreMatch[1]) : 0;\n\n// Extract other details\nconst missingMatch = output.match(/Missing:\\s*(.+?)(?:\\n|$)/);\nconst missing = missingMatch ? missingMatch[1].trim() : \"None\";\n\nconst recsMatch = output.match(/Recommendations:\\s*(.+?)(?:\\n|$)/);\nconst recommendations = recsMatch ? recsMatch[1].trim() : \"None\";\n\nconst statusMatch = output.match(/Status:\\s*(.+?)(?:\\n|$)/);\nconst status = statusMatch ? statusMatch[1].trim() : \"Unknown\";\n\nreturn {\n  json: {\n    ...$input.item.json,\n    score: score,\n    missing_items: missing,\n    recommendations: recommendations,\n    status: status,\n    full_analysis: output\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "3b8e9b17-9d52-4d49-9a51-aba866ac9a71",
      "name": "Quality Gate (< 60%)",
      "type": "n8n-nodes-base.if",
      "position": [
        1200,
        1856
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "score-check",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $json.score }}",
              "rightValue": 60
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "8cfa8adc-b1a4-446f-9783-18f7a5b83d61",
      "name": "Section: Alerts",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        1280
      ],
      "parameters": {
        "color": 4,
        "height": 180,
        "content": "## 5. Alert & Remediation\n\nIncomplete tasks trigger Slack notifications with improvement suggestions."
      },
      "typeVersion": 1
    },
    {
      "id": "4a724250-ebcb-4339-8dd1-ec1fd501cf54",
      "name": "Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1424,
        1472
      ],
      "parameters": {
        "text": "=\ud83d\udea8 *Incomplete Onboarding Task Detected*\n\n*Task:* {{ $json.task }}\n*Assignee:* {{ $json.assignee }}\n*Quality Score:* {{ $json.score }}/100 \u274c\n\n*Missing Elements:*\n{{ $json.missing_items }}\n\n*Recommendations:*\n{{ $json.recommendations }}\n\n*Action Required:* Please update the task with complete information.\n<{{ $json.task_url }}|View Task in ClickUp>",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09GNB90TED",
          "cachedResultName": "general-information"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "93dda970-c94c-4f2e-a660-e9dfb29df8df",
      "name": "Add ClickUp Comment",
      "type": "n8n-nodes-base.clickUp",
      "position": [
        1424,
        1664
      ],
      "parameters": {
        "id": "={{ $json.id }}",
        "resource": "comment",
        "commentOn": "task",
        "commentText": "=\u26a0\ufe0f **Quality Audit Alert**\n\nThis task scored {{ $json.score }}/100 and needs improvement.\n\n**Missing:** {{ $json.missing_items }}\n\n**Suggestions:** {{ $json.recommendations }}\n\nPlease address these items to ensure complete onboarding.",
        "authentication": "oAuth2",
        "additionalFields": {}
      },
      "credentials": {
        "clickUpOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "df9fe7b5-b76a-4bc5-9710-8004e0b39043",
      "name": "Update Status: Incomplete",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1424,
        1856
      ],
      "parameters": {
        "columns": {
          "value": {
            "Score": "={{ $json.score }}",
            "Status": "Needs Improvement",
            "Assignee": "={{ $json.assignee }}",
            "Task name": "={{ $json.task }}",
            "Description": "={{ $json.description }}",
            "Missing Items": "={{ $json.missing_items }}"
          },
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Task name"
          ]
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1770504814,
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1uN_D7qOoP_-5o0mmRxGtdB7-TQLW5fKJsivgGJOBL-k"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "470bb916-4fa8-4861-95c4-ac18ebb15b05",
      "name": "Section: Success",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        2080
      ],
      "parameters": {
        "color": 4,
        "height": 180,
        "content": "## 6. Success Path\n\nComplete tasks get verified status and positive feedback."
      },
      "typeVersion": 1
    },
    {
      "id": "07eedeb2-4cc7-4d8d-b24f-5a6e90d59254",
      "name": "Add Success Comment",
      "type": "n8n-nodes-base.clickUp",
      "position": [
        1424,
        2048
      ],
      "parameters": {
        "resource": "comment",
        "commentText": "=\u2705 **Quality Audit Passed**\n\nThis task scored {{ $json.score }}/100 and meets our onboarding standards. Great work!",
        "authentication": "oAuth2",
        "additionalFields": {}
      },
      "credentials": {
        "clickUpOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "11badfee-f068-47f4-9f82-3cfa6709eae0",
      "name": "Update Status: Complete",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1424,
        2240
      ],
      "parameters": {
        "columns": {
          "value": {
            "Score": "={{ $json.score }}",
            "Status": "Verified Complete",
            "Assignee": "={{ $json.assignee }}",
            "Task name": "={{ $json.task }}",
            "Description": "={{ $json.description }}"
          },
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Task name"
          ]
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1770504814,
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1uN_D7qOoP_-5o0mmRxGtdB7-TQLW5fKJsivgGJOBL-k"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "93b8e761-4cd7-4318-8fa1-82d518f9c1ee",
      "name": "Section: Analytics",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        1808
      ],
      "parameters": {
        "color": 4,
        "height": 180,
        "content": "## 7. Analytics Tracking\n\nLogs all results for performance tracking and trend analysis."
      },
      "typeVersion": 1
    },
    {
      "id": "1253d118-c8b5-4690-a55f-32bb6dd53575",
      "name": "Log to Analytics",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1648,
        2048
      ],
      "parameters": {
        "columns": {
          "value": {
            "Score": "={{ $json.score }}",
            "Status": "={{ $json.status }}",
            "Assignee": "={{ $json.assignee }}",
            "Task Name": "={{ $json.task }}",
            "Timestamp": "={{ $now.toISO() }}",
            "Missing Count": "={{ $json.missing_items.split(',').length }}"
          },
          "mappingMode": "defineBelow"
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Analytics"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1uN_D7qOoP_-5o0mmRxGtdB7-TQLW5fKJsivgGJOBL-k"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "bdd713cd-7e22-48f4-b5c1-93f3d95a8673",
      "name": "Workflow Overview1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        1648
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 488,
        "content": "## How it works\n\nThis workflow automatically audits developer onboarding tasks created in ClickUp. When a new task is created, AI analyzes it for completeness across tooling, credentials, and environment setup. Tasks scoring below 60% trigger Slack alerts and get flagged for improvement. Complete tasks are marked as verified.\n\n## Setup steps\n\n1. **Connect ClickUp**: Add your workspace team ID\n2. **Link Google Sheets**: Create a sheet with columns: Task name, Assignee, Description, Status\n3. **Configure Azure OpenAI**: Add your API credentials for GPT-4o-mini\n4. **Set Slack channel**: Choose where to send quality alerts\n5. **Adjust threshold**: Modify the 60% score threshold in the filter node if needed"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "952a7445-6214-49e4-961a-17c17b29acd8",
  "connections": {
    "GPT-4o Mini": {
      "ai_languageModel": [
        [
          {
            "node": "AI Quality Analyzer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Score": {
      "main": [
        [
          {
            "node": "Quality Gate (< 60%)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Task Created": {
      "main": [
        [
          {
            "node": "Extract Task Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Task Data": {
      "main": [
        [
          {
            "node": "Log to Tracking Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Quality Analyzer": {
      "main": [
        [
          {
            "node": "Parse AI Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Quality Gate (< 60%)": {
      "main": [
        [
          {
            "node": "Send Slack Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Add ClickUp Comment",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update Status: Incomplete",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add Success Comment",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update Status: Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Tracking Sheet": {
      "main": [
        [
          {
            "node": "AI Quality Analyzer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Status: Complete": {
      "main": [
        [
          {
            "node": "Log to Analytics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Status: Incomplete": {
      "main": [
        [
          {
            "node": "Log to Analytics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}