mvp-factory-openhands/openhands-sdk-n8n-workflow-...

152 lines
3.8 KiB
JSON

{
"meta": {
"instanceId": "openhands-sdk-n8n-working"
},
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "openhands-sdk-working",
"responseMode": "onReceived"
},
"id": "webhook-trigger-working",
"name": "Webhook Trigger",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [240, 300],
"webhookId": "openhands-sdk-working-webhook"
},
{
"parameters": {
"command": "cd /tmp/software-agent-sdk && source .venv/bin/activate && source /home/bam/openhands/.env && python /home/bam/openhands-sdk-wrapper-fixed.py \"Build and test project {{ $json.repository.full_name }} - Commit: {{ $json.commits[0].message }}\"",
"sessionId": "sdk-session-working"
},
"id": "sdk-execute-working",
"name": "Execute OpenHands SDK (FIXED)",
"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/sdk-test-*.txt /home/bam/sdk-wrapper-test*.txt 2>/dev/null | tail -10 && echo \"---\" && echo \"Files created by OpenHands SDK:\"",
"sessionId": "sdk-session-working"
},
"id": "verify-files-working",
"name": "Verify Results",
"type": "n8n-nodes-base.ssh",
"typeVersion": 2,
"position": [680, 300],
"credentials": {
"sshPassword": {
"id": "ai-dev-localhost",
"name": "ai-dev-localhost"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "openhands-sdk-working-complete",
"responseMode": "responseNode"
},
"id": "webhook-complete",
"name": "Webhook Complete",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [460, 480],
"webhookId": "openhands-sdk-working-complete-webhook"
},
{
"parameters": {
"respondWith": "json",
"responseBody": {
"status": "success",
"message": "OpenHands SDK task completed successfully",
"timestamp": "{{ $now }}",
"repository": "{{ $json.repository.full_name }}",
"commit": "{{ $json.commits[0].message }}",
"workflow": "openhands-sdk-working",
"method": "SDK (Docker-free, Fixed)",
"note": "Files are properly persisted to host filesystem"
},
"options": {}
},
"id": "webhook-response-working",
"name": "Send Response",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [900, 480]
}
],
"connections": {
"Webhook Trigger": {
"main": [
[
{
"node": "Execute OpenHands SDK (FIXED)",
"type": "main",
"index": 0
}
]
]
},
"Execute OpenHands SDK (FIXED)": {
"main": [
[
{
"node": "Verify Results",
"type": "main",
"index": 0
}
]
]
},
"Verify Results": {
"main": [
[
{
"node": "Webhook Complete",
"type": "main",
"index": 0
}
]
]
},
"Webhook Complete": {
"main": [
[
{
"node": "Send Response",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [
"openhands",
"sdk",
"working"
],
"triggerCount": 2,
"updatedAt": "2025-12-01T00:30:00.000Z",
"versionId": "3",
"active": false,
"meta": {
"templateCredsSetupCompleted": false
}
}