From 7a2b4a222ca18d6797c057803e5b14dbbc04bd6e Mon Sep 17 00:00:00 2001 From: Git Admin Date: Sun, 30 Nov 2025 08:50:56 +0000 Subject: [PATCH] Replace SSH node with Execute Command node - Removed SSH dependency (was failing with 'Not connected to server') - Now uses Execute Command node to check file directly on host - Updated Final Verification to parse executeCommand output - Command checks for file and displays content or 'File not found' --- openhands-workflow-with-verification.json | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/openhands-workflow-with-verification.json b/openhands-workflow-with-verification.json index a704ef4..9a48659 100644 --- a/openhands-workflow-with-verification.json +++ b/openhands-workflow-with-verification.json @@ -193,26 +193,17 @@ }, { "parameters": { - "authentication": "genericCredentialType", - "genericAuthType": "sshKey", - "command": "ls -la /home/bam/workspace/hello.txt 2>&1 && cat /home/bam/workspace/hello.txt", - "cwd": "/home/bam" + "command": "=ls -la /home/bam/workspace/hello.txt 2>&1 && echo '---FILE CONTENT---' && cat /home/bam/workspace/hello.txt 2>&1 || echo 'File not found'" }, "id": "verify-file", "name": "8. Verify File Created", - "type": "n8n-nodes-base.ssh", + "type": "n8n-nodes-base.executeCommand", "typeVersion": 1, - "position": [2220, 420], - "credentials": { - "sshKey": { - "id": "1", - "name": "ai-dev-localhost" - } - } + "position": [2220, 420] }, { "parameters": { - "jsCode": "// Parse SSH output to verify file\nconst sshOutput = $input.item.json.stdout || '';\nconst analysisData = $('7. Analyze Results').item.json;\n\n// Check if file exists and has content\nconst fileExists = sshOutput.includes('hello.txt');\nconst hasContent = sshOutput.includes('Hello from n8n');\n\nreturn {\n conversation_id: analysisData.conversation_id,\n status: analysisData.status,\n total_events: analysisData.total_events,\n file_verified: fileExists,\n content_correct: hasContent,\n file_output: sshOutput,\n overall_success: fileExists && hasContent,\n message: fileExists && hasContent ? \n '✅ SUCCESS: File created and verified!' : \n '❌ FAILED: File not found or incorrect content'\n};" + "jsCode": "// Parse command output to verify file\nconst commandOutput = $input.item.json.stdout || $input.item.json.stderr || JSON.stringify($input.item.json);\nconst analysisData = $('7. Analyze Results').item.json;\n\n// Check if file exists and has content\nconst fileExists = commandOutput.includes('hello.txt') && !commandOutput.includes('File not found');\nconst hasContent = commandOutput.includes('Hello from n8n');\n\nreturn {\n conversation_id: analysisData.conversation_id,\n status: analysisData.status,\n total_events: analysisData.total_events,\n file_verified: fileExists,\n content_correct: hasContent,\n file_output: commandOutput,\n overall_success: fileExists && hasContent,\n message: fileExists && hasContent ? \n '✅ SUCCESS: File created and verified!' : \n '❌ FAILED: File not found or incorrect content'\n};" }, "id": "final-verification", "name": "9. Final Verification",