Skip to main content

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
Publication status

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:

FieldMeaning
EnvironmentSandbox decides locally with no network; Live enforces through the firewall.
API KeyRequired in live, ignored in sandbox.
Firewall URLBase 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​

FieldValues
ResourceEvaluate Action
OperationCheck Security
Intentwebhook_incoming, scraping_request, database_write, checkout, agent_navigation
Shielde-commerce, finance, crm, automation, none
On Block ActionStop 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​

VerdictStop WorkflowOutput Error ItemContinue with Warning
ALLOWitem continuesitem continuesitem continues
BLOCKnode throws, run stopsitem emitted with erroritem 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​

  1. Add a Webhook node (POST, path order) and send {"intent":"checkout","cart_total":120}.
  2. Add the Truslay node: intent Checkout, shield E-Commerce, on block Stop Workflow, credential in Sandbox.
  3. Add an HTTP Request node that posts {{ $json }} to your order API.
  4. Execute: the item arrives with truslay_verdict: "ALLOW" and truslay_reason: "sandbox_mode".
  5. Switch to Live with your firewall: a denied checkout now stops at Truslay and the HTTP Request never fires.
Live is fail-closed

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.