mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
- Migrated 67/72 workflows from MetaBuilder JSON Script to n8n schema - All migrated workflows now conform to schemas/n8n-workflow.schema.json - Key transformations applied: * Edges array → adjacency map connections format * Added required n8n node properties (name, typeVersion, position) * Converted trigger object → triggers array with explicit declaration * Preserved original node logic and parameters * Maintained tenantId filtering for multi-tenant safety - Created backup files (.backup.json/.backup.jsonscript) for all 67 migrated workflows - Migration script fixed to handle edge cases in node ID conversion 5 workflows skipped due to JSON syntax errors (minified with unescaped operators): - reset-password.jsonscript - list-users.jsonscript - delete-user.jsonscript - list-scripts.jsonscript - export-script.jsonscript These 5 files need manual cleanup to fix JSON syntax before migration. Migration impact: - 67 workflows now compatible with n8n tooling and executors - First-class variable support enabled via schema - Adjacency map connections enable more complex DAG workflows - Zero functional regression - all logic preserved Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
254 lines
4.7 KiB
JSON
254 lines
4.7 KiB
JSON
{
|
|
"name": "Data Processing Demo",
|
|
"active": false,
|
|
"nodes": [
|
|
{
|
|
"id": "create_sample_data",
|
|
"name": "Create Sample Data",
|
|
"type": "var.set",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
0,
|
|
50
|
|
],
|
|
"parameters": {
|
|
"key": "numbers",
|
|
"value": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "filter_even",
|
|
"name": "Filter Even Numbers",
|
|
"type": "utils.filter_list",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
300,
|
|
50
|
|
],
|
|
"parameters": {
|
|
"items": "$numbers",
|
|
"mode": "lambda",
|
|
"condition": "lambda x: x % 2 == 0"
|
|
}
|
|
},
|
|
{
|
|
"id": "map_square",
|
|
"name": "Square Each Number",
|
|
"type": "utils.map_list",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
600,
|
|
50
|
|
],
|
|
"parameters": {
|
|
"items": "$filtered_numbers",
|
|
"transform": "lambda x: x * x"
|
|
}
|
|
},
|
|
{
|
|
"id": "reduce_sum",
|
|
"name": "Sum All Values",
|
|
"type": "math.add",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
900,
|
|
50
|
|
],
|
|
"parameters": {
|
|
"numbers": "$squared_numbers"
|
|
}
|
|
},
|
|
{
|
|
"id": "check_threshold",
|
|
"name": "Check If Sum > 50",
|
|
"type": "logic.gt",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1200,
|
|
50
|
|
],
|
|
"parameters": {
|
|
"a": "$sum",
|
|
"b": 50
|
|
}
|
|
},
|
|
{
|
|
"id": "branch_result",
|
|
"name": "Branch On Result",
|
|
"type": "utils.branch_condition",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1500,
|
|
50
|
|
],
|
|
"parameters": {
|
|
"condition": "$is_greater"
|
|
}
|
|
},
|
|
{
|
|
"id": "format_success",
|
|
"name": "Format Success Message",
|
|
"type": "string.format",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1800,
|
|
0
|
|
],
|
|
"parameters": {
|
|
"template": "Success! Sum is {sum}, which is greater than 50.",
|
|
"variables": {
|
|
"sum": "$sum"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "format_failure",
|
|
"name": "Format Failure Message",
|
|
"type": "string.format",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
1800,
|
|
100
|
|
],
|
|
"parameters": {
|
|
"template": "Sum is {sum}, which is not greater than 50.",
|
|
"variables": {
|
|
"sum": "$sum"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "store_result",
|
|
"name": "Store Final Result",
|
|
"type": "var.set",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
2100,
|
|
50
|
|
],
|
|
"parameters": {
|
|
"key": "final_message",
|
|
"value": "$message"
|
|
}
|
|
}
|
|
],
|
|
"connections": {
|
|
"Create Sample Data": {
|
|
"main": {
|
|
"0": [
|
|
{
|
|
"node": "Filter Even Numbers",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Filter Even Numbers": {
|
|
"main": {
|
|
"0": [
|
|
{
|
|
"node": "Square Each Number",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Square Each Number": {
|
|
"main": {
|
|
"0": [
|
|
{
|
|
"node": "Sum All Values",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Sum All Values": {
|
|
"main": {
|
|
"0": [
|
|
{
|
|
"node": "Check If Sum > 50",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Check If Sum > 50": {
|
|
"main": {
|
|
"0": [
|
|
{
|
|
"node": "Branch On Result",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Branch On Result": {
|
|
"main": {
|
|
"0": [
|
|
{
|
|
"node": "Format Success Message",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
],
|
|
"1": [
|
|
{
|
|
"node": "Format Failure Message",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Format Success Message": {
|
|
"main": {
|
|
"0": [
|
|
{
|
|
"node": "Store Final Result",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Format Failure Message": {
|
|
"main": {
|
|
"0": [
|
|
{
|
|
"node": "Store Final Result",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"triggers": [
|
|
{
|
|
"nodeId": "create_sample_data",
|
|
"kind": "manual",
|
|
"enabled": true,
|
|
"meta": {
|
|
"description": "Manually triggered Data Processing Demo workflow execution"
|
|
}
|
|
}
|
|
]
|
|
}
|