fix(10.2-03): fix correlationId placement in 19 Prepare Input nodes

Plan 02 executor placed correlationId outside the json object in all
Prepare Input code nodes, creating "Unexpected token '}'" syntax errors.
Moved correlationId inside the json return object in all 19 affected nodes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lucas Berger
2026-02-08 13:16:01 -05:00
parent 69eb4e0b9d
commit e331d1618e
+19 -19
View File
@@ -3203,7 +3203,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for container-update sub-workflow (text mode)\nconst data = $input.item.json;\nconst containerId = data.containerId;\nconst containerName = data.containerName;\nconst chatId = data.chatId;\n\nreturn {\n json: {\n containerId,\n containerName,\n chatId,\n messageId: 0, // No message to edit in text mode\n responseMode: 'text'\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for container-update sub-workflow (text mode)\nconst data = $input.item.json;\nconst containerId = data.containerId;\nconst containerName = data.containerName;\nconst chatId = data.chatId;\n\nreturn {\n json: {\n containerId,\n containerName,\n chatId,\n messageId: 0, // No message to edit in text mode\n responseMode: 'text',\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-text-update", "id": "code-prepare-text-update",
"name": "Prepare Text Update Input", "name": "Prepare Text Update Input",
@@ -3263,7 +3263,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for container-update sub-workflow (inline mode)\nconst data = $('Parse Callback Data').item.json;\nconst containerName = data.containerName;\nconst chatId = data.chatId;\nconst messageId = data.messageId;\n\nreturn {\n json: {\n containerId: '', // Will be resolved by sub-workflow from name\n containerName,\n chatId,\n messageId,\n responseMode: 'inline'\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for container-update sub-workflow (inline mode)\nconst data = $('Parse Callback Data').item.json;\nconst containerName = data.containerName;\nconst chatId = data.chatId;\nconst messageId = data.messageId;\n\nreturn {\n json: {\n containerId: '', // Will be resolved by sub-workflow from name\n containerName,\n chatId,\n messageId,\n responseMode: 'inline',\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-callback-update", "id": "code-prepare-callback-update",
"name": "Prepare Callback Update Input", "name": "Prepare Callback Update Input",
@@ -3344,7 +3344,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for container actions sub-workflow\nconst data = $input.item.json;\nconst containerId = data.containerId;\nconst containerName = data.containerName;\n// Get the actual requested action (stop/start/restart) from Parse Action Command\nconst actionType = $('Parse Action Command').item.json.action || 'restart';\nconst chatId = data.chatId;\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n action: actionType,\n chatId: chatId,\n messageId: 0, // Text mode doesn't have a message to edit\n responseMode: 'text'\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for container actions sub-workflow\nconst data = $input.item.json;\nconst containerId = data.containerId;\nconst containerName = data.containerName;\n// Get the actual requested action (stop/start/restart) from Parse Action Command\nconst actionType = $('Parse Action Command').item.json.action || 'restart';\nconst chatId = data.chatId;\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n action: actionType,\n chatId: chatId,\n messageId: 0, // Text mode doesn't have a message to edit\n responseMode: 'text',\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-text-action-rr53pd94", "id": "code-prepare-text-action-rr53pd94",
"name": "Prepare Text Action Input", "name": "Prepare Text Action Input",
@@ -3392,7 +3392,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for container actions sub-workflow from inline keyboard\n// Container lookup already done by Get Container For Action\nconst containers = $input.all().map(item => item.json);\nconst prevData = $('Prepare Immediate Action').item.json;\nconst containerName = prevData.containerName.toLowerCase();\nconst action = prevData.action;\nconst chatId = prevData.chatId;\nconst messageId = prevData.messageId;\n\n// Function to normalize container names\nfunction normalizeName(name) {\n return name\n .replace(/^\\//, '')\n .replace(/^(linuxserver[-_]|binhex[-_])/i, '')\n .toLowerCase();\n}\n\n// Find the matching container\nconst container = containers.find(c => normalizeName(c.Names[0]) === containerName);\n\nif (!container) {\n return {\n json: {\n error: true,\n chatId,\n messageId,\n text: 'Container not found'\n }\n };\n}\n\nreturn {\n json: {\n containerId: container.Id,\n containerName: normalizeName(container.Names[0]),\n action: action,\n chatId: chatId,\n messageId: messageId,\n responseMode: 'inline'\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for container actions sub-workflow from inline keyboard\n// Container lookup already done by Get Container For Action\nconst containers = $input.all().map(item => item.json);\nconst prevData = $('Prepare Immediate Action').item.json;\nconst containerName = prevData.containerName.toLowerCase();\nconst action = prevData.action;\nconst chatId = prevData.chatId;\nconst messageId = prevData.messageId;\n\n// Function to normalize container names\nfunction normalizeName(name) {\n return name\n .replace(/^\\//, '')\n .replace(/^(linuxserver[-_]|binhex[-_])/i, '')\n .toLowerCase();\n}\n\n// Find the matching container\nconst container = containers.find(c => normalizeName(c.Names[0]) === containerName);\n\nif (!container) {\n return {\n json: {\n error: true,\n chatId,\n messageId,\n text: 'Container not found'\n }\n };\n}\n\nreturn {\n json: {\n containerId: container.Id,\n containerName: normalizeName(container.Names[0]),\n action: action,\n chatId: chatId,\n messageId: messageId,\n responseMode: 'inline',\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-inline-action-tyjn5pb1", "id": "code-prepare-inline-action-tyjn5pb1",
"name": "Prepare Inline Action Input", "name": "Prepare Inline Action Input",
@@ -3440,7 +3440,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for Container Update sub-workflow\nconst data = $('Build Progress Message').item.json;\nconst container = data.container;\n\n// Extract container info\nconst containerId = container.id || container.Id || '';\nconst containerName = container.name || container.Name || '';\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n chatId: data.chatId,\n messageId: data.progressMessageId || 0,\n responseMode: \"inline\"\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for Container Update sub-workflow\nconst data = $('Build Progress Message').item.json;\nconst container = data.container;\n\n// Extract container info\nconst containerId = container.id || container.Id || '';\nconst containerName = container.name || container.Name || '';\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n chatId: data.chatId,\n messageId: data.progressMessageId || 0,\n responseMode: \"inline\",\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "caeae5d6-f9ec-4aa3-83d3-198b6b55be65", "id": "caeae5d6-f9ec-4aa3-83d3-198b6b55be65",
"name": "Prepare Batch Update Input", "name": "Prepare Batch Update Input",
@@ -3484,7 +3484,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for Container Actions sub-workflow\nconst data = $('Build Progress Message').item.json;\nconst container = data.container;\nconst action = data.action;\n\n// Extract container info\nconst containerId = container.id || container.Id || '';\nconst containerName = container.name || container.Name || '';\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n action: action,\n chatId: data.chatId,\n messageId: data.progressMessageId || 0,\n responseMode: \"inline\"\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for Container Actions sub-workflow\nconst data = $('Build Progress Message').item.json;\nconst container = data.container;\nconst action = data.action;\n\n// Extract container info\nconst containerId = container.id || container.Id || '';\nconst containerName = container.name || container.Name || '';\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n action: action,\n chatId: data.chatId,\n messageId: data.progressMessageId || 0,\n responseMode: \"inline\",\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "958f19ef-249b-42ca-8a29-ecb91548f1dd", "id": "958f19ef-249b-42ca-8a29-ecb91548f1dd",
"name": "Prepare Batch Action Input", "name": "Prepare Batch Action Input",
@@ -3528,7 +3528,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for Container Logs sub-workflow (text command)\nconst data = $json;\n\n// Check if there's an error from Parse Logs Command\nif (data.error) {\n return {\n json: {\n error: true,\n chatId: data.chatId,\n text: data.text\n }\n };\n}\n\nreturn {\n json: {\n containerName: data.containerQuery,\n lineCount: data.lines,\n chatId: data.chatId,\n messageId: data.messageId || 0,\n responseMode: \"text\"\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for Container Logs sub-workflow (text command)\nconst data = $json;\n\n// Check if there's an error from Parse Logs Command\nif (data.error) {\n return {\n json: {\n error: true,\n chatId: data.chatId,\n text: data.text\n }\n };\n}\n\nreturn {\n json: {\n containerName: data.containerQuery,\n lineCount: data.lines,\n chatId: data.chatId,\n messageId: data.messageId || 0,\n responseMode: \"text\",\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "a895bb2d-1f61-4466-b475-b32ec5f0e83a", "id": "a895bb2d-1f61-4466-b475-b32ec5f0e83a",
"name": "Prepare Text Logs Input", "name": "Prepare Text Logs Input",
@@ -3559,7 +3559,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for Container Logs sub-workflow (inline action)\nconst data = $('Parse Callback Data').item.json;\n\nreturn {\n json: {\n containerName: data.containerName,\n lineCount: 30,\n chatId: data.chatId,\n messageId: data.messageId,\n responseMode: \"inline\"\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for Container Logs sub-workflow (inline action)\nconst data = $('Parse Callback Data').item.json;\n\nreturn {\n json: {\n containerName: data.containerName,\n lineCount: 30,\n chatId: data.chatId,\n messageId: data.messageId,\n responseMode: \"inline\",\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "16b24086-5b5d-4980-82c7-4fb37b4e8f6c", "id": "16b24086-5b5d-4980-82c7-4fb37b4e8f6c",
"name": "Prepare Inline Logs Input", "name": "Prepare Inline Logs Input",
@@ -3603,7 +3603,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for Batch UI sub-workflow\nconst data = $json;\n\n// Determine action from callback data\nlet action = 'mode'; // default\nconst callbackData = data.callbackData || '';\n\nif (data.isBatchMode) action = 'mode';\nelse if (data.isBatchToggle) action = 'toggle';\nelse if (data.isBatchNav) action = 'nav';\nelse if (data.isBatchExec) action = 'exec';\nelse if (data.isBatchClear) action = 'clear';\nelse if (data.isBatchCancel) action = 'cancel';\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n queryId: data.queryId,\n callbackData: callbackData,\n action: action,\n batchAction: data.action || 'start',\n batchPage: data.batchPage || 0,\n selectedCsv: data.selectedCsv || '',\n toggleName: data.toggleName || ''\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for Batch UI sub-workflow\nconst data = $json;\n\n// Determine action from callback data\nlet action = 'mode'; // default\nconst callbackData = data.callbackData || '';\n\nif (data.isBatchMode) action = 'mode';\nelse if (data.isBatchToggle) action = 'toggle';\nelse if (data.isBatchNav) action = 'nav';\nelse if (data.isBatchExec) action = 'exec';\nelse if (data.isBatchClear) action = 'clear';\nelse if (data.isBatchCancel) action = 'cancel';\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n queryId: data.queryId,\n callbackData: callbackData,\n action: action,\n batchAction: data.action || 'start',\n batchPage: data.batchPage || 0,\n selectedCsv: data.selectedCsv || '',\n toggleName: data.toggleName || '',\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-batch-ui-input", "id": "code-prepare-batch-ui-input",
"name": "Prepare Batch UI Input", "name": "Prepare Batch UI Input",
@@ -3899,7 +3899,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for Container Status sub-workflow from /status command\nconst message = $('Keyword Router').item.json.message;\nconst chatId = message.chat.id;\nconst text = (message.text || '').toLowerCase().trim();\n\n// Check if user specified a container name (e.g., \"/status plex\")\nlet searchTerm = null;\nconst parts = text.split(/\\s+/);\nif (parts.length > 1) {\n searchTerm = parts.filter(p => p !== 'status' && p !== '/status').join(' ');\n}\n\nreturn {\n json: {\n chatId: chatId,\n messageId: 0,\n action: 'list',\n containerId: null,\n containerName: null,\n page: 0,\n queryId: null,\n searchTerm: searchTerm\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for Container Status sub-workflow from /status command\nconst message = $('Keyword Router').item.json.message;\nconst chatId = message.chat.id;\nconst text = (message.text || '').toLowerCase().trim();\n\n// Check if user specified a container name (e.g., \"/status plex\")\nlet searchTerm = null;\nconst parts = text.split(/\\s+/);\nif (parts.length > 1) {\n searchTerm = parts.filter(p => p !== 'status' && p !== '/status').join(' ');\n}\n\nreturn {\n json: {\n chatId: chatId,\n messageId: 0,\n action: 'list',\n containerId: null,\n containerName: null,\n page: 0,\n queryId: null,\n searchTerm: searchTerm,\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-status-input", "id": "code-prepare-status-input",
"name": "Prepare Status Input", "name": "Prepare Status Input",
@@ -4022,7 +4022,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for Container Status sub-workflow from select callback\nconst data = $(\"Parse Callback Data\").item.json;\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'status',\n containerId: null,\n containerName: data.containerName,\n page: 0,\n queryId: data.queryId,\n searchTerm: null\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for Container Status sub-workflow from select callback\nconst data = $(\"Parse Callback Data\").item.json;\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'status',\n containerId: null,\n containerName: data.containerName,\n page: 0,\n queryId: data.queryId,\n searchTerm: null,\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-select-input", "id": "code-prepare-select-input",
"name": "Prepare Select Status Input", "name": "Prepare Select Status Input",
@@ -4057,7 +4057,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for Container Status sub-workflow from list pagination callback\nconst data = $(\"Parse Callback Data\").item.json;\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'paginate',\n containerId: null,\n containerName: null,\n page: data.page || 0,\n queryId: data.queryId,\n searchTerm: null\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for Container Status sub-workflow from list pagination callback\nconst data = $(\"Parse Callback Data\").item.json;\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'paginate',\n containerId: null,\n containerName: null,\n page: data.page || 0,\n queryId: data.queryId,\n searchTerm: null,\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-paginate-input", "id": "code-prepare-paginate-input",
"name": "Prepare Paginate Input", "name": "Prepare Paginate Input",
@@ -4092,7 +4092,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for Container Status sub-workflow from batch cancel return\nconst data = $input.item.json;\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'paginate',\n containerId: null,\n containerName: null,\n page: data.page || 0,\n queryId: data.queryId || null,\n searchTerm: null\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for Container Status sub-workflow from batch cancel return\nconst data = $input.item.json;\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'paginate',\n containerId: null,\n containerName: null,\n page: data.page || 0,\n queryId: data.queryId || null,\n searchTerm: null,\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-batch-cancel-input", "id": "code-prepare-batch-cancel-input",
"name": "Prepare Batch Cancel Return Input", "name": "Prepare Batch Cancel Return Input",
@@ -4127,7 +4127,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for confirmation sub-workflow\nconst data = $('Parse Callback Data').item.json;\n\n// Determine action based on callback type\nlet action = 'confirm'; // Default\nif (data.isCancelConfirm) {\n action = 'cancel';\n} else if (data.isConfirm && data.expired) {\n action = 'expired';\n} else if (data.isConfirm) {\n action = 'confirm';\n}\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: action,\n containerId: data.containerId || '',\n containerName: data.containerName,\n confirmAction: data.confirmAction || '',\n confirmationToken: data.timestamp || '',\n expired: data.expired || false,\n responseMode: 'inline'\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for confirmation sub-workflow\nconst data = $('Parse Callback Data').item.json;\n\n// Determine action based on callback type\nlet action = 'confirm'; // Default\nif (data.isCancelConfirm) {\n action = 'cancel';\n} else if (data.isConfirm && data.expired) {\n action = 'expired';\n} else if (data.isConfirm) {\n action = 'confirm';\n}\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: action,\n containerId: data.containerId || '',\n containerName: data.containerName,\n confirmAction: data.confirmAction || '',\n confirmationToken: data.timestamp || '',\n expired: data.expired || false,\n responseMode: 'inline',\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-confirm-input", "id": "code-prepare-confirm-input",
"name": "Prepare Confirm Input", "name": "Prepare Confirm Input",
@@ -4140,7 +4140,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for showing stop confirmation dialog\nconst data = $('Parse Callback Data').item.json;\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'show_stop',\n containerId: data.containerId || '',\n containerName: data.containerName,\n responseMode: 'inline'\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for showing stop confirmation dialog\nconst data = $('Parse Callback Data').item.json;\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'show_stop',\n containerId: data.containerId || '',\n containerName: data.containerName,\n responseMode: 'inline',\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-show-stop", "id": "code-prepare-show-stop",
"name": "Prepare Show Stop Input", "name": "Prepare Show Stop Input",
@@ -4153,7 +4153,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for showing update confirmation dialog\nconst data = $('Parse Callback Data').item.json;\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'show_update',\n containerId: data.containerId || '',\n containerName: data.containerName,\n responseMode: 'inline'\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for showing update confirmation dialog\nconst data = $('Parse Callback Data').item.json;\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n action: 'show_update',\n containerId: data.containerId || '',\n containerName: data.containerName,\n responseMode: 'inline',\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-show-update", "id": "code-prepare-show-update",
"name": "Prepare Show Update Input", "name": "Prepare Show Update Input",
@@ -4389,7 +4389,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for matching sub-workflow (action commands)\nconst dockerOutput = $input.item.json.stdout;\nconst actionData = $('Parse Action Command').item.json;\nconst action = actionData.action || 'restart';\nconst containerQuery = actionData.containerQuery || '';\nconst chatId = actionData.chatId;\n\nreturn {\n json: {\n action: \"match_action\",\n containerList: dockerOutput,\n searchTerm: containerQuery,\n selectedContainers: \"\",\n chatId: chatId,\n messageId: 0\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for matching sub-workflow (action commands)\nconst dockerOutput = $input.item.json.stdout;\nconst actionData = $('Parse Action Command').item.json;\nconst action = actionData.action || 'restart';\nconst containerQuery = actionData.containerQuery || '';\nconst chatId = actionData.chatId;\n\nreturn {\n json: {\n action: \"match_action\",\n containerList: dockerOutput,\n searchTerm: containerQuery,\n selectedContainers: \"\",\n chatId: chatId,\n messageId: 0,\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-action-match-input", "id": "code-prepare-action-match-input",
"name": "Prepare Action Match Input", "name": "Prepare Action Match Input",
@@ -4558,7 +4558,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for matching sub-workflow (update commands)\nconst dockerOutput = $input.item.json.stdout;\nconst updateData = $('Parse Update Command').item.json;\nconst containerQuery = updateData.containerQuery;\nconst chatId = updateData.chatId;\n\nreturn {\n json: {\n action: \"match_update\",\n containerList: dockerOutput,\n searchTerm: containerQuery,\n selectedContainers: \"\",\n chatId: chatId,\n messageId: 0\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for matching sub-workflow (update commands)\nconst dockerOutput = $input.item.json.stdout;\nconst updateData = $('Parse Update Command').item.json;\nconst containerQuery = updateData.containerQuery;\nconst chatId = updateData.chatId;\n\nreturn {\n json: {\n action: \"match_update\",\n containerList: dockerOutput,\n searchTerm: containerQuery,\n selectedContainers: \"\",\n chatId: chatId,\n messageId: 0,\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-update-match-input", "id": "code-prepare-update-match-input",
"name": "Prepare Update Match Input", "name": "Prepare Update Match Input",
@@ -4704,7 +4704,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for matching sub-workflow (batch commands)\nconst dockerOutput = $input.item.json.stdout;\nconst batchData = $('Detect Batch Command').item.json;\nconst containerNames = batchData.containerNames;\nconst action = batchData.action;\nconst chatId = batchData.chatId;\nconst messageId = batchData.messageId;\n\n// Convert containerNames array to CSV for sub-workflow input\nconst selectedContainers = Array.isArray(containerNames) ? containerNames.join(',') : containerNames;\n\nreturn {\n json: {\n action: \"match_batch\",\n containerList: dockerOutput,\n searchTerm: \"\",\n selectedContainers: selectedContainers,\n chatId: chatId,\n messageId: messageId\n },\n correlationId: $input.item.json.correlationId || ''\n }\n};" "jsCode": "// Prepare input for matching sub-workflow (batch commands)\nconst dockerOutput = $input.item.json.stdout;\nconst batchData = $('Detect Batch Command').item.json;\nconst containerNames = batchData.containerNames;\nconst action = batchData.action;\nconst chatId = batchData.chatId;\nconst messageId = batchData.messageId;\n\n// Convert containerNames array to CSV for sub-workflow input\nconst selectedContainers = Array.isArray(containerNames) ? containerNames.join(',') : containerNames;\n\nreturn {\n json: {\n action: \"match_batch\",\n containerList: dockerOutput,\n searchTerm: \"\",\n selectedContainers: selectedContainers,\n chatId: chatId,\n messageId: messageId,\n correlationId: $input.item.json.correlationId || ''\n }\n};"
}, },
"id": "code-prepare-batch-match-input", "id": "code-prepare-batch-match-input",
"name": "Prepare Batch Match Input", "name": "Prepare Batch Match Input",