Validate and enrich refund approval requests in an n8n sub-workflow
Go to WorkflowDescription
Quick overview
This sub-workflow validates a refund approval request and adds simulated customer context before an AI agent drafts a proposal. It is called by the Exercise 5 parent workflow from the n8n Production AI Playbook on Audit & Trace.
How it works
When Executed by Another Workflow receives the request from the parent workflow and passes the input through.
Validate Request, an If node, checks for a non-empty requestId and reason and a positive whole-number amount in cents.
Invalid requests stop at Reject Request, a Stop and Error node, so the parent execution fails with a clear error.
Enrich Request, an Edit Fields node, returns the request with a simulated customer tier and prior refund count.
Setup
Import this workflow, save it, and publish it so the parent workflow can call it.
Import the Exercise 5 parent workflow, Trace a human approval across a wait, and select this workflow in its Enrich Request Sub-workflow node.
No credentials are needed for this sub-workflow.
With OpenTelemetry tracing enabled, its workflow span appears nested under the parent workflow span in your trace viewer.
Requirements
n8n Cloud or a self-hosted n8n instance
The Exercise 5 parent workflow
Customization
Replace the simulated values in Enrich Request with a lookup against your CRM or billing system.
Additional info
Customer data is synthetic.