Trace refund approval flows with OpenRouter and OpenTelemetry
Needs changesWhat this workflow does
This AI workflow has 10 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenRouter Chat Model. It also calls postman-echo.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Enrich Request Sub-workflow (Execute Sub-workflow): calls another n8n workflow
- Policy Service Call (HTTP Request): calls postman-echo.com
- Approval Proposal Agent (AI Agent): runs an AI agent, with model: OpenRouter - Approval
- Return Approval Request (Respond to Webhook): sends the response back to the webhook caller
- Wait: pauses until webhook
- Validate Approval (If): checks a condition and branches into true / false
- Record Approval (Edit Fields (Set)): sets 7 fields: requestId, proposal, submittedApprover…
- Reject Approval (Stop and Error): stops the run with an error
Services it uses
HTTP calls to: postman-echo.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Approval Proposal Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Approval Proposal Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Webhook
n8n-nodes-base.webhook - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - HTTP Request
n8n-nodes-base.httpRequest - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Respond to Webhook
n8n-nodes-base.respondToWebhook - Wait
n8n-nodes-base.wait - If
n8n-nodes-base.if - Stop and Error
n8n-nodes-base.stopAndError - Edit Fields (Set)
n8n-nodes-base.set
From the author
Quick overview This workflow enriches a refund request, drafts an approval proposal with an AI agent, and waits for a human decision, so you can follow one execution across the wait with OpenTelemetry tracing. It is Exercise 5 from the n8n Production AI…