The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"nodes": [
{
"parameters": {
"trigger": [
"app_mention"
],
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"options": {}
},
"type": "n8n-nodes-base.slackTrigger",
"typeVersion": 1,
"position": [
100,
400
],
"id": "db64c57f-40ec-48b5-b200-2dc16774ab45",
"name": "Slack Trigger1",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "a3888806-dec6-416a-819c-2925e66b8bdc",
"name": "question",
"value": "={{$json.text.replace(/^<@[^>]+>\\s*/, '')}}",
"type": "string"
},
{
"id": "a3888806-dec6-416a-819c-2925e66b8bdc-url",
"name": "fileUrl",
"value": "={{ Array.isArray($json.files) && $json.files.length > 0 ? $json.files[0].url_private : '' }}",
"type": "string"
},
{
"id": "a3888806-dec6-416a-819c-2925e66b8bdc-name",
"name": "fileName",
"value": "={{ Array.isArray($json.files) && $json.files.length > 0 ? $json.files[0].name : '' }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
380,
400
],
"id": "991d6a84-0d84-49c5-9f14-b265f6c99c80",
"name": "Edit Fields1"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "fa11e000-0000-0001-0000-000000000001",
"leftValue": "={{ Array.isArray($('Slack Trigger1').item.json.files) && $('Slack Trigger1').item.json.files.length > 0 }}",
"rightValue": "true",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
660,
400
],
"id": "27d5fe0c-0694-4d45-82c3-7d1460b87f66",
"name": "File Branch"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": false,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "dc001111-0000-0001-0000-000000000001",
"leftValue": "={{ $('Edit Fields1').item.json.question }}",
"rightValue": "\ubb38\uc11c\ubaa9\ub85d",
"operator": {
"type": "string",
"operation": "contains"
}
},
{
"id": "dc001111-0000-0002-0000-000000000002",
"leftValue": "={{ $('Edit Fields1').item.json.question }}",
"rightValue": "\uc5b4\ub5a4 \ud30c\uc77c",
"operator": {
"type": "string",
"operation": "contains"
}
},
{
"id": "dc001111-0000-0003-0000-000000000003",
"leftValue": "={{ $('Edit Fields1').item.json.question }}",
"rightValue": "\ud30c\uc77c \ubaa9\ub85d",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
940,
400
],
"id": "2ccf3309-d0d1-4319-8a49-b0cc686f4b5e",
"name": "DocList Branch"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": false,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "hb000001-0000-0001-0000-000000000001",
"leftValue": "={{ $('Edit Fields1').item.json.question }}",
"rightValue": "\ub3c4\uc6c0\ub9d0",
"operator": {
"type": "string",
"operation": "contains"
}
},
{
"id": "hb000001-0000-0002-0000-000000000002",
"leftValue": "={{ $('Edit Fields1').item.json.question }}",
"rightValue": "\ubb58 \ud560 \uc218 \uc788",
"operator": {
"type": "string",
"operation": "contains"
}
},
{
"id": "hb000001-0000-0003-0000-000000000003",
"leftValue": "={{ $('Edit Fields1').item.json.question }}",
"rightValue": "\uc0ac\uc6a9\ubc95",
"operator": {
"type": "string",
"operation": "contains"
}
},
{
"id": "hb000001-0000-0004-0000-000000000004",
"leftValue": "={{ $('Edit Fields1').item.json.question }}",
"rightValue": "help",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
1220,
400
],
"id": "b0796b0e-55f6-4449-a320-374c5ab2edff",
"name": "Help Branch"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": false,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "del-cond-0001",
"leftValue": "={{ $('Edit Fields1').item.json.question }}",
"rightValue": "\uc0ad\uc81c",
"operator": {
"type": "string",
"operation": "startsWith"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
1500,
400
],
"id": "del-branch-0001-0001-0001-0001",
"name": "Delete Branch"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "dd08ecf3-0482-4850-8505-dddeada2211b",
"leftValue": "={{ $('Edit Fields1').item.json.question }}",
"rightValue": "\uba85\uc138\uc11c",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
1780,
400
],
"id": "b3e59450-24a7-4da0-8ad5-2ba86499d845",
"name": "Report Branch1"
},
{
"parameters": {
"url": "={{ $json.fileUrl }}",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "slackApi",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
660,
100
],
"id": "8e8ab545-7c89-4abe-98e2-85a85466df0e",
"name": "Download File",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"method": "POST",
"url": "=http://host.docker.internal:8080/ingest/upload?filename_override={{ encodeURIComponent($('Edit Fields1').first().json.fileName) }}",
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"parameterType": "formBinaryData",
"name": "file",
"inputDataFieldName": "data"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
940,
100
],
"id": "2b43eba7-0fdb-4911-84bc-40e685021d58",
"name": "Upload to Backend",
"continueOnFail": true
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"text": "={{ $('Edit Fields1').first().json.fileName + ' \uc0c9\uc778\uc744 \uc2dc\uc791\ud588\uc2b5\ub2c8\ub2e4. \uc57d 30\ucd08 \ud6c4 \uacb0\uacfc\ub97c \uc54c\ub824\ub4dc\ub9b4\uac8c\uc694.' }}",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.4,
"position": [
1220,
100
],
"id": "30fe555d-67a6-4cbe-87ee-319edaa08aa2",
"name": "Send Indexing Started",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1500,
100
],
"id": "c5699ddd-6975-439c-ba87-a2388e77472a",
"name": "Wait 30s"
},
{
"parameters": {
"url": "=http://host.docker.internal:8080/status?source={{ $('Upload to Backend').first().json.filename }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
1780,
100
],
"id": "a1ab87ff-b98e-438a-ae89-0b47b92f9b42",
"name": "Check Status",
"continueOnFail": true
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "b9c0d1e2-f3a4-0001-b9c0-d1e2f3a40001",
"leftValue": "={{ $json.status }}",
"rightValue": "SUCCESS",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
2620,
100
],
"id": "ead2b05c-8256-41e3-af9a-eab09a3070bd",
"name": "Index Result Branch"
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"text": "={{ '\u2705 ' + $('Edit Fields1').first().json.fileName + ' \uc0c9\uc778 \uc644\ub8cc! ' + ($json.chroma_doc_count || 0) + '\uac74 \uc0c9\uc778\ub428.' }}",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.4,
"position": [
2900,
0
],
"id": "8a1cc4dc-07b2-4008-bb0d-39f72f427801",
"name": "Send Index Complete",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"text": "={{ '\u26a0\ufe0f ' + $('Edit Fields1').first().json.fileName + ' \uc0c9\uc778 ' + ($json.status || '\uc0c1\ud0dc \ud655\uc778 \ud544\uc694') + ($json.error_message ? ': ' + $json.error_message : '') }}",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.4,
"position": [
2900,
200
],
"id": "48badbae-785d-4138-9d85-0cf1e5c86441",
"name": "Send Index Failed",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"url": "http://host.docker.internal:8080/documents",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
940,
700
],
"id": "899b8378-2df6-4d8f-9dd5-85bd39d02d6d",
"name": "Call Documents API"
},
{
"parameters": {
"jsCode": "const data = $input.first().json;\nconst files = data.files || [];\n\nif (files.length === 0) {\n return [{ json: { text: '\ud604\uc7ac \uc0c9\uc778\ub41c \ubb38\uc11c\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.' } }];\n}\n\nconst statusEmoji = { SUCCESS: '\u2705', FAILED: '\u274c', IN_PROGRESS: '\u23f3' };\n\nconst lines = files.map(f => {\n const emoji = statusEmoji[f.status] || '\u2753';\n const count = f.chroma_doc_count ? ` (${f.chroma_doc_count}\uac74)` : '';\n return `${emoji} ${f.source}${count}`;\n});\n\nreturn [{\n json: {\n text: `\ud604\uc7ac \uc0c9\uc778\ub41c \ubb38\uc11c (${files.length}\uac1c):\\n${lines.join('\\n')}`\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1220,
700
],
"id": "5cdb2b3a-6497-4d3d-9985-4d6d682c24b0",
"name": "Format Doc List"
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"text": "={{ $json.text }}",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.4,
"position": [
1500,
700
],
"id": "e9e670a7-d050-4426-ae26-86eb02960e65",
"name": "Send Doc List",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"text": "\uc548\ub155\ud558\uc138\uc694! \uc7a5\ud559 \ubb38\uc11c \ucc57\ubd07\uc785\ub2c8\ub2e4. \uc544\ub798 \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n*\uc9c8\uc758\uc751\ub2f5*\n\ud3c9\uc18c \ud558\ub4ef \uc790\uc5f0\uc5b4\ub85c \ubb3c\uc5b4\ubcf4\uba74 \ub429\ub2c8\ub2e4.\n`@\ubd07 1\ud559\ub144 \uc7a5\ud559\uc0dd \uba85\ub2e8 \uc54c\ub824\uc918`\n`@\ubd07 \ud558\ubc18\uae30 \uc7a5\ud559\uae08 \ucd1d\uc561\uc774 \uc5bc\ub9c8\uc57c?`\n`@\ubd07 \uc2e0\uc785\uc0dd \uc7a5\ud559\uae08 \uc120\ubc1c \uae30\uc900\uc774 \ubb50\uc57c?`\n\n*\uba85\uc138\uc11c \uc790\ub3d9 \uc791\uc131*\n`@\ubd07 \uba85\uc138\uc11c \ub9cc\ub4e4\uc5b4\uc918`\n\u2192 \uc0c9\uc778\ub41c \ubb38\uc11c \uc804\uccb4\ub97c \ubd84\uc11d\ud574 Google Sheets \uae30\ubd80\uae08 \ud65c\uc6a9\uc2e4\uc801\uba85\uc138\uc11c\uc5d0 \uc790\ub3d9 \uc785\ub825\ud569\ub2c8\ub2e4.\n\n*\ud30c\uc77c \uc0c9\uc778 (\uc0c8 \ubb38\uc11c \ucd94\uac00)*\n\ud30c\uc77c(xlsx / pdf / hwp)\uc744 \ucca8\ubd80\ud558\uace0 \ubd07\uc744 \uba58\uc158\ud558\uc138\uc694.\n`@\ubd07 [\ud30c\uc77c \ucca8\ubd80]`\n\u2192 \uc57d 30\ucd08 \ud6c4 \uc644\ub8cc \uc54c\ub9bc\uc774 \uc635\ub2c8\ub2e4. \uc644\ub8cc \uc804\uc5d0\ub294 \uc9c8\ubb38\uc5d0 \ubc18\uc601\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\n*\ubb38\uc11c \ubaa9\ub85d \ud655\uc778*\n`@\ubd07 \ubb38\uc11c\ubaa9\ub85d`\n\u2192 \ud604\uc7ac \uc0c9\uc778\ub41c \ud30c\uc77c \ubaa9\ub85d\uacfc \uac74\uc218\ub97c \ubcf4\uc5ec\uc90d\ub2c8\ub2e4.\n\n*\ubb38\uc11c \uc0ad\uc81c*\n\uba3c\uc800 `@\ubd07 \ubb38\uc11c\ubaa9\ub85d` \uc73c\ub85c \ud30c\uc77c\uba85\uc744 \ud655\uc778\ud55c \ub4a4 \uc815\ud655\ud788 \uc785\ub825\ud558\uc138\uc694.\n`@\ubd07 \uc0ad\uc81c \uc2e0\uc785\uc0dd \ub3d9\ubb38\uc7a5\ud559\uae08 3\uc6d4-480\ub9cc\uc6d0.xlsx`\n\u2192 ChromaDB, \ud30c\ucf00\uc774, \ud30c\uc77c \ubaa8\ub450 \uc644\uc804 \uc0ad\uc81c\ub429\ub2c8\ub2e4.\n\n*\ub3c4\uc6c0\ub9d0*\n`@\ubd07 \ub3c4\uc6c0\ub9d0` \ub610\ub294 `@\ubd07 help`",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.4,
"position": [
1220,
900
],
"id": "7216a870-4848-4ee3-a619-7e9fa174bd8e",
"name": "Send Help Message",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "const question = $('Edit Fields1').item.json.question;\nconst match = question.match(/^\uc0ad\uc81c\\s+(.+)/i);\nconst filename = match ? match[1].trim() : '';\nreturn [{ json: { filename } }];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1500,
900
],
"id": "del-extract-0002-0002-0002-0002",
"name": "Extract Delete Filename"
},
{
"parameters": {
"method": "DELETE",
"url": "=http://host.docker.internal:8080/documents/{{ encodeURIComponent($json.filename) }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
1780,
900
],
"id": "del-api-0003-0003-0003-0003",
"name": "Call Delete API",
"continueOnFail": true
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"text": "={{ $json.error ? '\u274c \uc0ad\uc81c \uc2e4\ud328: ' + ($json.error.message || '\ud30c\uc77c\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.') : '\u2705 *' + $('Extract Delete Filename').first().json.filename + '* \uc0ad\uc81c \uc644\ub8cc.' }}",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.4,
"position": [
2060,
900
],
"id": "del-result-0004-0004-0004-0004",
"name": "Send Delete Result",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "copy",
"fileId": {
"__rl": true,
"value": "1OR7jfrMyjFMmDlz1BkXfH8fpNJ2yfclEXfghSpUpMdQ",
"mode": "list",
"cachedResultName": "\uae30\ubd80\uae08_\ud65c\uc6a9\uc2e4\uc801\uba85\uc138\uc11c_\ud15c\ud50c\ub9bf",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1OR7jfrMyjFMmDlz1BkXfH8fpNJ2yfclEXfghSpUpMdQ/edit?usp=drivesdk"
},
"name": "={{ \"\uae30\ubd80\uae08_\ud65c\uc6a9\uc2e4\uc801\uba85\uc138\uc11c_\" + $now.format(\"yyyyMMdd_HHmmss\") }}",
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
1780,
-200
],
"id": "ba4fa7b8-18e5-4ebd-a3f5-1bc0833605cb",
"name": "Copy Template1",
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"url": "http://host.docker.internal:8080/summary",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
2060,
-200
],
"id": "15bd80c4-202d-4edf-a198-c2b1e682c779",
"name": "Run Summary"
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "={{ $(\"Copy Template1\").first().json.id }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "INPUT_BASIC",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"submit_year": "={{ $now.setZone('Asia/Seoul').toFormat('yyyy') }}",
"submit_month": "={{ $now.setZone('Asia/Seoul').toFormat('MM') }}",
"submit_day": "={{ $now.setZone('Asia/Seoul').toFormat('dd') }}"
},
"matchingColumns": [],
"schema": [
{
"id": "statement_no",
"displayName": "statement_no",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "corp_name",
"displayName": "corp_name",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "business_no",
"displayName": "business_no",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "representative",
"displayName": "representative",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "donation_type",
"displayName": "donation_type",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "email",
"displayName": "email",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "business_year",
"displayName": "business_year",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "phone",
"displayName": "phone",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "designated_date",
"displayName": "designated_date",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "address",
"displayName": "address",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "submit_year",
"displayName": "submit_year",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "submit_month",
"displayName": "submit_month",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "submit_day",
"displayName": "submit_day",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "submitter",
"displayName": "submitter",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2060,
0
],
"id": "7423e159-e960-4c23-8b0d-8330844ed194",
"name": "Append INPUT_BASIC1",
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"fieldToSplitOut": "\ubb38\uc11c_\ubaa9\ub85d",
"options": {}
},
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
2340,
-200
],
"id": "3ff447cd-0c6e-406e-8dfe-55b223a0d48b",
"name": "Split Out"
},
{
"parameters": {
"jsCode": "return $input.all()\n .map(item => {\n const doc = item.json;\n\n const \ucd1d\uc561Raw = String(doc[\"\ucd1d\uc561\"] || \"\").normalize(\"NFKC\");\n const match = \ucd1d\uc561Raw.match(/([0-9][0-9,]*)\\s*\ub9cc\uc6d0/);\n\n if (!match) return null;\n\n const amount = Number(match[1].replace(/,/g, \"\")) * 10000;\n\n const purpose = String(doc[\"\ubaa9\uc801\"] || \"\")\n .normalize(\"NFKC\")\n .replace(/[-\u2013]?\\s*[0-9][0-9,]*\\s*\ub9cc\uc6d0/g, \"\")\n .trim();\n\n return {\n json: {\n ...doc,\n \ubaa9\uc801: purpose,\n \ucd1d\uc561: amount,\n }\n };\n })\n .filter(Boolean);"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
2620,
-200
],
"id": "df2788f8-6366-4c8b-9d27-42cd9cfe899e",
"name": "Modify Items",
"alwaysOutputData": true
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "={{ $('Copy Template1').first().json.id }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "=INPUT_DOMESTIC",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"section": "=monthly",
"period": "={{ $json['\uc9c0\ucd9c\uc6d4'] }}",
"purpose": "={{ $json['\ubaa9\uc801'] }}",
"count_or_people": "={{ $json['\uc778\uc6d0'] }}",
"recipient": "={{ $json['\uc9c0\uae09\ucc98'] }}",
"amount": "={{ $json['\ucd1d\uc561'] }}"
},
"matchingColumns": [],
"schema": [
{
"id": "section",
"displayName": "section",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "period",
"displayName": "period",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "purpose",
"displayName": "purpose",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "count_or_people",
"displayName": "count_or_people",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "recipient",
"displayName": "recipient",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "amount",
"displayName": "amount",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2900,
-200
],
"id": "663a7053-0eff-4a4a-b571-f6d7b3f94e75",
"name": "Append INPUT_DOMESTIC",
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "return [\n {\n json: {}\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
3180,
-200
],
"id": "0fb0370b-94b7-48d4-9cd8-47a64c593d23",
"name": "Single Run Guard1"
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "={{ $(\"Copy Template1\").first().json.id }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "=INPUT_DOMESTIC",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"section": "=total",
"period": "=",
"purpose": "=",
"count_or_people": "==SUMIF(A:A,\"monthly\",D:D)",
"recipient": "=",
"amount": "==SUMIF(A:A,\"monthly\",F:F)"
},
"matchingColumns": [],
"schema": [
{
"id": "section",
"displayName": "section",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "period",
"displayName": "period",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "purpose",
"displayName": "purpose",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "count_or_people",
"displayName": "count_or_people",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "recipient",
"displayName": "recipient",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "amount",
"displayName": "amount",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
3460,
-200
],
"id": "88fc6b6d-8b4b-4a7b-ae3d-584567e4776f",
"name": "Append DOMESTIC(TOTALl SUM)1",
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"text": "=\uba85\uc138\uc11c \uc791\uc131\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\n\n\ud83d\udd17 https://docs.google.com/spreadsheets/d/{{ $('Copy Template1').first().json.id }}/edit",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.4,
"position": [
3740,
-200
],
"id": "a934cdcc-1565-4343-b109-a464e5406120",
"name": "Send Report Message1",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"method": "POST",
"url": "http://host.docker.internal:8080/chat",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "question",
"value": "={{ $json.question }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
1780,
1200
],
"id": "e5bc5db4-8ea2-417a-a0c4-5cc4f4a82765",
"name": "Run Chat2"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "d5d54cb6-c3ff-4f58-9e7e-c08ac07b1439",
"leftValue": "={{$json.answer}}",
"rightValue": "\uc870\ud68c\ub41c \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.",
"operator": {
"type": "string",
"operation": "notEquals"
}
},
{
"id": "4290c539-f282-4b42-8bd6-24832a967d3d",
"leftValue": "={{ ['pandas', 'vector'].includes(($json.source || '').trim().toLowerCase()) }}",
"rightValue": "true",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
2060,
1200
],
"id": "800a1307-ed12-48e3-8c71-9cd807c5eb98",
"name": "Chat Response1"
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"text": "=\ub2f5\ubcc0:{{ $json.answer }}\n\n\ubd84\uae30:{{ $json.source }}\n\n\ucd9c\ucc98:{{ $json.sources }}",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.4,
"position": [
2340,
1100
],
"id": "714493f5-dc4c-4cd0-879f-b39ce5fb9b43",
"name": "Send Chat Answer1",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0B83LZ70B1",
"mode": "id"
},
"text": "\uad00\ub828 \ubb38\uc11c\ub97c \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.4,
"position": [
2340,
1300
],
"id": "143f23d1-364e-47a5-a54e-d45d46286690",
"name": "Send Error Message1",
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "retry-cond-0001",
"leftValue": "={{ $json.status }}",
"rightValue": "IN_PROGRESS",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
2060,
100
],
"id": "retry-branch-0001-0001-0001-0001",
"name": "Retry Branch"
},
{
"parameters": {
"resume": "timeInterval",
"amount": 10,
"unit": "seconds"
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
2340,
300
],
"id": "wait-retry-0001-0001-0001-0001",
"name": "Wait 10s Retry"
},
{
"parameters": {
"url": "=http://host.docker.internal:8080/status?source={{ $('Upload to Backend').first().json.filename }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
2620,
300
],
"id": "check-status-retry-0001-0001-0001",
"name": "Check Status Retry",
"continueOnFail": true
}
],
"connections": {
"Slack Trigger1": {
"main": [
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "File Branch",
"type": "main",
"index": 0
}
]
]
},
"File Branch": {
"main": [
[
{
"node": "Download File",
"type": "main",
"index": 0
}
],
[
{
"node": "DocList Branch",
"type": "main",
"index": 0
}
]
]
},
"Download File": {
"main": [
[
{
"node": "Upload to Backend",
"type": "main",
"index": 0
}
]
]
},
"Upload to Backend": {
"main": [
[
{
"node": "Send Indexing Started",
"type": "main",
"index": 0
}
]
]
},
"Send Indexing Started": {
"main": [
[
{
"node": "Wait 30s",
"type": "main",
"index": 0
}
]
]
},
"Wait 30s": {
"main": [
[
{
"node": "Check Status",
"type": "main",
"index": 0
}
]
]
},
"Check Status": {
"main": [
[
{
"node": "Retry Branch",
"type": "main",
"index": 0
}
]
]
},
"Retry Branch": {
"main": [
[
{
"node": "Wait 10s Retry",
"type": "main",
"index": 0
}
],
[
{
"node": "Index Result Branch",
"type": "main",
"index": 0
}
]
]
},
"Wait 10s Retry": {
"main": [
[
{
"node": "Check Status Retry",
"type": "main",
"index": 0
}
]
]
},
"Check Status Retry": {
"main": [
[
{
"node": "Index Result Branch",
"type": "main",
"index": 0
}
]
]
},
"Index Result Branch": {
"main": [
[
{
"node": "Send Index Complete",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Index Failed",
"type": "main",
"index": 0
}
]
]
},
"DocList Branch": {
"main": [
[
{
"node": "Call Documents API",
"type": "main",
"index": 0
}
],
[
{
"node": "Help Branch",
"type": "main",
"index": 0
}
]
]
},
"Call Documents API": {
"main": [
[
{
"node": "Format Doc List",
"type": "main",
"index": 0
}
]
]
},
"Format Doc List": {
"main": [
[
{
"node": "Send Doc List",
"type": "main",
"index": 0
}
]
]
},
"Help Branch": {
"main": [
[
{
"node": "Send Help Message",
"type": "main",
"index": 0
}
],
[
{
"node": "Delete Branch",
"type": "main",
"index": 0
}
]
]
},
"Delete Branch": {
"main": [
[
{
"node": "Extract Delete Filename",
"type": "main",
"index": 0
}
],
[
{
"node": "Report Branch1",
"type": "main",
"index": 0
}
]
]
},
"Extract Delete Filename": {
"main": [
[
{
"node": "Call Delete API",
"type": "main",
"index": 0
}
]
]
},
"Call Delete API": {
"main": [
[
{
"node": "Send Delete Result",
"type": "main",
"index": 0
}
]
]
},
"Report Branch1": {
"main": [
[
{
"node": "Copy Template1",
"type": "main",
"index": 0
}
],
[
{
"node": "Run Chat2",
"type": "main",
"index": 0
}
]
]
},
"Copy Template1": {
"main": [
[
{
"node": "Run Summary",
"type": "main",
"index": 0
}
]
]
},
"Run Summary": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
},
{
"node": "Append INPUT_BASIC1",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Modify Items",
"type": "main",
"index": 0
}
]
]
},
"Modify Items": {
"main": [
[
{
"node": "Append INPUT_DOMESTIC",
"type": "main",
"index": 0
}
]
]
},
"Append INPUT_DOMESTIC": {
"main": [
[
{
"node": "Single Run Guard1",
"type": "main",
"index": 0
}
]
]
},
"Single Run Guard1": {
"main": [
[
{
"node": "Append DOMESTIC(TOTALl SUM)1",
"type": "main",
"index": 0
}
]
]
},
"Append DOMESTIC(TOTALl SUM)1": {
"main": [
[
{
"node": "Send Report Message1",
"type": "main",
"index": 0
}
]
]
},
"Run Chat2": {
"main": [
[
{
"node": "Chat Response1",
"type": "main",
"index": 0
}
]
]
},
"Chat Response1": {
"main": [
[
{
"node": "Send Chat Answer1",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Error Message1",
"type": "main",
"index": 0
}
]
]
}
},
"meta": {
"templateCredsSetupCompleted": true
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleSheetsOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
My Workflow. Uses googleSheets. Webhook trigger; 2 nodes.
Source: https://github.com/adamhaley/megyk-automations/blob/8531e41254f811502dc140400a1a5d94ff43ff4f/workflows/My_workflow.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Receive Google Sheet Data Via Rest Api. Uses googleSheets. Webhook trigger; 2 nodes.
Rodopi Dent - Finance UPDATE. Uses googleSheets. Webhook trigger; 10 nodes.
BARIN ALP - Auth Login. Uses googleSheets. Webhook trigger; 6 nodes.
Rodopi Dent - Finance GET. Uses googleSheets. Webhook trigger; 6 nodes.