지능형 지식 어시스턴트
이것은Support, AI분야의자동화 워크플로우로, 26개의 노드를 포함합니다.주로 Set, Code, Telegram, GoogleDocs, ManualTrigger 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. Telegram에서 GPT-4o-mini, RAG, RLHF를 사용하여 지능형 지식 어시스턴트를 구축하고 MongoDB 통합
- •Telegram Bot Token
- •OpenAI API Key
- •MongoDB 연결 문자열
사용된 노드 (26)
{
"meta": {
"instanceId": "074f90e2bb5206c5f405a8aac6551497c72005283a5405fb08207b1b3a78c2b8",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "e39a0b25-53ce-4ac0-9c93-7750b8e6105b",
"name": "지식 베이스 에이전트",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
220,
0
],
"parameters": {
"text": "={{ $json.message.text }}",
"options": {
"systemMessage": "You are the AI assistant for a company specializing in advanced technology solutions. Your task is to help internal users by consulting the official product documentation for the company’s platforms.\n\nAvailable References:\n\nproductDocs: Step-by-step guides, technical configurations, and official manuals from the developer documentation.\n\nfeedbackPositive: Previous responses rated positively by users, useful as examples for generating high-quality answers.\n\nfeedbackNegative: Previous responses rated negatively by users. Use this tool to avoid making similar mistakes in your replies.\n\nCurrently, there are no use cases or update history documented in the available materials.\n\nBehavior Rules\n\nSearch & Response:\n\nAlways consult the official documentation first using the productDocs tool.\n\nAlso search feedbackPositive for highly rated previous responses to similar questions.\n\nCheck feedbackNegative to see if similar answers were poorly rated, and avoid repeating those mistakes.\n\nIf multiple tools return relevant results, combine the information to provide the best answer. If only one tool returns relevant content, use that as your source.\n\nRespond directly and clearly, explaining exactly how to perform the requested task.\n\nDo not filter by category unless the user explicitly asks.\n\nLanguage (Strict Per-Message Rule):\n\nDetect the language of each incoming message individually.\n\nRespond in the same language as the most recent message.\n\nDo not use the language of previous messages or conversation history to decide the language.\n\nLinks (Not Allowed):\n\nNever provide links, even if the user requests them.\n\nIf a user asks for a link, respond with:\n“I cannot provide links. If you need specific information, let me know and I will help with the details.”\n\nResponse Style:\n\nUse a professional, direct, and human tone.\n\nKeep responses between 2 and 4 lines unless the user asks for more detail.\n\nDo not make up information that isn’t in MongoDB.\n\nIf your answer contains numbered steps or lists, always number them sequentially (1, 2, 3...) without skipping or repeating numbers, even if the original content uses a different numbering style."
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "775b7991-88f3-4959-a068-3fb2b667567e",
"name": "OpenAI 채팅 모델",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
200,
180
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "cJRah9hGPQ7eX4jd",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "4c2e0ea6-f5d0-4d5b-a065-606b2dc2cff5",
"name": "임베딩 OpenAI",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
440,
460
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "cJRah9hGPQ7eX4jd",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "2f813af6-3432-4201-93d0-ff503013642e",
"name": "문서 섹션 로더",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
580,
-340
],
"parameters": {
"options": {
"metadata": {
"metadataValues": [
{
"name": "doc_id",
"value": "={{ $json.documentId }}"
}
]
}
},
"jsonData": "={{ $json.content }}",
"jsonMode": "expressionData"
},
"typeVersion": 1
},
{
"id": "c6386d7b-f3cb-4884-9477-a69e9743e6c6",
"name": "문서 청커",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
560,
-220
],
"parameters": {
"options": {
"splitCode": "markdown"
},
"chunkSize": 3000,
"chunkOverlap": 200
},
"typeVersion": 1
},
{
"id": "4ff1a843-5e1c-4a23-bdf3-2fdc91ba7032",
"name": "OpenAI 임베딩 생성기",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
440,
-340
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "cJRah9hGPQ7eX4jd",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "64624ed6-cbb2-43c1-b348-df92f26d8efe",
"name": "Google 문서 임포터",
"type": "n8n-nodes-base.googleDocs",
"position": [
220,
-520
],
"parameters": {
"operation": "get",
"documentURL": "https://docs.google.com/document/d/1gvgp71e9edob8WLqFIYCdzC7kUq3pLO37VKb-a-vVW4/edit?tab=t.0"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "FNXMwqMf7vl1WUFj",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "09c262ab-ba89-429c-b8a8-41c3ae79d97c",
"name": "스티키 노트",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
-500
],
"parameters": {
"color": 5,
"content": "Run this workflow manually to import and index Google Docs product documentation into MongoDB with vector embeddings for fast search."
},
"typeVersion": 1
},
{
"id": "f309ff4a-194f-413a-b8f5-d8210cb5e0c6",
"name": "스티키 노트1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
40
],
"parameters": {
"color": 4,
"height": 180,
"content": "This workflow uses retrieval-augmented generation (RAG) to answer user questions by searching the MongoDB vector store and generating AI responses enhanced with Telegram-based RLHF feedback."
},
"typeVersion": 1
},
{
"id": "caf481b3-7a19-40df-b5fb-52e74a8edd73",
"name": "스티키 노트2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1800,
-480
],
"parameters": {
"width": 520,
"height": 1040,
"content": "Documentation Search Index\n\n{\n \"mappings\": {\n \"dynamic\": false,\n \"fields\": {\n \"_id\": {\n \"type\": \"string\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"embedding\": {\n \"type\": \"knnVector\",\n \"dimensions\": 1536,\n \"similarity\": \"cosine\"\n },\n \"source\": {\n \"type\": \"string\"\n },\n \"doc_id\": {\n \"type\": \"string\"\n }\n }\n }\n}\n\n\nFeedback Search Index\n\n{\n \"mappings\": {\n \"dynamic\": false,\n \"fields\": {\n \"prompt\": {\n \"type\": \"string\"\n },\n \"response\": {\n \"type\": \"string\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"embedding\": {\n \"type\": \"knnVector\",\n \"dimensions\": 1536,\n \"similarity\": \"cosine\"\n },\n \"feedback\": {\n \"type\": \"token\"\n }\n }\n }\n}\n"
},
"typeVersion": 1
},
{
"id": "8a3abf9e-6f3f-47cf-b9ec-bb9da9835e5c",
"name": "\"워크플로 실행\" 클릭 시",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
-520
],
"parameters": {},
"typeVersion": 1
},
{
"id": "4235ba8c-d671-40b8-b3a4-d7cccac36d54",
"name": "MongoDB 채팅 메모리",
"type": "@n8n/n8n-nodes-langchain.memoryMongoDbChat",
"position": [
320,
180
],
"parameters": {
"sessionKey": "={{ $('Receive Message on Telegram').item.json.message.chat.id }}",
"sessionIdType": "customKey",
"collectionName": "n8n-template-chat-history"
},
"credentials": {
"mongoDb": {
"id": "7riubYENUDZsmjyK",
"name": "MongoDB account 2"
}
},
"typeVersion": 1
},
{
"id": "000e272a-3f19-4c17-86b5-07505eba2c3b",
"name": "임베딩 OpenAI1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
160,
440
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "cJRah9hGPQ7eX4jd",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "dca02c04-2921-4982-83a3-6b2f6fb32663",
"name": "기본 데이터 로더",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
1400,
180
],
"parameters": {
"options": {
"metadata": {
"metadataValues": [
{
"name": "prompt",
"value": "={{ $json.prompt }}"
},
{
"name": "response",
"value": "={{ $json.response }}"
},
{
"name": "feedback",
"value": "={{ $json.feedback }}"
}
]
}
},
"jsonData": "={{ $json.text }}",
"jsonMode": "expressionData"
},
"typeVersion": 1
},
{
"id": "757073e3-f8b5-42b5-ab02-d310d5f6e8a4",
"name": "재귀적 문자 텍스트 분할기",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
1380,
300
],
"parameters": {
"options": {},
"chunkSize": 4000
},
"typeVersion": 1
},
{
"id": "588ef94b-9723-440a-ac13-d97d744ae26d",
"name": "임베딩 OpenAI3",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
320,
720
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "cJRah9hGPQ7eX4jd",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "355654d8-95e2-4337-9b1f-af2a08573f08",
"name": "긍정적 상호작용 검색",
"type": "@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas",
"position": [
160,
320
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {
"metadata": {
"metadataValues": [
{
"name": "feedback",
"value": "positive"
}
]
}
},
"toolName": "feedbackPositive",
"mongoCollection": {
"__rl": true,
"mode": "list",
"value": "n8n-template-feedback",
"cachedResultName": "n8n-template-feedback"
},
"toolDescription": "Retrieve previous examples of similar questions that were rated positively by users. Use this tool before responding to improve your answer based on those approved examples.",
"vectorIndexName": "template-feedback-search"
},
"credentials": {
"mongoDb": {
"id": "7riubYENUDZsmjyK",
"name": "MongoDB account 2"
}
},
"typeVersion": 1.1
},
{
"id": "84a95dfb-6cc4-4a18-be40-6fa201073750",
"name": "문서 검색",
"type": "@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas",
"position": [
440,
320
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {},
"toolName": "productDocs",
"mongoCollection": {
"__rl": true,
"mode": "list",
"value": "n8n-template",
"cachedResultName": "n8n-template"
},
"toolDescription": "retreive documentation",
"vectorIndexName": "data_index"
},
"credentials": {
"mongoDb": {
"id": "7riubYENUDZsmjyK",
"name": "MongoDB account 2"
}
},
"typeVersion": 1.1
},
{
"id": "f2001c81-081b-4417-8349-3db459c0f191",
"name": "부정적 상호작용 검색",
"type": "@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas",
"position": [
240,
580
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {
"metadata": {
"metadataValues": [
{
"name": "feedback",
"value": "negative"
}
]
}
},
"toolName": "feedbackNegative",
"mongoCollection": {
"__rl": true,
"mode": "list",
"value": "n8n-template-feedback",
"cachedResultName": "n8n-template-feedback"
},
"toolDescription": "Retrieve previous examples of similar questions that were rated negatively by users. Use this tool before responding to avoid generating answers similar to those that did not work well in the past.",
"vectorIndexName": "template-feedback-search"
},
"credentials": {
"mongoDb": {
"id": "7riubYENUDZsmjyK",
"name": "MongoDB account 2"
}
},
"typeVersion": 1.1
},
{
"id": "1a0de194-3508-4d21-b1a2-35c3b4a998c1",
"name": "Telegram 메시지 수신",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
0,
0
],
"webhookId": "fff1b90c-59ce-406b-a7f0-08953c90c0ce",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "wb9guorEXe6W5V8C",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "92458560-feb5-40df-b52a-ec1c5156829d",
"name": "Telegram 메시지 전송 및 피드백 대기",
"type": "n8n-nodes-base.telegram",
"position": [
600,
0
],
"webhookId": "ed8fc221-70ad-47df-b70e-6667c580553b",
"parameters": {
"chatId": "={{ $('Receive Message on Telegram').item.json.message.chat.id }}",
"message": "={{ $json.output }}",
"options": {
"appendAttribution": false
},
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"credentials": {
"telegramApi": {
"id": "wb9guorEXe6W5V8C",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "ef40200d-5f19-4199-8ae3-9f2e0f52ac1b",
"name": "피드백 데이터 매핑",
"type": "n8n-nodes-base.code",
"position": [
820,
0
],
"parameters": {
"jsCode": "let response;\n\nif ($input.first().json.data.approved) {\n response = \"positive\"\n} \nelse {\n response = \"negative\"\n}\n\nreturn {\n feedback: response\n}\n"
},
"typeVersion": 2
},
{
"id": "d688073c-9a97-4b39-9640-c368cccf3491",
"name": "컬렉션 저장용 피드백 필드 설정",
"type": "n8n-nodes-base.set",
"position": [
1040,
0
],
"parameters": {
"values": {
"string": [
{
"name": "prompt",
"value": "={{ $('Receive Message on Telegram').item.json.message.text }}"
},
{
"name": "response",
"value": "={{ $('Knowledge Base Agent').item.json.output }}"
},
{
"name": "text",
"value": "=Prompt: {{ $('Receive Message on Telegram').item.json.message.text }}. Completion: {{ $('Knowledge Base Agent').item.json.output }}"
},
{
"name": "feedback",
"value": "={{ $json.feedback }}"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
},
{
"id": "9907480f-3e5d-4240-adbb-790be2d68496",
"name": "임베딩 채팅 피드백 제출",
"type": "@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas",
"position": [
1260,
0
],
"parameters": {
"mode": "insert",
"options": {},
"mongoCollection": {
"__rl": true,
"mode": "list",
"value": "n8n-template-feedback",
"cachedResultName": "n8n-template-feedback"
},
"vectorIndexName": "template-feedback-search",
"embeddingBatchSize": 1
},
"credentials": {
"mongoDb": {
"id": "7riubYENUDZsmjyK",
"name": "MongoDB account 2"
}
},
"typeVersion": 1.1
},
{
"id": "1a470ad3-845a-4890-b103-65a21b1940de",
"name": "OpenAI 임베딩 생성기1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
1260,
180
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "cJRah9hGPQ7eX4jd",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "fdc22256-f014-4ed0-8781-1abb20134b1a",
"name": "MongoDB 문서 삽입기",
"type": "@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas",
"position": [
440,
-520
],
"parameters": {
"mode": "insert",
"options": {},
"mongoCollection": {
"__rl": true,
"mode": "list",
"value": "n8n-template",
"cachedResultName": "n8n-template"
},
"vectorIndexName": "data_index"
},
"credentials": {
"mongoDb": {
"id": "7riubYENUDZsmjyK",
"name": "MongoDB account 2"
}
},
"typeVersion": 1.1
}
],
"pinData": {},
"connections": {
"c6386d7b-f3cb-4884-9477-a69e9743e6c6": {
"ai_textSplitter": [
[
{
"node": "2f813af6-3432-4201-93d0-ff503013642e",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"4c2e0ea6-f5d0-4d5b-a065-606b2dc2cff5": {
"ai_embedding": [
[
{
"node": "84a95dfb-6cc4-4a18-be40-6fa201073750",
"type": "ai_embedding",
"index": 0
}
]
]
},
"ef40200d-5f19-4199-8ae3-9f2e0f52ac1b": {
"main": [
[
{
"node": "d688073c-9a97-4b39-9640-c368cccf3491",
"type": "main",
"index": 0
}
]
]
},
"775b7991-88f3-4959-a068-3fb2b667567e": {
"ai_languageModel": [
[
{
"node": "e39a0b25-53ce-4ac0-9c93-7750b8e6105b",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"000e272a-3f19-4c17-86b5-07505eba2c3b": {
"ai_embedding": [
[
{
"node": "355654d8-95e2-4337-9b1f-af2a08573f08",
"type": "ai_embedding",
"index": 0
}
]
]
},
"588ef94b-9723-440a-ac13-d97d744ae26d": {
"ai_embedding": [
[
{
"node": "f2001c81-081b-4417-8349-3db459c0f191",
"type": "ai_embedding",
"index": 0
}
]
]
},
"dca02c04-2921-4982-83a3-6b2f6fb32663": {
"ai_document": [
[
{
"node": "9907480f-3e5d-4240-adbb-790be2d68496",
"type": "ai_document",
"index": 0
}
]
]
},
"4235ba8c-d671-40b8-b3a4-d7cccac36d54": {
"ai_memory": [
[
{
"node": "e39a0b25-53ce-4ac0-9c93-7750b8e6105b",
"type": "ai_memory",
"index": 0
}
]
]
},
"64624ed6-cbb2-43c1-b348-df92f26d8efe": {
"main": [
[
{
"node": "fdc22256-f014-4ed0-8781-1abb20134b1a",
"type": "main",
"index": 0
}
]
]
},
"e39a0b25-53ce-4ac0-9c93-7750b8e6105b": {
"main": [
[
{
"node": "92458560-feb5-40df-b52a-ec1c5156829d",
"type": "main",
"index": 0
}
]
]
},
"84a95dfb-6cc4-4a18-be40-6fa201073750": {
"ai_tool": [
[
{
"node": "e39a0b25-53ce-4ac0-9c93-7750b8e6105b",
"type": "ai_tool",
"index": 0
}
]
]
},
"2f813af6-3432-4201-93d0-ff503013642e": {
"ai_document": [
[
{
"node": "fdc22256-f014-4ed0-8781-1abb20134b1a",
"type": "ai_document",
"index": 0
}
]
]
},
"4ff1a843-5e1c-4a23-bdf3-2fdc91ba7032": {
"ai_embedding": [
[
{
"node": "fdc22256-f014-4ed0-8781-1abb20134b1a",
"type": "ai_embedding",
"index": 0
}
]
]
},
"1a0de194-3508-4d21-b1a2-35c3b4a998c1": {
"main": [
[
{
"node": "e39a0b25-53ce-4ac0-9c93-7750b8e6105b",
"type": "main",
"index": 0
}
]
]
},
"1a470ad3-845a-4890-b103-65a21b1940de": {
"ai_embedding": [
[
{
"node": "9907480f-3e5d-4240-adbb-790be2d68496",
"type": "ai_embedding",
"index": 0
}
]
]
},
"f2001c81-081b-4417-8349-3db459c0f191": {
"ai_tool": [
[
{
"node": "e39a0b25-53ce-4ac0-9c93-7750b8e6105b",
"type": "ai_tool",
"index": 0
}
]
]
},
"355654d8-95e2-4337-9b1f-af2a08573f08": {
"ai_tool": [
[
{
"node": "e39a0b25-53ce-4ac0-9c93-7750b8e6105b",
"type": "ai_tool",
"index": 0
}
]
]
},
"fdc22256-f014-4ed0-8781-1abb20134b1a": {
"main": [
[]
]
},
"8a3abf9e-6f3f-47cf-b9ec-bb9da9835e5c": {
"main": [
[
{
"node": "64624ed6-cbb2-43c1-b348-df92f26d8efe",
"type": "main",
"index": 0
}
]
]
},
"757073e3-f8b5-42b5-ab02-d310d5f6e8a4": {
"ai_textSplitter": [
[
{
"node": "dca02c04-2921-4982-83a3-6b2f6fb32663",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"d688073c-9a97-4b39-9640-c368cccf3491": {
"main": [
[
{
"node": "9907480f-3e5d-4240-adbb-790be2d68496",
"type": "main",
"index": 0
}
]
]
},
"92458560-feb5-40df-b52a-ec1c5156829d": {
"main": [
[
{
"node": "ef40200d-5f19-4199-8ae3-9f2e0f52ac1b",
"type": "main",
"index": 0
}
]
]
}
}
}이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 지원, 인공지능
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
NovaNode
@thomasgptNovaNode is a software factory building scalable AI for modern businesses. We specialize in omni-channel AI agents that automate customer support, sales, and operations across voice, WhatsApp, email, and chat. We serve both enterprise clients and SMEs, balancing deep integrations with speed and cost-efficiency. By combining automation with adaptability, we help companies scale faster and operate smarter. NovaNode is where AI meets execution.
이 워크플로우 공유