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
- 1Install the community node.
In n8n, go to Settings, Community Nodes, Install, then enter
n8n-nodes-stacksona. - 2Add Stacksona credentials.
Use your Stacksona Gate URL and Agent API key. Store them in n8n credentials, not inside workflow code.
- 3Place 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.
- 4Use Request Decision and Wait.
Send the proposed action details to Stacksona. This operation waits by polling, which is best for short review windows.
- 5Add an IF branch.
Execute the action only when the decision is
alloworapproved. Stop, notify, or route to fallback for every other status.
Workflow shape
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.
{
"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
| Operation | Use it when | Notes |
|---|---|---|
| Request Decision | You want to create a decision and branch manually. | Best when you will poll or resume through another workflow. |
| Request Decision and Wait | You want a simple approval step before the next node. | Waits by polling. Use for short review windows. |
| Get Decision | You have a decision ID and need the latest result. | Useful for polling loops and callback workflows. |
| Validate Approval Token | The final action needs proof that approval happened. | Use before refunds, deletes, deployments, and production API calls. |
| Log Event | You want audit context before or after the action. | Useful at workflow start, proposal, approval, execution, and failure points. |
Branch behavior
| Decision | n8n branch |
|---|---|
allow | Continue to the action node. |
approved | Continue to the action node. |
pending_review | Wait, poll, or store the decision ID for a callback flow. |
reject | Do not execute. Notify the workflow owner. |
rejected | Do not execute. Create a manual review task or fallback path. |
Example: approve an AI email before send
- 1Trigger.
A new support ticket arrives.
- 2AI Agent.
The agent drafts a reply but does not send it.
- 3Stacksona.
The workflow requests a decision with recipient, subject, draft body, ticket ID, and risk level.
- 4IF branch.
If
approvedorallow, continue to Gmail, Outlook, or SMTP. Otherwise stop. - 5Log 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.
Create the Stacksona decision, save the decision ID, then stop or wait outside the main execution path.
Use an n8n Webhook trigger to receive the Stacksona callback, fetch or validate the decision, then continue the approved path.
Suggested templates
| Template | Approves before |
|---|---|
| AI Email Approval | Gmail, Outlook, SMTP, or support reply send |
| CRM Update Approval | HubSpot, Salesforce, Pipedrive, or Airtable record updates |
| Refund Approval | Stripe, Chargebee, or billing provider refunds |
| Slack Post Approval | Public channel messages or customer-facing replies |
| Database Mutation Approval | Production create, update, or delete operations |
| Production API Approval | HTTP 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.