DOCS/workflow/01_conversation/coldmail_ir_notification_sync.json
2026-03-19 00:05:26 +09:00

106 lines
3.5 KiB
JSON

{
"name": "robeing-slack-coldmail-ir-notification",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "notifications/coldmail-ir",
"responseMode": "responseNode",
"options": {}
},
"id": "cm-ir-001",
"name": "Webhook In",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [200, 240]
},
{
"parameters": {
"jsCode": "const body = $json.body || {};\nconst has_ir = body.has_ir_deck && body.selected_document_id;\nreturn {\n company_name: body.company_name || '알 수 없는 회사',\n sender: body.sender || '',\n subject: body.subject || '',\n summary: body.summary || '요약 정보가 없습니다.',\n has_ir,\n document_id: body.selected_document_id || '',\n document_name: body.selected_filename || '',\n slack_channel: body.slack_channel || 'C07...',\n robeing_id: body.robeing_id || 'rb8001'\n};"
},
"id": "cm-ir-002",
"name": "Format Coldmail Data",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [440, 240]
},
{
"parameters": {
"resource": "message",
"operation": "post",
"channel": "={{ $json.slack_channel }}",
"text": "=📩 *새 콜드메일 감지: {{ $json.company_name }}*\\n보낸이: {{ $json.sender }}\\n제목: {{ $json.subject }}\\n\\n*요약*\\n{{ $json.summary }}",
"otherOptions": {
"includeLinkToApp": false
}
},
"id": "cm-ir-003",
"name": "Post Basic Notification",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"position": [700, 240]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $json.has_ir }}",
"value2": true
}
]
}
},
"id": "cm-ir-004",
"name": "Has IR Deck?",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [960, 240]
},
{
"parameters": {
"resource": "message",
"operation": "post",
"channel": "={{ $json.slack_channel }}",
"text": "=📄 *IR 자료 감지됨: {{ $json.document_name }}*",
"otherOptions": {
"threadTs": "={{ $json.ts }}",
"attachments": [
{
"fallback": "IR 분석 버튼",
"callback_id": "coldmail_analyze_ir",
"actions": [
{
"name": "analyze",
"text": "📊 IR 지표 추출 및 밸류에이션",
"type": "button",
"value": "={{ $json.document_id }}",
"style": "primary"
}
]
}
]
}
},
"id": "cm-ir-005",
"name": "Add IR Analysis Button",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"position": [1240, 160]
}
],
"connections": {
"Webhook In": { "main": [[{ "node": "Format Coldmail Data", "type": "main", "index": 0 }]] },
"Format Coldmail Data": { "main": [[{ "node": "Post Basic Notification", "type": "main", "index": 0 }]] },
"Post Basic Notification": { "main": [[{ "node": "Has IR Deck?", "type": "main", "index": 0 }]] },
"Has IR Deck?": {
"main": [
[{ "node": "Add IR Analysis Button", "type": "main", "index": 0 }],
[]
]
}
},
"pinData": {},
"meta": { "templateCredsSetupCompleted": true, "instanceId": "robeing-conversation" }
}