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 →
{
"name": "\u52d8\u5b9a\u79d1\u76ee\u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9\u5b66\u7fd2\u30d0\u30c3\u30c1",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 2 * * *"
}
]
}
},
"id": "schedule-trigger-node",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
250,
300
],
"notes": "\u6bce\u65e5\u6df1\u591c2\u6642\uff08JST\uff09\u306b\u5b9f\u884c"
},
{
"parameters": {
"operation": "read",
"documentId": {
"__rl": true,
"value": "16qhVQNDn_5Y1Ayw_H0ziUw1nu2b70o6IcRn1rr4Pa94",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Master_User_Config",
"mode": "name"
},
"options": {
"returnAllMatches": true
}
},
"id": "get-all-clients-node",
"name": "\u5168\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u53d6\u5f97",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.4,
"position": [
450,
300
],
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"notes": "Master_User_Config\u304b\u3089\u5168\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u53d6\u5f97"
},
{
"parameters": {},
"id": "loop-over-clients-node",
"name": "Loop Over Clients",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
650,
300
],
"notes": "\u5404\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u6bce\u306b\u51e6\u7406"
},
{
"parameters": {
"operation": "read",
"documentId": {
"__rl": true,
"value": "={{ $json.sheet_id }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "\u4ed5\u8a33\u53f0\u5e33",
"mode": "name"
},
"options": {
"returnAllMatches": true
}
},
"id": "get-ledger-node",
"name": "\u4ed5\u8a33\u53f0\u5e33\u53d6\u5f97\uff08\u904e\u53bb30\u65e5\uff09",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.4,
"position": [
850,
300
],
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"notes": "\u904e\u53bb30\u65e5\u5206\u306e\u4ed5\u8a33\u30c7\u30fc\u30bf\u3092\u53d6\u5f97"
},
{
"parameters": {
"jsCode": "// \u4ed5\u8a33\u53f0\u5e33\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\nconst ledgerData = $input.all();\n\n// \u904e\u53bb30\u65e5\u306e\u30c7\u30fc\u30bf\u3092\u30d5\u30a3\u30eb\u30bf\nconst thirtyDaysAgo = new Date();\nthirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);\n\nconst recentData = ledgerData.filter(item => {\n const date = new Date(item.json.date);\n return date >= thirtyDaysAgo;\n});\n\n// \u5e97\u8217\u00d7\u52d8\u5b9a\u79d1\u76ee\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u96c6\u8a08\nconst patterns = {};\n\nfor (const item of recentData) {\n const merchant = item.json.merchant || '';\n const category = item.json.debit_account || '';\n \n if (!merchant || !category) continue;\n \n const key = `${merchant}::${category}`;\n \n if (!patterns[key]) {\n patterns[key] = {\n merchant: merchant,\n category: category,\n count: 0\n };\n }\n \n patterns[key].count++;\n}\n\n// 3\u56de\u4ee5\u4e0a\u51fa\u73fe\u3057\u305f\u30d1\u30bf\u30fc\u30f3\u306e\u307f\u62bd\u51fa\nconst frequentPatterns = Object.values(patterns)\n .filter(p => p.count >= 3)\n .map(p => ({\n merchant_keyword: p.merchant,\n account_category: p.category,\n occurrence_count: p.count,\n confidence_score: 50 // \u65b0\u898f\u8ffd\u52a0\u306e\u521d\u671f\u30b9\u30b3\u30a2\n }));\n\nreturn frequentPatterns.map(p => ({ json: p }));"
},
"id": "analyze-patterns-node",
"name": "\u30d1\u30bf\u30fc\u30f3\u5206\u6790",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1050,
300
],
"notes": "\u5e97\u8217\u00d7\u79d1\u76ee\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u96c6\u8a08\u30013\u56de\u4ee5\u4e0a\u3092\u62bd\u51fa"
},
{
"parameters": {
"operation": "read",
"documentId": {
"__rl": true,
"value": "={{ $('Loop Over Clients').item.json.sheet_id }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "\u52d8\u5b9a\u79d1\u76ee\u30de\u30b9\u30bf\u30fc",
"mode": "name"
},
"options": {
"returnAllMatches": true
}
},
"id": "get-knowledge-base-node",
"name": "\u52d8\u5b9a\u79d1\u76ee\u30de\u30b9\u30bf\u30fc\u53d6\u5f97",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.4,
"position": [
1250,
300
],
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"notes": "\u65e2\u5b58\u306e\u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9\u3092\u53d6\u5f97"
},
{
"parameters": {
"jsCode": "// \u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u3092\u53d6\u5f97\nconst newPatterns = $('\u30d1\u30bf\u30fc\u30f3\u5206\u6790').all();\n\n// \u65e2\u5b58\u306e\u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9\u3092\u53d6\u5f97\nconst existingKB = $input.all();\n\n// \u65e2\u5b58\u306e\u30d1\u30bf\u30fc\u30f3\uff08\u5e97\u8217\u00d7\u79d1\u76ee\uff09\u3092\u30bb\u30c3\u30c8\u5316\nconst existingKeys = new Set();\nfor (const item of existingKB) {\n const merchant = item.json.merchant_keyword || '';\n const category = item.json.account_category || '';\n if (merchant && category) {\n existingKeys.add(`${merchant}::${category}`);\n }\n}\n\n// \u65b0\u898f\u8ffd\u52a0\u3059\u3079\u304d\u30d1\u30bf\u30fc\u30f3\u3092\u30d5\u30a3\u30eb\u30bf\nconst patternsToAdd = [];\n\nfor (const pattern of newPatterns) {\n const merchant = pattern.json.merchant_keyword;\n const category = pattern.json.account_category;\n const key = `${merchant}::${category}`;\n \n if (!existingKeys.has(key)) {\n patternsToAdd.push({\n merchant_keyword: merchant,\n description_keyword: '',\n account_category: category,\n confidence_score: pattern.json.confidence_score,\n last_used_date: new Date().toISOString().split('T')[0],\n usage_count: pattern.json.occurrence_count,\n auto_learned: true,\n notes: '\u81ea\u52d5\u5b66\u7fd2'\n });\n }\n}\n\nreturn patternsToAdd.map(p => ({ json: p }));"
},
"id": "filter-new-patterns-node",
"name": "\u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u30d5\u30a3\u30eb\u30bf",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1450,
300
],
"notes": "\u65e2\u5b58\u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9\u306b\u5b58\u5728\u3057\u306a\u3044\u30d1\u30bf\u30fc\u30f3\u306e\u307f\u62bd\u51fa"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "condition-has-patterns",
"leftValue": "={{ $json }}",
"rightValue": "",
"operator": {
"type": "object",
"operation": "notEmpty",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "if-has-new-patterns-node",
"name": "IF \u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u3042\u308a",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
1650,
300
],
"notes": "\u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306e\u307f\u8ffd\u52a0"
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "={{ $('Loop Over Clients').item.json.sheet_id }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "\u52d8\u5b9a\u79d1\u76ee\u30de\u30b9\u30bf\u30fc",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"schema": [
{
"id": "merchant_keyword",
"displayName": "merchant_keyword",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "description_keyword",
"displayName": "description_keyword",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "account_category",
"displayName": "account_category",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "confidence_score",
"displayName": "confidence_score",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "last_used_date",
"displayName": "last_used_date",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "usage_count",
"displayName": "usage_count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "auto_learned",
"displayName": "auto_learned",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "notes",
"displayName": "notes",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"value": {
"merchant_keyword": "={{ $json.merchant_keyword }}",
"description_keyword": "={{ $json.description_keyword }}",
"account_category": "={{ $json.account_category }}",
"confidence_score": "={{ $json.confidence_score }}",
"last_used_date": "={{ $json.last_used_date }}",
"usage_count": "={{ $json.usage_count }}",
"auto_learned": "={{ $json.auto_learned }}",
"notes": "={{ $json.notes }}"
},
"matchingColumns": []
},
"options": {}
},
"id": "append-new-patterns-node",
"name": "\u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u8ffd\u52a0",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.4,
"position": [
1850,
200
],
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"notes": "\u52d8\u5b9a\u79d1\u76ee\u30de\u30b9\u30bf\u30fc\u306b\u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u3092\u8ffd\u52a0"
},
{
"parameters": {},
"id": "no-op-node",
"name": "No Operation",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1850,
400
],
"notes": "\u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u306a\u3057\u306e\u5834\u5408\u306f\u4f55\u3082\u3057\u306a\u3044"
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "\u5168\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u53d6\u5f97",
"type": "main",
"index": 0
}
]
]
},
"\u5168\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u53d6\u5f97": {
"main": [
[
{
"node": "Loop Over Clients",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Clients": {
"main": [
[
{
"node": "\u4ed5\u8a33\u53f0\u5e33\u53d6\u5f97\uff08\u904e\u53bb30\u65e5\uff09",
"type": "main",
"index": 0
}
]
]
},
"\u4ed5\u8a33\u53f0\u5e33\u53d6\u5f97\uff08\u904e\u53bb30\u65e5\uff09": {
"main": [
[
{
"node": "\u30d1\u30bf\u30fc\u30f3\u5206\u6790",
"type": "main",
"index": 0
}
]
]
},
"\u30d1\u30bf\u30fc\u30f3\u5206\u6790": {
"main": [
[
{
"node": "\u52d8\u5b9a\u79d1\u76ee\u30de\u30b9\u30bf\u30fc\u53d6\u5f97",
"type": "main",
"index": 0
}
]
]
},
"\u52d8\u5b9a\u79d1\u76ee\u30de\u30b9\u30bf\u30fc\u53d6\u5f97": {
"main": [
[
{
"node": "\u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u30d5\u30a3\u30eb\u30bf",
"type": "main",
"index": 0
}
]
]
},
"\u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u30d5\u30a3\u30eb\u30bf": {
"main": [
[
{
"node": "IF \u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u3042\u308a",
"type": "main",
"index": 0
}
]
]
},
"IF \u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u3042\u308a": {
"main": [
[
{
"node": "\u65b0\u898f\u30d1\u30bf\u30fc\u30f3\u8ffd\u52a0",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1",
"saveDataErrorExecution": "all",
"saveDataSuccessExecution": "all",
"saveExecutionProgress": true,
"saveManualExecutions": true
},
"versionId": "1",
"id": "knowledge-base-learning-batch",
"tags": [
{
"name": "\u7d4c\u7406\u81ea\u52d5\u5316",
"id": "accounting-automation"
},
{
"name": "\u5b66\u7fd2\u30d0\u30c3\u30c1",
"id": "learning-batch"
}
]
}
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
勘定科目ナレッジベース学習バッチ. Uses googleSheets. Scheduled trigger; 10 nodes.
Source: https://github.com/AI-LandBase/landbase_ai_suite/blob/3a979efd26ab08c7e2a616e916869be44f98b7ae/n8n/workflows/knowledge-base-learning-batch.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.
This workflow automates video distribution to 9 social platforms simultaneously using Blotato's API. It includes both a scheduled publisher (checks Google Sheets for videos marked "Ready") and a subwo
YogiAI. Uses googleSheets, googleSheetsTool, httpRequest, stopAndError. Scheduled trigger; 61 nodes.
This workflow monitors Google Calendar for events indicating that a customer will visit the company today or the next day, retrieves the required details, and sends reminder notifications to the relev
Useful if a team is working within a single instance and you want to be notified of what workflows have changed since you last visited them. Another use-case might be monitoring your managed instances
ofn hook v0.24.0 beta. Uses start, httpRequest, functionItem, itemLists. Scheduled trigger; 42 nodes.