Skip to main content

Testing Automation Nodes

The Lumio CLI provides a local dev server for testing automation nodes without deploying.

Start the dev server​

lumio dev --automation-node

Output:

Automation Node Dev Server
Extension: My Custom Action
Node type: action

Commands:
/execute [json] - Execute the node with input data
/webhook [json] - Simulate a webhook POST payload
/poll - Trigger a poll cycle
/config [json] - Set node instance config
/install-config [j] - Set extension install config
/quit - Exit

>

The dev server automatically detects category: "automation_node" in lumio.config.json and launches the appropriate simulator.

Testing action nodes​

Use /execute to invoke the action handler with input data:

> /config {"query": "latest posts"}
Node config updated.

> /execute {"message": "Hello from automation"}
[action] Executing with input: {"message":"Hello from automation"}
[action] Result: { output: { result: "Processed: Hello from automation" }, status: "success" }
[action] Completed in 12ms

Testing trigger nodes​

Webhook triggers​

Simulate a webhook payload with /webhook:

> /webhook {"event": "order.created", "id": "12345", "customer": {"name": "Alice"}, "total_price": 59.99, "currency": "USD"}
[trigger:webhook] Received payload: {"event":"order.created",...}
[trigger:webhook] Result: { fired: true, output: { order_id: "12345", customer_name: "Alice", total: 59.99, currency: "USD" } }

Polling triggers​

Trigger a poll cycle with /poll:

> /poll
[trigger:poll] Polling...
[trigger:poll] Result: { fired: false }

> /poll
[trigger:poll] Polling...
[trigger:poll] Result: { fired: true, output: { ... } }

Testing logic nodes​

Use /execute to test branching:

> /config {"threshold": 100}
Node config updated.

> /execute {"amount": 150}
[logic] Executing with input: {"amount":150}
[logic] Branch: "above"

> /execute {"amount": 50}
[logic] Executing with input: {"amount":50}
[logic] Branch: "below"

Setting config​

Set the per-node config to test different configurations:

> /config {"threshold": 100, "comparison": "greater_than"}
Node config updated.

Set the extension install config to test install-level settings:

> /install-config {"api_key": "test-key-123"}
Install config updated.

Hot-reload​

The dev server watches server/handler.ts for changes and reloads automatically:

[hot-reload] Detected change in server/handler.ts
[hot-reload] Handler reloaded

Deploy​

Build and deploy like any other extension:

lumio deploy

After deployment, the node runs in automations whose graph contains it. The Automation Builder does not list installed extension nodes in its toolbar, so the node is added to a graph through the automation API (see Config Panel).

Next steps​