some more sdk worflows
This commit is contained in:
parent
093ede2219
commit
ded4cd061a
|
|
@ -0,0 +1,94 @@
|
|||
{
|
||||
"meta": {
|
||||
"instanceId": "openhands-sdk-simple"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "openhands-sdk-simple",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"id": "webhook-1",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [240, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"command": "cd /tmp/software-agent-sdk && source .venv/bin/activate && source /home/bam/openhands/.env && python /home/bam/openhands-sdk-wrapper-fixed.py \"{{ $json.commits[0].message }}\"",
|
||||
"sessionId": "sdk-session"
|
||||
},
|
||||
"id": "execute-sdk",
|
||||
"name": "Execute OpenHands SDK",
|
||||
"type": "n8n-nodes-base.ssh",
|
||||
"typeVersion": 2,
|
||||
"position": [460, 300],
|
||||
"credentials": {
|
||||
"sshPassword": {
|
||||
"id": "ai-dev-localhost",
|
||||
"name": "ai-dev-localhost"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": {
|
||||
"status": "success",
|
||||
"message": "OpenHands SDK executed",
|
||||
"timestamp": "{{ $now }}",
|
||||
"commit": "{{ $json.commits[0].message }}",
|
||||
"result": "Task completed - check /home/bam for created files"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "respond-1",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1,
|
||||
"position": [680, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Execute OpenHands SDK",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute OpenHands SDK": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"staticData": null,
|
||||
"tags": [
|
||||
"openhands",
|
||||
"simple"
|
||||
],
|
||||
"triggerCount": 1,
|
||||
"updatedAt": "2025-12-01T00:35:00.000Z",
|
||||
"versionId": "4",
|
||||
"active": false,
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": false
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue