{ "name": "robeing-slack-action-extractor-request", "nodes": [ { "parameters": { "channelId": { "__rl": true, "mode": "list", "value": "" }, "options": {} }, "id": "conv-act-001", "name": "Slack Trigger", "type": "n8n-nodes-base.slackTrigger", "typeVersion": 1, "position": [220, 220] }, { "parameters": { "jsCode": "const event = $json.event || {};\nconst text = (event.text || '').replace(/<@[^>]+>/g, '').trim();\nconst wantsActions = /할 일|액션|todo|action/i.test(text);\nreturn {\n should_process: wantsActions && Boolean(event.channel) && Boolean(event.user),\n channel_id: event.channel || '',\n thread_ts: event.thread_ts || event.ts || '',\n company_id: event.team || event.team_id || '',\n user_id: event.user || ''\n};" }, "id": "conv-act-002", "name": "Detect Action Intent", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [460, 220] }, { "parameters": { "conditions": { "boolean": [ { "value1": "={{ $json.should_process }}", "value2": true } ] } }, "id": "conv-act-003", "name": "Action Request?", "type": "n8n-nodes-base.if", "typeVersion": 2, "position": [700, 220] }, { "parameters": { "method": "POST", "url": "=http://192.168.219.52:8502/api/v1/extract-actions", "sendBody": true, "specifyBody": "json", "jsonBody": "={\"company_id\":\"{{$json.company_id}}\",\"user_id\":\"{{$json.user_id}}\",\"skill_level\":1,\"channel_id\":\"{{$json.channel_id}}\",\"time_range\":\"24h\",\"auto_assign\":true,\"priority_detection\":true}", "options": { "response": { "response": { "fullResponse": true } } } }, "id": "conv-act-004", "name": "Call skill-slack Extract Actions", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [970, 160] }, { "parameters": { "jsCode": "const body = $json.body || {};\nconst req = $('Detect Action Intent').item.json;\nconst items = body.action_items || [];\nconst lines = items.length ? items.map((item, index) => `${index + 1}. ${item.task}${item.assignee ? ' / 담당: ' + item.assignee : ''}${item.priority ? ' / 우선순위: ' + item.priority : ''}`).join('\\n') : '추출된 액션 아이템이 없습니다.';\nreturn { channel: req.channel_id, thread_ts: req.thread_ts, text: lines };" }, "id": "conv-act-005", "name": "Build Action Reply", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [1230, 160] }, { "parameters": { "resource": "message", "operation": "post", "channel": "={{ $json.channel }}", "text": "={{ $json.text }}", "otherOptions": { "threadTs": "={{ $json.thread_ts }}" } }, "id": "conv-act-006", "name": "Reply to Slack", "type": "n8n-nodes-base.slack", "typeVersion": 2, "position": [1480, 160] } ], "connections": { "Slack Trigger": { "main": [[{ "node": "Detect Action Intent", "type": "main", "index": 0 }]] }, "Detect Action Intent": { "main": [[{ "node": "Action Request?", "type": "main", "index": 0 }]] }, "Action Request?": { "main": [ [{ "node": "Call skill-slack Extract Actions", "type": "main", "index": 0 }], [] ] }, "Call skill-slack Extract Actions": { "main": [[{ "node": "Build Action Reply", "type": "main", "index": 0 }]] }, "Build Action Reply": { "main": [[{ "node": "Reply to Slack", "type": "main", "index": 0 }]] } }, "pinData": {}, "meta": { "templateCredsSetupCompleted": true, "instanceId": "robeing-conversation" } }