{
  "name": "Hackathon CP2 - Add the AI",
  "nodes": [
    {
      "parameters": {},
      "id": "bb39705b-3924-4631-9486-1bee749dd140",
      "name": "When Tested",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        240
      ]
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1onDtz4TeM0SmJD7-QCV_QzCJXyQptbt4YnAAbwJaew4",
          "mode": "list",
          "cachedResultName": "Sample Data for Pre-Hackathon n8n session MAY 2026",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1onDtz4TeM0SmJD7-QCV_QzCJXyQptbt4YnAAbwJaew4/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 921304816,
          "mode": "list",
          "cachedResultName": "jobs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1onDtz4TeM0SmJD7-QCV_QzCJXyQptbt4YnAAbwJaew4/edit#gid=921304816"
        },
        "options": {}
      },
      "id": "664d5f73-98cd-43d5-83a1-6df66d5c5f77",
      "name": "Read Jobs from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        224,
        240
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "VYAbWly7Itlm3Nj9",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "maxItems": 3
      },
      "id": "3f3b59a7-6bee-4e31-a400-79ddd991ea46",
      "name": "Limit to First 3 (Demo Cap)",
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        448,
        240
      ]
    },
    {
      "parameters": {
        "amount": 2
      },
      "id": "35f78b20-1ce2-4073-aa6f-e66678d53484",
      "name": "Throttle (Respect API Limits)",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        896,
        112
      ],
      "webhookId": "440166be-26ff-4416-95db-c82c044db16d"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are a senior recruiter reviewing a job posting before it goes live on Indeed.\nWrite a single concise review note (4-7 sentences, plain prose, no bullets, no JSON, no markdown headers)\ncovering exactly these points in this order:\n\n1. Salary realism. Is the pay range realistic for this role and location? If not, say why and suggest a realistic range.\n2. Inclusive language. Flag any discriminatory or non-inclusive wording. Quote the phrase if found. If clean, say \"Language looks inclusive.\"\n3. Description quality. Suggest one specific improvement.\n4. End with: \"Top qualifications: X, Y, Z.\"\n\nBe direct and constructive. Do not hedge.\n\nJob Title: {{ $('Loop Over Jobs').item.json['Job Title'] }}\nCompany: {{ $('Loop Over Jobs').item.json.Company }}\nLocation: {{ $('Loop Over Jobs').item.json.Location }}\nPay Range: {{ $('Loop Over Jobs').item.json['Pay Range'] }}\nDescription: {{ $('Loop Over Jobs').item.json['Job Description'] }}",
        "batching": {}
      },
      "id": "7c4dd0ec-c3c9-4a2f-afc1-f130174b4eb7",
      "name": "Review Job with AI",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        1120,
        112
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini",
          "cachedResultName": "gpt-5-mini"
        },
        "builtInTools": {},
        "options": {}
      },
      "id": "b04d4072-b069-480e-a94c-bacef8e57b42",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        1200,
        336
      ],
      "credentials": {
        "openAiApi": {
          "id": "eF2vCCF9GqRUBBR7",
          "name": "OpenAI account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "Job Title",
              "type": "string",
              "value": "={{ $('Loop Over Jobs').item.json['Job Title'] }}"
            },
            {
              "id": "a2",
              "name": "AI Note",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        },
        "options": {}
      },
      "id": "9a81f59b-915c-4fbb-8bef-d9f1703708ed",
      "name": "Compose AI Note",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1472,
        112
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1onDtz4TeM0SmJD7-QCV_QzCJXyQptbt4YnAAbwJaew4",
          "mode": "list",
          "cachedResultName": "Sample Data for Pre-Hackathon n8n session MAY 2026",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1onDtz4TeM0SmJD7-QCV_QzCJXyQptbt4YnAAbwJaew4/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 921304816,
          "mode": "list",
          "cachedResultName": "jobs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1onDtz4TeM0SmJD7-QCV_QzCJXyQptbt4YnAAbwJaew4/edit#gid=921304816"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Loop Over Jobs').item.json.row_number }}",
            "AI Notes": "={{ $json[\"AI Note\"] }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Job Title",
              "displayName": "Job Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Location",
              "displayName": "Location",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Pay Range",
              "displayName": "Pay Range",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Job Description",
              "displayName": "Job Description",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "AI Notes",
              "displayName": "AI Notes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "2d0354df-80d7-4ada-9f47-c6c4b39c7c26",
      "name": "Write AI Note Back to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1696,
        240
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "VYAbWly7Itlm3Nj9",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "7f37103a-a727-46b8-bbb1-fdc83632e142",
      "name": "Loop Over Jobs",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        672,
        240
      ]
    },
    {
      "parameters": {
        "content": "## Checkpoint 2: Add the AI\n\n**Goal:** ask an LLM to review each job posting and write its note to the **AI Note** column.\n\n**What changed since CP1:** added **Wait** + **Basic LLM Chain** + **OpenAI Model** subnode inside the loop. The Set node now uses `{{ $json.text }}` (the LLM output) instead of a hand-written placeholder.",
        "height": 200,
        "width": 1876,
        "color": 5
      },
      "id": "be813fba-a412-4153-a94e-e4f82c627a8f",
      "name": "Sticky - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -16,
        -128
      ]
    },
    {
      "parameters": {
        "content": "**Manual Trigger**\n\nClick *Test workflow* to run.",
        "height": 140,
        "width": 220,
        "color": 3
      },
      "id": "6575d19f-3438-4986-8a49-c9a8f4196bbe",
      "name": "Sticky - Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -48,
        464
      ]
    },
    {
      "parameters": {
        "content": "**Read Jobs**\n\nReads every row from your copy of the jobs sheet.",
        "height": 140,
        "width": 220,
        "color": 6
      },
      "id": "6abe3f80-b1bd-4c70-85ac-aef617a5f1aa",
      "name": "Sticky - Read Jobs",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        192,
        464
      ]
    },
    {
      "parameters": {
        "content": "**Limit (Demo Cap)**\n\nFirst **3** rows only.",
        "height": 136,
        "width": 220,
        "color": 4
      },
      "id": "9649ba0c-15e7-4c3f-8d3f-6388b6b0019f",
      "name": "Sticky - Limit",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        432,
        464
      ]
    },
    {
      "parameters": {
        "content": "**Loop Over Items**\n\nOne row at a time.\n\nEach row -> Wait -> LLM -> Set -> Sheet update -> next row.\n\n*done* output is still empty (we wire it in CP3).",
        "height": 220,
        "width": 220,
        "color": 3
      },
      "id": "00fe43bb-4448-4898-8c5c-9fe7350fa208",
      "name": "Sticky - Loop",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        672,
        464
      ]
    },
    {
      "parameters": {
        "content": "**Wait (NEW)**\n\nPauses 2 seconds between rows.\n\nWith 300 people running this at once, the OpenAI proxy can throttle. Wait is your good citizen tax.",
        "height": 216,
        "width": 220,
        "color": 3
      },
      "id": "75b69df6-0dc7-49ad-8095-43afcdf7a2ab",
      "name": "Sticky - Wait",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        912,
        464
      ]
    },
    {
      "parameters": {
        "content": "**Basic LLM Chain (NEW)**\n\nUses the **Hackathon 2026** OpenAI credential.\n\nPrompt asks for a human-readable review (4-7 sentences). No structured output parser.\n\nThe LLM is called once per row.",
        "height": 220,
        "color": 6
      },
      "id": "00fac861-9fc9-4563-b8d9-943a54a95a2e",
      "name": "Sticky - LLM",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1152,
        464
      ]
    },
    {
      "parameters": {
        "content": "**Avoid the Structured Output Parser** for production. Indeed recommends the HTTP Request node against the LLM proxy with a JSON schema. See the wiki link on the next slide."
      },
      "id": "7501d0d3-3e76-4170-a868-fc838f39b576",
      "name": "Sticky - Parser Warning",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1152,
        704
      ]
    },
    {
      "parameters": {
        "content": "**Set (Compose AI Note)**\n\nNow pulls `{{ $json.text }}` from the LLM instead of the hand-written placeholder we used in CP1.\n\n`Job Title` still comes from `$( \"Loop Over Jobs\" ).item` so the Sheet update knows which row to match.",
        "height": 224,
        "color": 3
      },
      "id": "98e3f7af-8869-45e0-a580-879e032a2095",
      "name": "Sticky - Set",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1408,
        464
      ]
    },
    {
      "parameters": {
        "content": "**Write AI Note Back**\n\nMatches by **Job Title**, writes the AI note into the **AI Note** column.",
        "height": 224,
        "width": 220,
        "color": 6
      },
      "id": "79e5b80d-485d-42fe-a14c-bb1cad4f627a",
      "name": "Sticky - Write Back",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1664,
        464
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "When Tested": {
      "main": [
        [
          {
            "node": "Read Jobs from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Jobs from Sheet": {
      "main": [
        [
          {
            "node": "Limit to First 3 (Demo Cap)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit to First 3 (Demo Cap)": {
      "main": [
        [
          {
            "node": "Loop Over Jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Throttle (Respect API Limits)": {
      "main": [
        [
          {
            "node": "Review Job with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Review Job with AI": {
      "main": [
        [
          {
            "node": "Compose AI Note",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "Review Job with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Compose AI Note": {
      "main": [
        [
          {
            "node": "Write AI Note Back to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write AI Note Back to Sheet": {
      "main": [
        [
          {
            "node": "Loop Over Jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Jobs": {
      "main": [
        [],
        [
          {
            "node": "Throttle (Respect API Limits)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": true
  },
  "versionId": "8f508003-08e3-4cc9-beb7-38c166d3259f",
  "meta": {
    "aiBuilderAssisted": true,
    "builderVariant": "mcp",
    "instanceId": "61d1ceb8b60d551b2bd6cb318774870200f11403fbfe4e124bc9e07f08b20486"
  },
  "id": "kqzDD1NPxR4N0GQG",
  "tags": [
    {
      "updatedAt": "2026-05-03T08:51:16.018Z",
      "createdAt": "2026-05-03T08:51:16.018Z",
      "id": "FUFolilclluqXrmj",
      "name": "Indeed Hackathon"
    }
  ]
}