{ "meta": { "instanceId": "openhands-n8n-workflow" }, "nodes": [ { "parameters": { "httpMethod": "POST", "path": "openhands-task", "responseMode": "responseNode" }, "id": "webhook", "name": "Webhook Trigger", "type": "n8n-nodes-base.webhook", "typeVersion": 2, "position": [240, 300], "webhookId": "openhands-webhook" }, { "parameters": { "command": "cd /home/bam && echo \"{{ $json.repository.full_name }}: {{ $json.commits[0].message }}\" > /tmp/openhands-task.txt && python3 /home/bam/run-openhands.py \"$(cat /tmp/openhands-task.txt)\"", "sessionId": "openhands-session" }, "id": "ssh-execute", "name": "Execute OpenHands", "type": "n8n-nodes-base.ssh", "typeVersion": 2, "position": [460, 300], "credentials": { "sshPassword": { "id": "ai-dev-localhost", "name": "ai-dev-localhost" } } }, { "parameters": { "command": "ls -la /home/bam/*.txt 2>/dev/null | tail -15", "sessionId": "openhands-session" }, "id": "ssh-verify", "name": "Verify Results", "type": "n8n-nodes-base.ssh", "typeVersion": 2, "position": [680, 300], "credentials": { "sshPassword": { "id": "ai-dev-localhost", "name": "ai-dev-localhost" } } }, { "parameters": { "respondWith": "json", "responseBody": { "status": "success", "message": "OpenHands task executed", "timestamp": "{{ $now }}", "results": "Check logs for details" }, "options": {} }, "id": "webhook-response", "name": "Webhook Response", "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1, "position": [900, 300] } ], "connections": { "Webhook Trigger": { "main": [ [ { "node": "Execute OpenHands", "type": "main", "index": 0 } ] ] }, "Execute OpenHands": { "main": [ [ { "node": "Verify Results", "type": "main", "index": 0 } ] ] }, "Verify Results": { "main": [ [ { "node": "Webhook Response", "type": "main", "index": 0 } ] ] } }, "pinData": {}, "settings": { "executionOrder": "v1" }, "staticData": null, "tags": [], "triggerCount": 1, "updatedAt": "2025-11-30T22:10:00.000Z", "versionId": "1", "active": false, "meta": { "templateCredsSetupCompleted": false } }