내부 문서 채팅
고급
이것은Internal Wiki, AI RAG분야의자동화 워크플로우로, 29개의 노드를 포함합니다.주로 Set, Switch, Webhook, Supabase, Aggregate 등의 노드를 사용하며. Ollama, Supabase 벡터 데이터베이스, Google Drive를 사용하여 내부 문서와 대화합니다.
사전 요구사항
- •HTTP Webhook 엔드포인트(n8n이 자동으로 생성)
- •Supabase URL과 API Key
- •Google Drive API 인증 정보
- •PostgreSQL 데이터베이스 연결 정보
사용된 노드 (29)
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"id": "pfmUDAfMnmwHPCSC",
"meta": {
"instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
"templateCredsSetupCompleted": true
},
"name": "Chat-internal-documents",
"tags": [],
"nodes": [
{
"id": "5499112e-c417-4a13-9d3f-6e1aa16ee8cd",
"name": "기본 데이터 로더",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
840,
840
],
"parameters": {
"options": {
"metadata": {
"metadataValues": [
{
"name": "=file_id",
"value": "={{ $('Set File ID').first().json.file_id }}"
}
]
}
},
"jsonData": "={{ $json.data || $json.text || $json.concatenated_data }}",
"jsonMode": "expressionData"
},
"typeVersion": 1
},
{
"id": "b780ee44-6928-4382-96d9-52d015e97fc2",
"name": "스티커 메모",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
60
],
"parameters": {
"color": 4,
"width": 583,
"height": 489,
"content": "## Agent Tools for RAG"
},
"typeVersion": 1
},
{
"id": "733c038e-5315-490f-a8f1-449aae7aa7b1",
"name": "스티커 메모1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1240,
580
],
"parameters": {
"color": 5,
"width": 2353,
"height": 627,
"content": "## Tool to Add a Google Drive File to Vector DB"
},
"typeVersion": 1
},
{
"id": "f4f6830e-e057-4817-99b6-cd1a24ef85af",
"name": "파일 다운로드",
"type": "n8n-nodes-base.googleDrive",
"position": [
-400,
800
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Set File ID').item.json.file_id }}"
},
"options": {
"googleFileConversion": {
"conversion": {
"docsToFormat": "text/plain"
}
}
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "",
"name": "Google Drive account"
}
},
"executeOnce": true,
"typeVersion": 3
},
{
"id": "d6053181-12df-4ee9-98fc-5263c44cb828",
"name": "파일 생성됨",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
-1160,
700
],
"parameters": {
"event": "fileCreated",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"mode": "list",
"value": "1kxxE-cSJYZA1EwRohcgNL2PNFZDzAyhw",
"cachedResultUrl": "",
"cachedResultName": "test-folder"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "",
"name": "Google Drive account"
}
},
"typeVersion": 1
},
{
"id": "0ed25822-27c2-4ae3-9ec9-ff0eaeec1938",
"name": "파일 업데이트됨",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
-1160,
920
],
"parameters": {
"event": "fileUpdated",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"mode": "list",
"value": "1kxxE-cSJYZA1EwRohcgNL2PNFZDzAyhw",
"cachedResultUrl": "",
"cachedResultName": "test-folder"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "",
"name": "Google Drive account"
}
},
"typeVersion": 1
},
{
"id": "70d053ec-b880-489c-8c20-261f0a4c148c",
"name": "문서 텍스트 추출",
"type": "n8n-nodes-base.extractFromFile",
"position": [
360,
1000
],
"parameters": {
"options": {},
"operation": "text"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "cb9d4b81-c74f-44e5-9cb5-f55133b737d5",
"name": "Postgres 채팅 메모리",
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"position": [
-480,
360
],
"parameters": {},
"credentials": {
"postgres": {
"id": "",
"name": "Postgres account"
}
},
"notesInFlow": false,
"typeVersion": 1
},
{
"id": "fff92d07-0a2c-40ff-a073-b2e17d4695a3",
"name": "오래된 문서 행 삭제",
"type": "n8n-nodes-base.supabase",
"position": [
-640,
800
],
"parameters": {
"tableId": "documents",
"operation": "delete",
"filterType": "string",
"filterString": "=metadata->>file_id=like.*{{ $json.file_id }}*"
},
"credentials": {
"supabaseApi": {
"id": "",
"name": "Supabase account"
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "e5ca30cc-ea70-42b1-bdce-b110a922765b",
"name": "파일 ID 설정",
"type": "n8n-nodes-base.set",
"position": [
-880,
800
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "10646eae-ae46-4327-a4dc-9987c2d76173",
"name": "file_id",
"type": "string",
"value": "={{ $json.id }}"
},
{
"id": "f4536df5-d0b1-4392-bf17-b8137fb31a44",
"name": "file_type",
"type": "string",
"value": "={{ $json.mimeType }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "02fbed8f-592d-4380-b9b4-f129cbc052d5",
"name": "스티커 메모2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1040,
60
],
"parameters": {
"width": 1036,
"height": 485,
"content": "## RAG AI Agent with Chat Interface"
},
"typeVersion": 1
},
{
"id": "33ffec5d-1c87-42df-91a9-87f29fda4d24",
"name": "Webhook에 응답",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
-180,
140
],
"parameters": {
"options": {},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.1
},
{
"id": "c7cf92ba-d3b7-401f-be57-1f2ad1452fad",
"name": "필드 편집",
"type": "n8n-nodes-base.set",
"position": [
-740,
140
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9a9a245e-f1a1-4282-bb02-a81ffe629f0f",
"name": "chatInput",
"type": "string",
"value": "={{ $json?.chatInput || $json.body.chatInput || $json.body.message }}"
},
{
"id": "b80831d8-c653-4203-8706-adedfdb98f77",
"name": "sessionId",
"type": "string",
"value": "={{ $json?.sessionId || $json.body.sessionId}}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "28af4afe-bb57-41cf-97cd-5f5bf244ced2",
"name": "채팅 메시지 수신 시",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-1000,
140
],
"webhookId": "15e4d662-3f98-48d0-9f50-68838769ecac",
"parameters": {
"public": true,
"options": {
"allowFileUploads": true
},
"initialMessages": "Hi there! 👋\nMy name is Laki. How can I assist you today?"
},
"typeVersion": 1.1
},
{
"id": "172cdbdc-df5e-4126-b437-6ee87cb002e8",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-1000,
340
],
"webhookId": "9ba11544-5c4e-4f91-818a-08a4ecb596c5",
"parameters": {
"path": "rag-chat",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "c22851fc-54b3-4f6f-90de-1d1ee4144987",
"name": "PDF 텍스트 추출",
"type": "n8n-nodes-base.extractFromFile",
"position": [
360,
620
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "6cd6a07e-e401-4941-8120-0fe720138986",
"name": "집계",
"type": "n8n-nodes-base.aggregate",
"position": [
280,
800
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "57dd71fa-6500-4e8f-b5e2-824eb8812b9a",
"name": "문자 텍스트 분할기",
"type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
"position": [
840,
1060
],
"parameters": {},
"typeVersion": 1
},
{
"id": "af7a36dc-8a07-4b00-affc-5c01677d3dcf",
"name": "요약",
"type": "n8n-nodes-base.summarize",
"position": [
440,
800
],
"parameters": {
"options": {},
"fieldsToSummarize": {
"values": [
{
"field": "data",
"aggregation": "concatenate"
}
]
}
},
"typeVersion": 1
},
{
"id": "64931b9c-35d3-4eff-89f6-9fb6053325d2",
"name": "RAG AI 에이전트",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-520,
140
],
"parameters": {
"text": "={{ $json.chatInput }}\n\nContext from retrieved documents:\n{{ $json.user_documents }}\n\nInstructions:\n- Use ONLY the context above to answer the question.\n- If the context already provides the answer, respond directly with that Answer.\n- Do NOT call any tools or offer to call tools if the context already has the answer.\n- Only call tools if the context is empty or obviously incomplete.\n- Keep the answer clear and complete.\n",
"options": {
"systemMessage": "=You are a helpful assistant that answers user questions. Always prioritize using the provided context. Only call tools when the provided context does not contain the necessary information.\nIf you use the tool then provide the answer coming from the tool directly\n"
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "de90a406-592e-4c0d-9052-3e95caebf01b",
"name": "스위치",
"type": "n8n-nodes-base.switch",
"position": [
-180,
800
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Set File ID').item.json.file_type }}",
"rightValue": "application/pdf"
}
]
}
},
{
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "2ae7faa7-a936-4621-a680-60c512163034",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Set File ID').item.json.file_type }}",
"rightValue": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
]
}
},
{
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fc193b06-363b-4699-a97d-e5a850138b0e",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Set File ID').item.json.file_type }}",
"rightValue": "application/vnd.google-apps.document"
}
]
}
}
]
},
"options": {
"fallbackOutput": 2
}
},
"typeVersion": 3
},
{
"id": "a2055d5e-a445-4706-afb7-f36f8adedb43",
"name": "Supabase 벡터 저장소에 삽입",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
720,
620
],
"parameters": {
"mode": "insert",
"options": {
"queryName": "match_documents"
},
"tableName": {
"__rl": true,
"mode": "list",
"value": "documents",
"cachedResultName": "documents"
}
},
"credentials": {
"supabaseApi": {
"id": "",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "5d235803-705e-4366-b00f-ceef912db642",
"name": "Excel에서 추출",
"type": "n8n-nodes-base.extractFromFile",
"position": [
120,
800
],
"parameters": {
"options": {},
"operation": "xlsx"
},
"typeVersion": 1
},
{
"id": "0f3b9083-0510-4129-9833-215c7189148b",
"name": "임베딩 Ollama",
"type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
"position": [
680,
840
],
"parameters": {
"model": "nomic-embed-text:latest"
},
"credentials": {
"ollamaApi": {
"id": "7CIt42W14b1MCgxQ",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "ca178e83-d5c1-475a-b5fa-9e83f840cd19",
"name": "임베딩 Ollama1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
"position": [
200,
420
],
"parameters": {
"model": "nomic-embed-text:latest"
},
"credentials": {
"ollamaApi": {
"id": "7CIt42W14b1MCgxQ",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "5a3c0b2d-1a38-4a5f-b6b9-638ea50cce7d",
"name": "Supabase 벡터 저장소",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
80,
280
],
"parameters": {
"options": {
"queryName": "match_documents"
},
"tableName": {
"__rl": true,
"mode": "list",
"value": "documents",
"cachedResultName": "documents"
}
},
"credentials": {
"supabaseApi": {
"id": "",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "aa18ff0f-e29e-453f-b637-581bbb021594",
"name": "Ollama 모델",
"type": "@n8n/n8n-nodes-langchain.lmOllama",
"position": [
420,
320
],
"parameters": {
"model": "llama3.1:latest",
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "7CIt42W14b1MCgxQ",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "175164e7-4a84-48b2-a225-dea6afe1e94d",
"name": "Ollama 채팅 모델",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
-660,
380
],
"parameters": {
"model": "llama3.1:latest",
"options": {
"temperature": 0.5
}
},
"credentials": {
"ollamaApi": {
"id": "7CIt42W14b1MCgxQ",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "8a46d0ff-ceb9-435f-a347-d97e103cd0bc",
"name": "사용자 문서",
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
"position": [
200,
120
],
"parameters": {
"name": "user_documents",
"description": "Contains all the user's documents that you can check for context to answer user questions."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "5e57d44f-1063-4539-bbeb-d2c65025509a",
"connections": {
"de90a406-592e-4c0d-9052-3e95caebf01b": {
"main": [
[
{
"node": "c22851fc-54b3-4f6f-90de-1d1ee4144987",
"type": "main",
"index": 0
}
],
[
{
"node": "5d235803-705e-4366-b00f-ceef912db642",
"type": "main",
"index": 0
}
],
[
{
"node": "70d053ec-b880-489c-8c20-261f0a4c148c",
"type": "main",
"index": 0
}
]
]
},
"172cdbdc-df5e-4126-b437-6ee87cb002e8": {
"main": [
[
{
"node": "c7cf92ba-d3b7-401f-be57-1f2ad1452fad",
"type": "main",
"index": 0
}
]
]
},
"6cd6a07e-e401-4941-8120-0fe720138986": {
"main": [
[
{
"node": "af7a36dc-8a07-4b00-affc-5c01677d3dcf",
"type": "main",
"index": 0
}
]
]
},
"af7a36dc-8a07-4b00-affc-5c01677d3dcf": {
"main": [
[
{
"node": "a2055d5e-a445-4706-afb7-f36f8adedb43",
"type": "main",
"index": 0
}
]
]
},
"c7cf92ba-d3b7-401f-be57-1f2ad1452fad": {
"main": [
[
{
"node": "64931b9c-35d3-4eff-89f6-9fb6053325d2",
"type": "main",
"index": 0
}
]
]
},
"e5ca30cc-ea70-42b1-bdce-b110a922765b": {
"main": [
[
{
"node": "fff92d07-0a2c-40ff-a073-b2e17d4695a3",
"type": "main",
"index": 0
}
]
]
},
"d6053181-12df-4ee9-98fc-5263c44cb828": {
"main": [
[
{
"node": "e5ca30cc-ea70-42b1-bdce-b110a922765b",
"type": "main",
"index": 0
}
]
]
},
"0ed25822-27c2-4ae3-9ec9-ff0eaeec1938": {
"main": [
[
{
"node": "e5ca30cc-ea70-42b1-bdce-b110a922765b",
"type": "main",
"index": 0
}
]
]
},
"aa18ff0f-e29e-453f-b637-581bbb021594": {
"ai_languageModel": [
[
{
"node": "8a46d0ff-ceb9-435f-a347-d97e103cd0bc",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"64931b9c-35d3-4eff-89f6-9fb6053325d2": {
"main": [
[
{
"node": "33ffec5d-1c87-42df-91a9-87f29fda4d24",
"type": "main",
"index": 0
}
]
]
},
"f4f6830e-e057-4817-99b6-cd1a24ef85af": {
"main": [
[
{
"node": "de90a406-592e-4c0d-9052-3e95caebf01b",
"type": "main",
"index": 0
}
]
]
},
"8a46d0ff-ceb9-435f-a347-d97e103cd0bc": {
"ai_tool": [
[
{
"node": "64931b9c-35d3-4eff-89f6-9fb6053325d2",
"type": "ai_tool",
"index": 0
}
]
]
},
"c22851fc-54b3-4f6f-90de-1d1ee4144987": {
"main": [
[
{
"node": "a2055d5e-a445-4706-afb7-f36f8adedb43",
"type": "main",
"index": 0
}
]
]
},
"0f3b9083-0510-4129-9833-215c7189148b": {
"ai_embedding": [
[
{
"node": "a2055d5e-a445-4706-afb7-f36f8adedb43",
"type": "ai_embedding",
"index": 0
}
]
]
},
"175164e7-4a84-48b2-a225-dea6afe1e94d": {
"ai_languageModel": [
[
{
"node": "64931b9c-35d3-4eff-89f6-9fb6053325d2",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"ca178e83-d5c1-475a-b5fa-9e83f840cd19": {
"ai_embedding": [
[
{
"node": "5a3c0b2d-1a38-4a5f-b6b9-638ea50cce7d",
"type": "ai_embedding",
"index": 0
}
]
]
},
"5d235803-705e-4366-b00f-ceef912db642": {
"main": [
[
{
"node": "6cd6a07e-e401-4941-8120-0fe720138986",
"type": "main",
"index": 0
}
]
]
},
"5499112e-c417-4a13-9d3f-6e1aa16ee8cd": {
"ai_document": [
[
{
"node": "a2055d5e-a445-4706-afb7-f36f8adedb43",
"type": "ai_document",
"index": 0
}
]
]
},
"fff92d07-0a2c-40ff-a073-b2e17d4695a3": {
"main": [
[
{
"node": "f4f6830e-e057-4817-99b6-cd1a24ef85af",
"type": "main",
"index": 0
}
]
]
},
"cb9d4b81-c74f-44e5-9cb5-f55133b737d5": {
"ai_memory": [
[
{
"node": "64931b9c-35d3-4eff-89f6-9fb6053325d2",
"type": "ai_memory",
"index": 0
}
]
]
},
"70d053ec-b880-489c-8c20-261f0a4c148c": {
"main": [
[
{
"node": "a2055d5e-a445-4706-afb7-f36f8adedb43",
"type": "main",
"index": 0
}
]
]
},
"5a3c0b2d-1a38-4a5f-b6b9-638ea50cce7d": {
"ai_vectorStore": [
[
{
"node": "8a46d0ff-ceb9-435f-a347-d97e103cd0bc",
"type": "ai_vectorStore",
"index": 0
}
]
]
},
"57dd71fa-6500-4e8f-b5e2-824eb8812b9a": {
"ai_textSplitter": [
[
{
"node": "5499112e-c417-4a13-9d3f-6e1aa16ee8cd",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"28af4afe-bb57-41cf-97cd-5f5bf244ced2": {
"main": [
[
{
"node": "c7cf92ba-d3b7-401f-be57-1f2ad1452fad",
"type": "main",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 내부 위키, AI RAG
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
n8n 로컬 테스트
Llama3, Postgres, Qdrant와 Google Drive를 사용하여 프라이빗 문서 질문 응답 시스템을 생성합니다.
Set
Google Drive
Agent
+
Set
Google Drive
Agent
20 노드David Olusola
내부 위키
n8n 로컬 AI 에이전트 RAG 템플릿
Ollama AI, 지능형 RAG 대리자와 PGVector를 사용한 로컬 문서 질문 응답 시스템
Set
Switch
Webhook
+
Set
Switch
Webhook
41 노드Jadai kongolo
내부 위키
반려동물 가게 4
🐶 펫 샵 예약 AI 대리자
If
Set
Code
+
If
Set
Code
187 노드Bruno Dias
인공지능
[템플릿] AI 반려동물 가게 v8
🐶 AI 펫 샵 어시스턴트 - GPT-4o, Google 캘린더 및 WhatsApp/Instagram/Facebook 통합
If
N8n
Set
+
If
N8n
Set
244 노드Amanda Benks
영업
AI 대리인 레스토랑 [템플릿]
🤖 WhatsApp, 인스타그램, 메신저의 AI 레스토랑 도우미
If
N8n
Set
+
If
N8n
Set
239 노드Amanda Benks
기타
배달 햄버거점 MVP
🤖 레스토랑과 배달 자동화의 AI 드라이브 WhatsApp 도우미
If
Set
Code
+
If
Set
Code
152 노드Bruno Dias