Skip to content
AI Agents

Approval Decision Record Auditor: Timeout Default-Reject and Wrong-Field Detection

8 nodes 99 12 Manual trigger
Download

Loading workflow…

Workflow Description

This workflow audits a batch of approval requests locally before execution. It compares each request's age against a supplied reference time now, classifies it approved or rejected from the boolean data.approved, auto-rejects undecided requests whose timeout passed, and flags non-boolean values, decisions at the wrong field, or invalid dates/timeouts as ambiguous. An If node sends only approved items to the execute route, then both routes merge into one audit report with counts and per-request reasons.

How it works

  1. 1.Emit Sample Approval Batch outputs a reference time and six fictional requests
  2. 2.Evaluate Approval Records validates fields, computes age in hours and classifies each request with a reason
  3. 3.Is Approved For Execution? passes only execute=true to the execute route
  4. 4.Mark Execute Route and Mark Blocked Route add a route field keeping other fields
  5. 5.Merge Audit Routes appends both routes
  6. 6.Build Audit Summary returns one item with counts, IDs and audit log

Use cases

  • Audit ticket approval requests before running actions
  • Detect workflows branching on approved at the wrong path
  • Apply default rejection to stale pending requests

Requirements

  • Input schema now plus requests with id, created_at, timeout_hours, action, data.approved
  • ISO reference time
  • No credentials required

Setup and testing in n8n

  1. Import the JSON into n8n and click Execute Workflow
  2. Check approved=1, rejected=1, expired=1, ambiguous=3, counts_consistent=true
  3. Change REQ-1004 data.approved to true and rerun to see it approved
  4. Set requests to an empty array and confirm total_input=0

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Manual Trigger Code If Set Merge

Details

Trigger Manual trigger
Nodes 8
Apps 5
Views 99
Downloads 12

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (8)

Run Approval Audit Demo

Manual Trigger

#1

Emit Sample Approval Batch

Code

#2

Evaluate Approval Records

Code

#3

Is Approved For Execution?

If

#4

Mark Execute Route

Set

#5

Mark Blocked Route

Set

#6

Merge Audit Routes

Merge

#7

Build Audit Summary

Code

#8

Note: Input and Setup

Sticky Note

#9

Note: Rules and Routing

Sticky Note

#10
Stay in the loop

Fresh workflows, straight to your inbox

Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.

  • New workflows
  • Clear overviews
  • Setup guides

Be first to discover what is new

Your name, your email, and one confirmation.

Email confirmation · Unsubscribe anytime