n8n-example-workflow.json•2.12 kB
{
"name": "Human Design Calculator",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "human-design",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook-trigger",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [240, 300],
"webhookId": "human-design-webhook"
},
{
"parameters": {
"jsCode": "// Call Railway API for Swiss Ephemeris calculations\nconst railwayUrl = process.env.RAILWAY_API_URL || 'https://balanced-generosity-test.up.railway.app';\nconst { birthDate, birthTime, birthLocation } = $input.item.json;\n\nconst response = await fetch(`${railwayUrl}/api/human-design`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ birthDate, birthTime, birthLocation })\n});\n\nif (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n}\n\nconst result = await response.json();\nreturn { json: result.data || result };"
},
"id": "calculate-hd",
"name": "Calculate Human Design",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [460, 300]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ $json }}"
},
"id": "respond-webhook",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [680, 300]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Calculate Human Design",
"type": "main",
"index": 0
}
]
]
},
"Calculate Human Design": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [],
"triggerCount": 1,
"updatedAt": "2024-01-01T00:00:00.000Z",
"versionId": "1"
}