n8n
The Truslay community node puts the firewall in front of any workflow
step. Drag Truslay → Evaluate Action → Check Security between two nodes and
the action only continues when Truslay answers ALLOW.
[ Webhook ] ──▶ [ Truslay · Check Security ] ──▶ [ HTTP Request ]
POST /order intent: checkout runs only on ALLOW
shield: e-commerce
on block: Stop Workflow
Install the node
From the n8n UI: Settings → Community Nodes → Install, enter
n8n-nodes-truslay and accept the warning. Self-hosted instances must enable
community packages (N8N_COMMUNITY_PACKAGES_ENABLED=true) and restart n8n.
Self-hosted via npm:
mkdir -p ~/.n8n/custom && cd ~/.n8n/custom
npm init -y
npm install n8n-nodes-truslay
export N8N_CUSTOM_EXTENSIONS=/home/node/.n8n/custom
The node is implemented in the SDK repository and is not published to npm yet.
Until it is, install it from integrations/n8n in
Truslay-SDK with npm run build
and link the folder into your n8n custom extensions directory.
Credentials
Create a Truslay API credential:
| Field | Meaning |
|---|---|
| Environment | Sandbox decides locally with no network; Live enforces through the firewall. |
| API Key | Required in live, ignored in sandbox. |
| Firewall URL | Base URL of your firewall, required in live only. |
Sandbox with a dummy key
Sandbox never opens a connection, so you can build and test a workflow before you have a firewall. Use a clearly fake key so nobody mistakes it for a real credential:
Environment: Sandbox
API Key: trl_sandbox_dummy_key
Firewall URL: (empty)
The dummy key is never sent anywhere: in sandbox the SDK decides locally and
returns verdict: "ALLOW" with reason: "sandbox_mode". Switch the credential
to Live, with a real key and your firewall URL, to enforce.
Node settings
| Field | Values |
|---|---|
| Resource | Evaluate Action |
| Operation | Check Security |
| Intent | webhook_incoming, scraping_request, database_write, checkout, agent_navigation |
| Shield | e-commerce, finance, crm, automation, none |
| On Block Action | Stop Workflow, Output Error Item, Continue with Warning |
The incoming item's JSON is sent as the action payload, so the policy sees
the same data the next node would act on.
Verdict behaviour
| Verdict | Stop Workflow | Output Error Item | Continue with Warning |
|---|---|---|---|
ALLOW | item continues | item continues | item continues |
BLOCK | node throws, run stops | item emitted with error | item emitted with truslay_warning |
Every outgoing item carries the audit fields, whatever the verdict:
truslay_verdict, truslay_reason, truslay_environment,
truslay_shield, truslay_latency_ms and truslay_audit_id.
Example: Webhook → Truslay → HTTP Request
- Add a Webhook node (
POST, pathorder) and send{"intent":"checkout","cart_total":120}. - Add the Truslay node: intent
Checkout, shieldE-Commerce, on blockStop Workflow, credential inSandbox. - Add an HTTP Request node that posts
{{ $json }}to your order API. - Execute: the item arrives with
truslay_verdict: "ALLOW"andtruslay_reason: "sandbox_mode". - Switch to
Livewith your firewall: a denied checkout now stops at Truslay and the HTTP Request never fires.
If the firewall cannot be reached or returns an invalid decision, the SDK
returns BLOCK with reason firewall_unavailable. The node treats it like any
other block; a broken endpoint never lets an action through.
REVIEW is handled as a block: the SDK has no approval channel, so an approval
verdict cannot continue the run.