챗봇 모델
중급
이것은AI분야의자동화 워크플로우로, 12개의 노드를 포함합니다.주로 If, Set, MySqlTool, OpenAi, ChatTrigger 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. Postgres 기억과 API 호출 기능을 갖춘 채팅 어시스턴트(OpenAI 어시스턴트)
사전 요구사항
- •MySQL 데이터베이스 연결 정보
- •OpenAI API Key
- •대상 API의 인증 정보가 필요할 수 있음
- •PostgreSQL 데이터베이스 연결 정보
카테고리
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"id": "BMI5WkmyU8nZqfII",
"meta": {
"instanceId": "e03b0f22ca12c92061d789d5980a9bc31d9d7e7dd7513ac93c09ac5a0d147623",
"templateCredsSetupCompleted": true
},
"name": "modelo do chatbot",
"tags": [],
"nodes": [
{
"id": "c6e454af-70a1-4c65-8450-8159f7fc738b",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
160,
560
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7ea831a4-0e20-4725-a6f5-3dc2f41f1cf4",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.leadData }}",
"rightValue": ""
},
{
"id": "ccb46339-4e43-42e6-aa45-d5a0cbd62214",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
}
},
"typeVersion": 2
},
{
"id": "2221736f-ef99-4ac8-8a81-51af6d4e7dcd",
"name": "필드 편집1",
"type": "n8n-nodes-base.set",
"position": [
440,
960
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "19a16867-b574-4b99-82f1-a86752b7fe9f",
"name": "chatInput",
"type": "string",
"value": "=\"Hello, just so you can get to know me, with no intention of a response, please save this information in your memory. My name is {{ $json.leadData.name }}. I am {{ $json.leadData.age }} years old and currently live in {{ $json.leadData.city }}, {{ $json.leadData.state }}. My profession is {{ $json.leadData.profession }}, and my education level is {{ $json.leadData.educationLevel }}.\nIf I’m part of an adhesion group and have an entity, it would be {{ $json.leadData.entity }}.\n\nI am using a {{ $json.leadData.deviceType }} device to access this through the {{ $json.leadData.channel }} channel. At the moment, I am looking for a health insurance plan of type {{ $json.leadData.quotationType }}.\""
},
{
"id": "0df8d578-8332-4cde-9044-489de16ab390",
"name": "session_id",
"type": "string",
"value": "={{ $json.session_id }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "6aa1b3a4-0e6a-4312-9d9f-f67c4bf8f443",
"name": "필드 편집2",
"type": "n8n-nodes-base.set",
"position": [
920,
960
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "19a16867-b574-4b99-82f1-a86752b7fe9f",
"name": "chatInput",
"type": "string",
"value": "={{ $('Chat Trigger').item.json.chatInput}}"
},
{
"id": "0df8d578-8332-4cde-9044-489de16ab390",
"name": "session_id",
"type": "string",
"value": "={{ $('Chat Trigger').item.json.session_id }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "6afe6158-7a8b-4a83-a778-6fd28e2a11af",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
600,
960
],
"parameters": {
"options": {},
"resource": "assistant",
"assistantId": {
"__rl": true,
"mode": "list",
"value": "asst_numdCoMZPQ6GwfiJg5drg9hr",
"cachedResultName": "Chat IA - Testes - Dezembro - APIS"
}
},
"credentials": {
"openAiApi": {
"id": "FW1FWHcMcwemQ1kZ",
"name": "OpenAi account"
}
},
"typeVersion": 1.4
},
{
"id": "4b961f1d-7da2-4a0b-98e3-7ec35ee14335",
"name": "채팅 트리거",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-20,
560
],
"webhookId": "1f83e8ac-d465-454a-8327-cef7f0149cb1",
"parameters": {
"public": true,
"options": {},
"initialMessages": "Olá 👋\nSou Jovelino, o serviço de IA do Joov, me mande sua pergunta e responderei em seguida! :)"
},
"typeVersion": 1
},
{
"id": "dccdb07f-97db-4a5a-9b09-02a5de65246e",
"name": "Postgres 채팅 메모리",
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"position": [
640,
720
],
"parameters": {
"tableName": "aimessages",
"sessionKey": "={{ $('Chat Trigger').item.json.session_id }}{{ $json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 30
},
"credentials": {
"postgres": {
"id": "M1cYa0bOSX1nfczy",
"name": "Postgres account"
}
},
"typeVersion": 1.3
},
{
"id": "553dd27b-ab06-4605-99e0-8f15735cfff3",
"name": "Postgres 채팅 메모리1",
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"position": [
760,
1160
],
"parameters": {
"tableName": "aimessages",
"sessionKey": "={{ $('Chat Trigger').item.json.session_id }}{{ $json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 1
},
"credentials": {
"postgres": {
"id": "M1cYa0bOSX1nfczy",
"name": "Postgres account"
}
},
"typeVersion": 1.3
},
{
"id": "0103fb97-c691-4bd3-b26d-85aaa9774594",
"name": "데이터베이스 내 제품",
"type": "n8n-nodes-base.mySqlTool",
"position": [
1460,
600
],
"parameters": {
"query": "SELECT * \nFROM Products p \nWHERE \n cityQuery = '{{ $fromAI(\"cityQuery\") }}' AND \n state = '{{ $fromAI(\"state\") }}' AND \n modality = 'PME' AND \n removed = 0 AND \n ({{ $fromAI(\"holderCount\") || 1 }} + {{ $fromAI(\"dependentsCount\") || 0 }}) BETWEEN p.minLifeAmount AND p.maxLifeAmount AND\n (CASE\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 0 AND 18 THEN priceAtAge0To18\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 19 AND 23 THEN priceAtAge19To23\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 24 AND 28 THEN priceAtAge24To28\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 29 AND 33 THEN priceAtAge29To33\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 34 AND 38 THEN priceAtAge34To38\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 39 AND 43 THEN priceAtAge39To43\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 44 AND 48 THEN priceAtAge44To48\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 49 AND 53 THEN priceAtAge49To53\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 54 AND 58 THEN priceAtAge54To58\n ELSE priceAtAge59To199\n END) IS NOT NULL\nORDER BY \n (CASE\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 0 AND 18 THEN priceAtAge0To18\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 19 AND 23 THEN priceAtAge19To23\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 24 AND 28 THEN priceAtAge24To28\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 29 AND 33 THEN priceAtAge29To33\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 34 AND 38 THEN priceAtAge34To38\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 39 AND 43 THEN priceAtAge39To43\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 44 AND 48 THEN priceAtAge44To48\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 49 AND 53 THEN priceAtAge49To53\n WHEN {{ $fromAI(\"holderAge\") }} BETWEEN 54 AND 58 THEN priceAtAge54To58\n ELSE priceAtAge59To199\n END) ASC, \n createdAt DESC\nLIMIT 3;\n",
"options": {
"detailedOutput": true
},
"operation": "executeQuery",
"descriptionType": "manual",
"toolDescription": "// Search for the X product bla bla bla"
},
"credentials": {
"mySql": {
"id": "lkGJt8aNB0azyaGy",
"name": "MySQL account 2"
}
},
"typeVersion": 2.4
},
{
"id": "0cdfd89f-eb9e-4b6c-90d1-1cf8d6ed96bb",
"name": "지식 베이스",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [
1340,
600
],
"parameters": {
"url": "https://quotation.joov.com.br/widget/info?modalidade={modalidade}&estado=SP&cidade={city}&operadora={operadora}",
"toolDescription": "Here you will find the knowlegde base of my shop and bla bla bla Use this when they ask for price, whatever i want."
},
"typeVersion": 1.1
},
{
"id": "393f792a-4eff-4b33-aac0-025fc622a4b3",
"name": "External API",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [
1200,
600
],
"parameters": {
"url": "https://integracao-sed-alb-323570099.us-east-1.elb.amazonaws.com/findByNameAndBirthDate",
"method": "POST",
"jsonBody": "={\n \"name\": \"{{json.name}}\",\n \"birthdate\": \"{{json.birthdate }}\"\n}",
"sendBody": true,
"specifyBody": "json",
"toolDescription": "Pegue o nome completo em camel case, exemplo: Fernanda Melo, e a data de nacimento nesse formato: 1990-03-28"
},
"typeVersion": 1.1
},
{
"id": "7ce7a5e7-6238-4479-a26f-bdcde1784188",
"name": "스티커 노트",
"type": "n8n-nodes-base.stickyNote",
"position": [
1160,
414
],
"parameters": {
"color": 5,
"width": 436.73182569600795,
"height": 367.7413881276459,
"content": "TOOLS"
},
"typeVersion": 1
},
{
"id": "df6737ca-c588-48fc-9761-2a5307841298",
"name": "OpenAI2",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
460,
460
],
"parameters": {
"text": "={{ $json.chatInput }}",
"prompt": "define",
"options": {},
"resource": "assistant",
"assistantId": {
"__rl": true,
"mode": "list",
"value": "asst_x2qfc7EuoPv7XGOL84ClEZ3L",
"cachedResultName": "PINE"
}
},
"credentials": {
"openAiApi": {
"id": "FW1FWHcMcwemQ1kZ",
"name": "OpenAi account"
}
},
"typeVersion": 1.4
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d1dc3988-6677-47c9-b91a-6875c7b6151d",
"connections": {
"c6e454af-70a1-4c65-8450-8159f7fc738b": {
"main": [
[
{
"node": "2221736f-ef99-4ac8-8a81-51af6d4e7dcd",
"type": "main",
"index": 0
}
],
[
{
"node": "df6737ca-c588-48fc-9761-2a5307841298",
"type": "main",
"index": 0
}
]
]
},
"6afe6158-7a8b-4a83-a778-6fd28e2a11af": {
"main": [
[
{
"node": "6aa1b3a4-0e6a-4312-9d9f-f67c4bf8f443",
"type": "main",
"index": 0
}
]
]
},
"4b961f1d-7da2-4a0b-98e3-7ec35ee14335": {
"main": [
[
{
"node": "c6e454af-70a1-4c65-8450-8159f7fc738b",
"type": "main",
"index": 0
}
]
]
},
"2221736f-ef99-4ac8-8a81-51af6d4e7dcd": {
"main": [
[
{
"node": "6afe6158-7a8b-4a83-a778-6fd28e2a11af",
"type": "main",
"index": 0
}
]
]
},
"6aa1b3a4-0e6a-4312-9d9f-f67c4bf8f443": {
"main": [
[
{
"node": "df6737ca-c588-48fc-9761-2a5307841298",
"type": "main",
"index": 0
}
]
]
},
"393f792a-4eff-4b33-aac0-025fc622a4b3": {
"ai_tool": [
[
{
"node": "df6737ca-c588-48fc-9761-2a5307841298",
"type": "ai_tool",
"index": 0
}
]
]
},
"0cdfd89f-eb9e-4b6c-90d1-1cf8d6ed96bb": {
"ai_tool": [
[
{
"node": "df6737ca-c588-48fc-9761-2a5307841298",
"type": "ai_tool",
"index": 0
}
]
]
},
"dccdb07f-97db-4a5a-9b09-02a5de65246e": {
"ai_memory": [
[
{
"node": "df6737ca-c588-48fc-9761-2a5307841298",
"type": "ai_memory",
"index": 0
}
]
]
},
"553dd27b-ab06-4605-99e0-8f15735cfff3": {
"ai_memory": [
[
{
"node": "6afe6158-7a8b-4a83-a778-6fd28e2a11af",
"type": "ai_memory",
"index": 0
}
]
]
},
"0103fb97-c691-4bd3-b26d-85aaa9774594": {
"ai_tool": [
[
{
"node": "df6737ca-c588-48fc-9761-2a5307841298",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
중급 - 인공지능
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
高级판매AI에이전트
AI판매에이전트:WhatsApp、FB、IG、OpenAI、Airtable、Supabase자동预约
If
Set
Switch
+
If
Set
Switch
58 노드Sam Yassine
영업
자동화된 멀티플랫폼 판매 에이전트
RAG, CRM 및 결제 처리를 사용한 멀티 플랫폼 세일즈 에이전트
If
Set
Switch
+
If
Set
Switch
83 노드Electrabot
영업
[템플릿] 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
기타
시각화 참조 라이브러리에서 n8n 노드를 탐색
可视化 참조 라이브러리에서 n8n 노드를 탐색
If
Ftp
Set
+
If
Ftp
Set
113 노드I versus AI
기타
☎️ 데모 콜센터
AI 챗봇 콜센터: 데모 콜센터 (프로덕션 준비 완료, 파트 2)
If
Set
Code
+
If
Set
Code
38 노드ChatPayLabs
지원