Skip to main content
The 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.0

Installation

1

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:
2

Restart n8n

Restart your n8n instance to load the new node:
3

Find the node

Search for “Attesta Approval” in the node panel. It appears under the AI category.

Credentials Setup

The node optionally accepts Attesta credentials (attestaApi), which configure a default risk threshold: To configure:
  1. Go to Credentials > New Credential
  2. Search for Attesta
  3. Set the Risk Threshold value (a number between 0 and 1, with 0.1 step increments)
  4. Save and select the credential in the Attesta Approval node
Credentials are optional. If you do not configure them, the node uses the default Attesta risk scoring without a custom threshold.

Node Configuration

The Attesta Approval node has four configurable properties:

How It Works

When the node executes, it processes each input item through the following steps:
  1. The configured Function Name and the item’s JSON data are combined into an ActionContext with environment: "production" and metadata: { source: "n8n", nodeId: <nodeId> }.
  2. The ActionContext is passed to attesta.evaluate(), which runs risk scoring and challenge verification.
  3. Based on the verdict:
    • Approved or Modified: The item passes through with _attesta metadata attached.
    • Denied, Timed Out, or Escalated: Depending on the On Denied setting, the workflow either throws a NodeOperationError or passes the item through with denial metadata.

Basic Usage

Example: Gate an Email Send

  1. Add an Attesta Approval node between your AI agent and the Send Email node.
  2. Set Function Name to send_email.
  3. Set Risk Level to Auto (Score-based) (the scorer detects “send” as a mutating verb).
  4. Connect the output to the Send Email node.
When the workflow runs:
  • The node evaluates the input data through Attesta’s risk scorer
  • If approved, data flows through with _attesta metadata attached
  • If denied and On Denied is “Error”, the workflow stops with an error message

Example: Gate a Database Delete

  1. Set Function Name to delete_records.
  2. Set Risk Level to Critical (force multi-party approval).
  3. Set Risk Hints to:
  4. Set On Denied to Error.

Output Format

The node adds an _attesta object to each output item’s JSON:
Use the _attesta.denied field in an IF node downstream to route approved and denied items to different branches. This is useful with Passthrough mode when you want to log denials instead of stopping the workflow.

Denial Modes

Error Mode (default)

Stops the workflow with a descriptive NodeOperationError:
Use this when denied actions should halt the entire workflow.

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:
Each item’s input JSON is passed as 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:
Each Attesta node creates an independent Attesta instance. They do not share trust state or audit context within the same workflow execution. If you need coordinated multi-step approval, consider using the code-based integration with a shared Attesta instance instead.

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