n8n-nodes-attesta package provides the Attesta Approval node for n8n. Place it before any action node in your workflow to gate AI agent actions through risk scoring and human approval.
Package:
n8n-nodes-attesta v0.1.0 | Language: TypeScript | Dependency: @kyberon/attesta ^0.1.0 | Peer: n8n-workflow >=1.0.0Installation
Install the community node
In your n8n instance, go to Settings > Community Nodes and install:For self-hosted n8n, you can also install via the CLI:
Credentials Setup
The node optionally accepts Attesta credentials (attestaApi), which configure a default risk threshold:
| Field | Type | Default | Description |
|---|---|---|---|
| Risk Threshold | Number (0—1) | 0.5 | Actions scoring above this threshold are flagged for review |
- Go to Credentials > New Credential
- Search for Attesta
- Set the Risk Threshold value (a number between 0 and 1, with 0.1 step increments)
- Save and select the credential in the Attesta Approval node
Node Configuration
The Attesta Approval node has four configurable properties:| Property | Type | Default | Description |
|---|---|---|---|
| Function Name | String | (required) | Name of the action being gated (e.g., send_email, delete_record). Shown in the node subtitle via ={{$parameter["functionName"]}}. |
| Risk Level | Options | Auto (Score-based) | Override the risk level. Options: Auto, Low, Medium, High, Critical. |
| Risk Hints | JSON | {} | JSON object of risk hints (e.g., {"destructive": true, "pii": true}). Must be valid JSON or the node throws an error. |
| On Denied | Options | Error | What to do when denied. Error stops the workflow; Passthrough adds denial metadata and continues. |
How It Works
When the node executes, it processes each input item through the following steps:- The configured Function Name and the item’s JSON data are combined into an
ActionContextwithenvironment: "production"andmetadata: { source: "n8n", nodeId: <nodeId> }. - The
ActionContextis passed toattesta.evaluate(), which runs risk scoring and challenge verification. - Based on the verdict:
- Approved or Modified: The item passes through with
_attestametadata attached. - Denied, Timed Out, or Escalated: Depending on the On Denied setting, the workflow either throws a
NodeOperationErroror passes the item through with denial metadata.
- Approved or Modified: The item passes through with
Basic Usage
Example: Gate an Email Send
- Add an Attesta Approval node between your AI agent and the Send Email node.
- Set Function Name to
send_email. - Set Risk Level to
Auto (Score-based)(the scorer detects “send” as a mutating verb). - Connect the output to the Send Email node.
- The node evaluates the input data through Attesta’s risk scorer
- If approved, data flows through with
_attestametadata attached - If denied and On Denied is “Error”, the workflow stops with an error message
Example: Gate a Database Delete
- Set Function Name to
delete_records. - Set Risk Level to
Critical(force multi-party approval). - Set Risk Hints to:
- Set On Denied to
Error.
Output Format
The node adds an_attesta object to each output item’s JSON:
- Approved
- Denied (Passthrough)
Denial Modes
Error Mode (default)
Stops the workflow with a descriptiveNodeOperationError:
Passthrough Mode
Continues the workflow with denial metadata attached. Downstream nodes receive the item with_attesta.denied: true.
Use this when you want to:
- Route denied items to a logging or notification node
- Continue processing other items in a batch
- Let downstream logic decide how to handle denials
Batch Processing
The Attesta node iterates over every input item independently. In a batch of 5 items, some may be approved while others are denied:kwargs to the ActionContext. The risk scorer analyzes the contents of each item separately.
In Error mode, the workflow stops at the first denied item. In Passthrough mode, all items are processed and denied items are marked with
_attesta.denied: true.Workflow Patterns
Pattern: Gate Before Action
The simplest pattern — place the gate directly before the action node:Pattern: Conditional Routing
Use Passthrough mode with an IF node to route approved and denied items:Pattern: Multi-Step Approval
Chain multiple Attesta nodes for escalating approval:Related Pages
Flowise Integration
Tool component for Flowise chatflows
Langflow Integration
Python component for Langflow pipelines
Dify Integration
Plugin tool for the Dify platform
No-Code Overview
Compare all no-code platforms