Block 1 - Sticky Note
- Type / Role
- n8n-nodes-base.stickyNote - stickyNote
- Config choices
- Version 1
Quick overview This workflow exposes a paid webhook endpoint, verifies budget via Alephant usage analytics, routes the request through an OpenAI based agent to pick the most cost effective model, r...
n8n-nodes-base.stickynote, n8n-nodes-base.webhook, @alephantai/n8n-nodes-alephant-analytics.alephantusage, n8n-nodes-base.if, n8n-nodes-base.respondtowebhook, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @alephantai/n8n-nodes-alephant.alephanttool
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by alephantAI.
Original n8n.io sourceThis workflow exposes a paid webhook endpoint, verifies budget via Alephant usage analytics, routes the request through an OpenAI-based agent to pick the most cost-effective model, runs the chosen model through Alephant for cost tracking, then returns results with per-call margin reporting to Discord and optional throttling.
Full information: https://developers.alephant.io/docs/overview/showcase/n8n-workflow
This workflow turns an n8n webhook into a paid, self-funding AI endpoint. A buyer pays per request in USDC over x402; Alephant verifies and settles the payment before the request reaches n8n, so revenue is booked before any work runs. A budget guard gates the call, then an AI agent reads recent spend through the Alephant UsageSummary tool and picks the cheapest model that still does the job. The work runs through Alephant for full cost tracking, and a P&L step calculates net margin (revenue minus token spend minus fee) on every single call. Healthy calls just respond and log; calls that drop below the margin threshold trigger a write-back to throttle, so a bad call never quietly loses money. The agent's own reasoning is also routed through Alephant via the OpenAI Base URL override, so the thing watching cost appears in its own dashboard. Notes: the Alephant analytics tool is read-only, so enforcement happens through the HTTP policy node, not the tool. After you run the Budget Guard node once, map the real budget field into the Budget OK node, since field names depend on your workspace response. Hard budget caps still live in the Alephant Budget Circuit Breaker; this workflow tunes within those rails.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Run a margin-aware paid AI agent with Alephant x402 and Discord |
|---|---|
| Complexity | advanced |
| Nodes | 21 |
| Categories | CRM, AI Chatbot |
| Author | alephantAI |
| Published | 11 Jun 2026 |
Use the JSON export at /data/workflows/16259/16259.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
Quick overview This workflow exposes a paid webhook endpoint, verifies budget via Alephant usage analytics, routes the request through an OpenAI based agent to pick the most cost effective model, r...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your CRM, AI Chatbot use case.