Decisions in n8n
The Ellaworx Decision node runs a decision from an n8n workflow. It calls the same gateway as Calling the gateway, so a run uses the environment's provider fallback and is a row in Logs, Decisions like any other.
Install the node
In a self-hosted n8n, open Settings, Community Nodes, Install and enter n8n-nodes-ellaworx. n8n Cloud runs only verified community nodes, and this one is not verified yet.
Connect your organization
Create an Ellaworx API credential in n8n:
- API Key: an organization API key from Settings, Account, API Keys. It acts as the person who created it, so that person needs access to the environments your workflows run decisions in. A key issued by
agx logincannot run decisions, and the credential test tells you so. - Base URL: leave it as
https://platform.ellaworx.ai.
There is no organization to enter: a key belongs to one organization, and the node reads it from the key.
Run a decision
- Add Ellaworx Decision after the node that brings in your data.
- Choose the Environment and the Schema. Both lists come from your organization.
- Set the Version:
1.2.0, or1for the newest 1.x. Leave it empty only while you are trying things out, since the latest changes when someone publishes. - Give a value for each input, as name and value rows or as one JSON object. Expressions work, for example
{{ $json.body }}.
Each item that comes out is the answer described in Calling the gateway: decision, probabilities, confidence, the provider and model that answered, and every attempt.
Send the unsure cases to a person
Turn on Route by Confidence and set a Confidence Threshold (0.8 by default). The node then has two outputs:
- Confident: decisions at or above the threshold. Act on these automatically.
- Needs Review: decisions below it. Connect this to a task, a message or a queue for a person.
With Continue On Fail on in the node's settings, an item that got no decision also goes to Needs Review, carrying the error, the status and, when every provider failed, what each one answered.
Options
| Option | |
|---|---|
| Provider, Model | Send the run to one of your providers only. It never falls back. Leave both empty to let the environment choose. |
| Timeout per Provider (Ms) | The time each provider gets, up to 50000. A whole run is held to 50 seconds. |
| Metadata | Up to 20 string entries kept in the decision log, never sent to a provider. Keep personal data out of it. |
| Tag With n8n Execution | On by default. Adds n8nWorkflowId and n8nExecutionId to the metadata, so a log row leads back to the n8n run. |
When a run fails
The node stops the workflow with the gateway's reason and what to do about it. 429, 500 and 502 can succeed later, so turning on Retry On Fail in the node's settings is worthwhile. Any other failure, such as a missing input or an unknown schema, fails the same way until the workflow or your configuration changes.