Platform guide

Stacksona for n8n

Add approval gates to n8n AI Agent workflows and automation actions before sensitive steps execute.

Use this page when an n8n workflow or AI Agent is about to send, update, delete, refund, post, call an API, or take another action that should be reviewed first.

Fast path: approval before a risky node

  1. 1
    Install the community node.

    In n8n, go to Settings, Community Nodes, Install, then enter n8n-nodes-stacksona.

  2. 2
    Add Stacksona credentials.

    Use your Stacksona Gate URL and Agent API key. Store them in n8n credentials, not inside workflow code.

  3. 3
    Place Stacksona before the risky action.

    Put the Stacksona Gate node before Gmail Send, CRM Update, Stripe Refund, HTTP Request, Database Update, Slack Post, or any similar action.

  4. 4
    Use Request Decision and Wait.

    Send the proposed action details to Stacksona. This operation waits by polling, which is best for short review windows.

  5. 5
    Add an IF branch.

    Execute the action only when the decision is allow or approved. Stop, notify, or route to fallback for every other status.

Workflow shape

TriggerAI Agent drafts actionStacksona Request DecisionIF approvedExecute actionLog result
Keep the rule simple

The risky n8n node should sit after Stacksona, never before it.

Minimum fields to map

Send enough context for the reviewer to make the decision without opening five other tools.

json
{
  "workflow_name": "Customer Support",
  "task_label": "Approve AI customer reply",
  "tool_name": "send_email",
  "subject": "Send reply to customer@example.com",
  "preview": "Agent drafted a response about ticket #1842.",
  "risk_level": "medium",
  "summary": [
    "Customer asked for billing clarification",
    "Agent drafted a customer-facing reply",
    "No email has been sent yet"
  ],
  "payload": {
    "to": "customer@example.com",
    "subject": "Update on your support request",
    "draft_body": "Thanks for reaching out. I reviewed the issue and..."
  }
}

Operations

OperationUse it whenNotes
Request DecisionYou want to create a decision and branch manually.Best when you will poll or resume through another workflow.
Request Decision and WaitYou want a simple approval step before the next node.Waits by polling. Use for short review windows.
Get DecisionYou have a decision ID and need the latest result.Useful for polling loops and callback workflows.
Validate Approval TokenThe final action needs proof that approval happened.Use before refunds, deletes, deployments, and production API calls.
Log EventYou want audit context before or after the action.Useful at workflow start, proposal, approval, execution, and failure points.

Branch behavior

Decisionn8n branch
allowContinue to the action node.
approvedContinue to the action node.
pending_reviewWait, poll, or store the decision ID for a callback flow.
rejectDo not execute. Notify the workflow owner.
rejectedDo not execute. Create a manual review task or fallback path.

Example: approve an AI email before send

  1. 1
    Trigger.

    A new support ticket arrives.

  2. 2
    AI Agent.

    The agent drafts a reply but does not send it.

  3. 3
    Stacksona.

    The workflow requests a decision with recipient, subject, draft body, ticket ID, and risk level.

  4. 4
    IF branch.

    If approved or allow, continue to Gmail, Outlook, or SMTP. Otherwise stop.

  5. 5
    Log result.

    Send a final event to Stacksona after the email sends or after the workflow stops.

Webhook callback pattern for long reviews

Request Decision and Wait is the easiest path, but it uses polling. For reviews that may take minutes or hours, split the workflow into two parts.

Request workflow

Create the Stacksona decision, save the decision ID, then stop or wait outside the main execution path.

Callback workflow

Use an n8n Webhook trigger to receive the Stacksona callback, fetch or validate the decision, then continue the approved path.

Suggested templates

TemplateApproves before
AI Email ApprovalGmail, Outlook, SMTP, or support reply send
CRM Update ApprovalHubSpot, Salesforce, Pipedrive, or Airtable record updates
Refund ApprovalStripe, Chargebee, or billing provider refunds
Slack Post ApprovalPublic channel messages or customer-facing replies
Database Mutation ApprovalProduction create, update, or delete operations
Production API ApprovalHTTP Request nodes that affect external systems

Integration FAQ

Can I use Stacksona with n8n today?

Yes. Use the documented native package when one exists. Otherwise, use the REST API, HTTP module, webhook action, or a small Node sidecar with @stacksona/sdk.

Where should Stacksona sit in a n8n workflow?

Place Stacksona immediately before the action that sends, updates, deletes, refunds, posts, deploys, or calls a production API.

What statuses should my workflow allow?

Execute the gated action only on allow or approved. Stop, retry, notify, or route to fallback for every other state.