Workflow Automation Integration

Human-in-the-Loop Consent Delegation for n8n AI Workflows

Require explicit user approval before n8n AI agent nodes execute high-risk webhooks, API calls, or database mutations.

Integration Code Example (JAVASCRIPT)

import { PermitlyClient } from 'permitly';

const permitly = new PermitlyClient({ apiKey: process.env.PERMITLY_API_KEY });

// Request user consent before executing n8n node
const consent = await permitly.consent.request({
    agentId: 'n8n-stripe-agent',
    scopes: ['stripe.refund.execute'],
    userId: 'usr_8921',
    description: 'Approve $450 customer refund in n8n pipeline'
});

console.log('Hosted Consent URL:', consent.consentUrl);

Execution Sequence Flow

sequenceDiagram
    participant N8N as ⚡ n8n Workflow
    participant Permitly as 🛡️ Permitly API
    participant User as 👤 Human User
    N8N->>Permitly: 1. Request Consent (scope: "stripe.refund")
    Permitly-->>N8N: 2. Return Hosted Consent URL
    N8N->>User: 3. Send Notification Link
    User->>Permitly: 4. Approve Consent Screen
    Permitly-->>N8N: 5. Return Signed ECDSA Token
    N8N->>N8N: 6. Verify Token Offline & Execute Node
High-ROI Security Gate

Protecting your n8n Workflows pipeline against unauthorized actions delivers an immediate compliance audit trail with zero infrastructure overhead.

Frequently Asked Questions

How do I integrate Permitly with n8n?

Use the Permitly Node.js SDK inside an n8n Code Node or HTTP Request Node to pause workflow execution until a signed consent token is verified.

What happens if a user declines consent in n8n?

Permitly returns a declined status, causing the n8n workflow to safely branch to an error-handling path without executing the downstream action.

DIRECTORY & RESOURCE INDEX

Explore Product Capabilities & Engineering Articles