{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c2429079-50b7-4da8-9fe4-9a1879bd681c",
      "name": "Twilio Trigger",
      "type": "n8n-nodes-base.twilioTrigger",
      "position": [
        -380,
        -460
      ],
      "parameters": {
        "updates": [
          "com.twilio.messaging.inbound-message.received"
        ]
      },
      "credentials": {
        "twilioApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b1c0dc4c-593f-49aa-8fec-a77c7e40928e",
      "name": "Search Available Courses",
      "type": "n8n-nodes-base.airtableTool",
      "position": [
        380,
        -80
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appO5xvP1aUBYKyJ7",
          "cachedResultUrl": "https://airtable.com/appO5xvP1aUBYKyJ7",
          "cachedResultName": "Northvale Institute of Technology Courses 2025-2026"
        },
        "limit": 5,
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblRfh0t0KNSJYJVw",
          "cachedResultUrl": "https://airtable.com/appO5xvP1aUBYKyJ7/tblRfh0t0KNSJYJVw",
          "cachedResultName": "Imported table"
        },
        "options": {},
        "operation": "search",
        "returnAll": false,
        "descriptionType": "manual",
        "filterByFormula": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Filter_By_Formula', ``, 'string') }}",
        "toolDescription": "Call this tool to access the course database. Ensure you have the course database schema before using this tool."
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "ad06d5f6-cd6d-4804-b633-cf065866f41e",
      "name": "Get Course Database Schema",
      "type": "n8n-nodes-base.airtableTool",
      "position": [
        240,
        -160
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appO5xvP1aUBYKyJ7",
          "cachedResultUrl": "https://airtable.com/appO5xvP1aUBYKyJ7",
          "cachedResultName": "Northvale Institute of Technology Courses 2025-2026"
        },
        "resource": "base",
        "operation": "getSchema",
        "descriptionType": "manual",
        "toolDescription": "Call this tool to get the course database schema."
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "7d16ef89-3e63-4f64-9470-eb1bf9c76ece",
      "name": "Get User Message",
      "type": "n8n-nodes-base.set",
      "position": [
        -160,
        -460
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5ca2fffb-2926-42df-ae2b-95ba081345ef",
              "name": "message",
              "type": "string",
              "value": "={{ $json.Body || $json.chatInput }}"
            },
            {
              "id": "3bfdb166-0ab1-44b9-b6e4-ce6ad52a465c",
              "name": "sessionId",
              "type": "string",
              "value": "={{ $json.From || $json.sessionId }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b2b03e59-2c1d-4852-a8a6-37fb20f38b55",
      "name": "Send SMS reply",
      "type": "n8n-nodes-base.twilio",
      "position": [
        660,
        -460
      ],
      "parameters": {
        "to": "={{ $json.fields.from }}",
        "from": "={{ $('Twilio Trigger').item.json.To }}",
        "message": "={{ $('Course Assistant Agent').item.json.output }}",
        "options": {}
      },
      "credentials": {
        "twilioApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c07ba0c0-2e22-48fc-bca9-cbaeb221ccf9",
      "name": "Append to Call Log",
      "type": "n8n-nodes-base.airtable",
      "position": [
        440,
        -460
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appO5xvP1aUBYKyJ7",
          "cachedResultUrl": "https://airtable.com/appO5xvP1aUBYKyJ7",
          "cachedResultName": "Northvale Institute of Technology Courses 2025-2026"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblRFuaayw0En6T0c",
          "cachedResultUrl": "https://airtable.com/appO5xvP1aUBYKyJ7/tblRFuaayw0En6T0c",
          "cachedResultName": "Call Log"
        },
        "columns": {
          "value": {
            "from": "={{ $('Get User Message').first().json.sessionId }}",
            "answer": "={{ $json.output }}",
            "question": "={{ $('Get User Message').first().json.message }}"
          },
          "schema": [
            {
              "id": "from",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "from",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "question",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "question",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "answer",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "answer",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Created",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Created",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "ba7b4d7b-7b78-41f0-b158-3d1f09d14120",
      "name": "Course Assistant Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        60,
        -460
      ],
      "parameters": {
        "text": "={{ $json.message }}",
        "options": {
          "systemMessage": "=You are a course enquiry assistant for the Northvale Institute of Technology helping students with various questions about the available courses for the year.\n* Answer factually and source the information from the course database to ensure you have updated information.\n* Avoid answering or engaging in any discussion not related to the Northvale Institute of Technology courses and instead, direct the student to contact helpdesk@northvale.edu.\n* always query the course database schema before using tools.\n\nNote: The airtable filter by query syntax was updated\n* Wrap your query in AND() or OR() to join parameters.\n* To filter select or multiple select finds, use the FIND() operation. eg. AND({Schedule_from}>=900, FIND('Wed', {Schedule_day}))\n* times should be inclusive unless otherwise stated. Use the >= or <= operators."
        },
        "promptType": "define"
      },
      "typeVersion": 1.8
    },
    {
      "id": "3c790125-6665-4a0c-85b4-397e71faae35",
      "name": "Get List of Professors",
      "type": "n8n-nodes-base.airtableTool",
      "position": [
        560,
        -180
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appO5xvP1aUBYKyJ7",
          "cachedResultUrl": "https://airtable.com/appO5xvP1aUBYKyJ7",
          "cachedResultName": "Northvale Institute of Technology Courses 2025-2026"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblRfh0t0KNSJYJVw",
          "cachedResultUrl": "https://airtable.com/appO5xvP1aUBYKyJ7/tblRfh0t0KNSJYJVw",
          "cachedResultName": "Imported table"
        },
        "options": {
          "fields": [
            "Instructor"
          ]
        },
        "operation": "search",
        "descriptionType": "manual",
        "toolDescription": "Call this tool to get a list of active professors."
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "27aacf1e-b8a7-46d0-915e-0481d9608251",
      "name": "Get List of Departments",
      "type": "n8n-nodes-base.airtableTool",
      "position": [
        500,
        -20
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appO5xvP1aUBYKyJ7",
          "cachedResultUrl": "https://airtable.com/appO5xvP1aUBYKyJ7",
          "cachedResultName": "Northvale Institute of Technology Courses 2025-2026"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblRfh0t0KNSJYJVw",
          "cachedResultUrl": "https://airtable.com/appO5xvP1aUBYKyJ7/tblRfh0t0KNSJYJVw",
          "cachedResultName": "Imported table"
        },
        "options": {
          "fields": [
            "Department"
          ]
        },
        "operation": "search",
        "descriptionType": "manual",
        "toolDescription": "Call this tool to get a list of departments."
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "f1991f1f-9666-43d9-88ce-a2c083491a78",
      "name": "Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -40,
        -240
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2afd9d28-a1ba-4364-a576-ed3e86c640b6",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        100,
        -240
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "774472f7-eb3d-4251-97e3-8e4033a0cf4f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        -1100
      ],
      "parameters": {
        "width": 420,
        "height": 1320,
        "content": "## \uc9c1\uc811 \uc2dc\ub3c4\ud574 \ubcf4\uc138\uc694!\n### \uc774 n8n \ud15c\ud50c\ub9bf\uc740 SMS\ub97c \ud1b5\ud574 \ucf54\uc2a4 \ubb38\uc758\ub97c \ub2f5\ubcc0\ud560 \uc218 \uc788\ub294 \uac04\ub2e8\ud558\uba74\uc11c\ub3c4 \uc720\ub2a5\ud55c \ucc57\ubd07 \uc5b4\uc2dc\uc2a4\ud134\ud2b8\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.\n\n\uc801\uc808\ud55c \ub370\uc774\ud130 \uc811\uadfc \uad8c\ud55c\uc774 \uc8fc\uc5b4\uc9c0\uba74, AI \uc5d0\uc774\uc804\ud2b8\ub294 \ub2f5\ubcc0\uc744 \uc5bb\uae30 \uc704\ud574 \ube44\uad50\uc801 \ubcf5\uc7a1\ud55c \uc5f0\uad6c \uc791\uc5c5\uc744 \uacc4\ud68d\ud558\uace0 \uc218\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uc608\uc2dc\uc5d0\uc11c \uc5d0\uc774\uc804\ud2b8\ub294 \uba3c\uc800 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc774\ud574\ud55c \ud6c4, \uac12 \ubaa9\ub85d\uc744 \uac80\uc0c9\ud55c \ub2e4\uc74c \uc790\uccb4 \ucffc\ub9ac\ub97c \uc0dd\uc131\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uac80\uc0c9\ud574\uc57c \ud569\ub2c8\ub2e4.\n\n**\uc608\uc2dc \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ud655\uc778\ud558\uc138\uc694 - https://airtable.com/appO5xvP1aUBYKyJ7/shr8jSFDaghubDOrw**\n\n### \uc791\ub3d9 \uc6d0\ub9ac\n* Twilio \ud2b8\ub9ac\uac70\ub97c \ud1b5\ud574 \uc6f9\ud6c5\uc73c\ub85c \uc6cc\ud06c\ud50c\ub85c\uc5d0 SMS \uc785\ub825\uc744 \ubc1b\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n* \uba54\uc2dc\uc9c0\ub294 \ucf54\uc2a4 \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ucc38\uc870\ud558\ub3c4\ub85d \uc9c0\uc2dc\ub41c AI \uc5d0\uc774\uc804\ud2b8\uc5d0\uac8c \uc804\ub2ec\ub429\ub2c8\ub2e4. \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub294 Airtable \ubca0\uc774\uc2a4\uc785\ub2c8\ub2e4.\n* \uc5d0\uc774\uc804\ud2b8\ub294 autonomously \uc5b4\ub5a4 \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud574\uc57c \ud558\ub294\uc9c0 \ud30c\uc545\ud558\uace0, \uc0ac\uc6a9 \uac00\ub2a5\ud55c \ucf54\uc2a4\ub97c \uac80\uc0c9\ud558\uae30 \uc704\ud574 \uc790\uccb4 \"filter_by_formula\" \ucffc\ub9ac\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n* \uac80\uc0c9 \uacb0\uacfc\uac00 \uc131\uacf5\uc801\uc774\uba74, \uc5d0\uc774\uc804\ud2b8\ub294 \uc774 \uc815\ubcf4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc0ac\uc6a9\uc790\uc758 \ucffc\ub9ac\uc5d0 \ub2f5\ubcc0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n* \uc5d0\uc774\uc804\ud2b8\uc758 \ucd9c\ub825\uc740 Airtable \ubca0\uc774\uc2a4\uc758 \ub450 \ubc88\uc9f8 \uc2dc\ud2b8\uc5d0 \uae30\ub85d\ub429\ub2c8\ub2e4. \ub098\uc911\uc5d0 \ubd84\uc11d \ubc0f \ub9ac\ub4dc \uc0dd\uc131\uc5d0 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n* \ub9c8\uc9c0\ub9c9\uc73c\ub85c, \uc751\ub2f5\uc740 Twilio\ub97c \ud1b5\ud574 SMS\ub85c \uc0ac\uc6a9\uc790\uc5d0\uac8c \ub2e4\uc2dc \uc804\uc1a1\ub429\ub2c8\ub2e4.\n\n### \uc0ac\uc6a9 \ubc29\ubc95\n* Twilio \ubc88\ud638\uac00 \uc774 \uc6cc\ud06c\ud50c\ub85c\uc758 \uc6f9\ud6c5 URL\ub85c \uba54\uc2dc\uc9c0\ub97c \uc804\ub2ec\ud558\ub3c4\ub85d \uc124\uc815\ub418\uc5b4 \uc788\ub294\uc9c0 \ud655\uc778\ud558\uc138\uc694.\n* \ucf54\uc2a4 \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ud544\uc694\uc5d0 \ub530\ub77c \uad6c\uc131\ud558\uace0 \uc5c5\ub370\uc774\ud2b8\ud558\uc138\uc694. \ucf54\uc2a4\uc5d0 \uad00\uc2ec\uc774 \uc5c6\ub2e4\uba74, \uc774\ub97c \uc778\ubca4\ud1a0\ub9ac, \ubc30\uc1a1 \ub610\ub294 \ube44\uc988\ub2c8\uc2a4\uc5d0 \uad00\ub828\ub41c \ub2e4\ub978 \ub370\uc774\ud130\ub85c \uad50\uccb4\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n* \ub2e4\uc74c\uacfc \uac19\uc740 \uc9c8\ubb38\uc744 \ud574\ubcf4\uc138\uc694:\n  * \"\uc218\uc694\uc77c \uc544\uce68\uc744 \ucc44\uc6b8 \uc218 \uc788\ub294 \uc801\ud569\ud55c \ucf54\uc2a4\ub97c \ucc3e\uc544\uc904 \uc218 \uc788\ub098\uc694?\"\n  * \"\uc804\ubb38\uac00 Lee\uac00 \uc9c0\ub3c4\ud558\ub294 \ucf54\uc2a4\ub294 \uc5b4\ub5a4 \uac8c \uc788\ub098\uc694?\"\n  * \"\ucc3d\uc758 \uc608\uc220\uc5d0 \uad00\uc2ec \uc788\uc5b4\uc694. \ub098\ud55c\ud14c \uad00\ub828\ub41c \ucf54\uc2a4\ub294 \ubb50\uac00 \uc788\ub098\uc694?\"\n\n### \uc694\uad6c \uc0ac\ud56d\n* SMS \uc218\uc2e0 \ubc0f \ubc1c\uc2e0\uc744 \uc704\ud55c Twilio\n* LLM \ubc0f \uc5d0\uc774\uc804\ud2b8\ub97c \uc704\ud55c OpenAI\n* \ucf54\uc2a4 \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uc704\ud55c Airtable\n\n### \uc774 \uc6cc\ud06c\ud50c\ub85c \uc0ac\uc6a9\uc790 \uc815\uc758\n* \ucd94\uac00 \ub3c4\uad6c\ub97c \ucd94\uac00\ud558\uc5ec \uc5d0\uc774\uc804\ud2b8\uac00 \ub2f5\ubcc0\ud558\uac70\ub098 \uc9c0\uc6d0\ud560 \uc218 \uc788\ub294 \ucffc\ub9ac \ubc94\uc704\ub97c \ud655\uc7a5\ud558\uc138\uc694.\n* Airtable\ub97c \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub098\uc694? \uc774 \uae30\uc220\uc740 PostgreSQL\uacfc \uac19\uc740 SQL \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0\uc11c\ub3c4 \uc791\ub3d9\ud569\ub2c8\ub2e4.\n\n### \ub3c4\uc6c0\uc774 \ud544\uc694\ud558\uc138\uc694?\n[Discord](https://discord.com/invite/XPKeKXeB7d) \ub610\ub294 [Forum](https://community.n8n.io/)\uc5d0\uc11c \ucc38\uc5ec\ud558\uc138\uc694!\n\n\uc990\uac70\uc6b4 \ud574\ud0b9!"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Model": {
      "ai_languageModel": [
        [
          {
            "node": "Course Assistant Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "Course Assistant Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Twilio Trigger": {
      "main": [
        [
          {
            "node": "Get User Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User Message": {
      "main": [
        [
          {
            "node": "Course Assistant Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append to Call Log": {
      "main": [
        [
          {
            "node": "Send SMS reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Course Assistant Agent": {
      "main": [
        [
          {
            "node": "Append to Call Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get List of Professors": {
      "ai_tool": [
        [
          {
            "node": "Course Assistant Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get List of Departments": {
      "ai_tool": [
        [
          {
            "node": "Course Assistant Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Search Available Courses": {
      "ai_tool": [
        [
          {
            "node": "Course Assistant Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Course Database Schema": {
      "ai_tool": [
        [
          {
            "node": "Course Assistant Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}