Testing Your Approval Workflow¶
Verify your Preloop setup is working correctly by testing the complete approval workflow end-to-end.
Overview¶
This guide walks you through testing:
- Tool Call Triggering - Verify MCP client can call tools
- Approval Interception - Confirm Preloop intercepts prelooped tools
- Notification Delivery - Check you receive approval requests
- Approval Processing - Test approve/decline functionality
- Tool Execution - Verify approved tools execute correctly
- Audit Trail - Confirm all actions are logged
Time Required: 10-15 minutes
Prerequisites: - Preloop account created (Creating Your Account) - API key generated - MCP client connected (Connect Your MCP Client) - At least one tool prelooped
Test 1: Basic Approval Workflow¶
Goal¶
Verify the complete approval flow works: call tool → receive notification → approve → tool executes.
Setup¶
Step 1: Use the Example MCP Server
If you haven't already, add the hosted example MCP server:
- Go to Tools & MCP → + Add Source → MCP Server
- Configure:
- Click Save
- Click Scan Tools
Step 2: Preloop the pay Tool
- Find
paytool in Tools & MCP list - Click Configure (gear icon)
- Toggle Require Approval to ON
- Set approvers: Add yourself
- Notification: Select "Email"
- Click Save
📸 Screenshot needed: test-pay-tool-config.png
Execute Test¶
Step 1: Trigger Tool Call
In your MCP client (e.g., Claude Code):
Expected behavior: - MCP client sends request - Shows "Waiting for approval..." or similar - Does NOT execute immediately
📸 Screenshot needed: test-waiting-for-approval.png
Step 2: Check for Notification
Within 30 seconds, check:
Email:
- Check inbox for email from hello@preloop.ai
- Subject: "Approval Required: pay"
- Body includes:
- Tool name: pay
- Arguments: recipient=alice@example.com, amount=500
- Approve and Decline buttons
- Request ID
📸 Screenshot needed: test-approval-email.png
Web Dashboard: - Look for notification bell (top-right) - Badge should show "1" - Click bell to see pending request - Click request to see details
📸 Screenshot needed: test-approval-dashboard-notification.png
Mobile (if configured): - Push notification should appear - Shows tool name and key arguments - Can approve directly from notification
Step 3: Approve Request
Choose one method to approve:
Method A: Email (Fastest) - Click Approve button in email - Should see confirmation page - "✓ Approval recorded successfully"
Method B: Web Dashboard - Click notification bell → Click request - Review details in modal - Click Approve button - Optional: Add reason (e.g., "Test approval") - Click Confirm
Method C: Mobile App - Tap notification - Review details - Tap Approve - Authenticate (Face ID/Touch ID)
📸 Screenshot needed: test-approval-confirmed.png
Step 4: Verify Execution
After approving:
In MCP Client: - Should see approval confirmation - Tool executes - Result displayed:
📸 Screenshot needed: test-tool-executed.png
In Web Dashboard: - Notification clears (badge decreases) - Request moves to "Approved" in Approvals → History - Shows execution result
Verify Audit Trail¶
- Go to Approvals → History
- Find your test request
- Click to view details
- Verify it shows:
- ✅ Requester: Your MCP client
- ✅ Tool:
pay - ✅ Arguments:
recipient=alice@example.com, amount=500 - ✅ Status: Approved
- ✅ Approved by: You
- ✅ Approved at: Timestamp
- ✅ Executed: Yes
- ✅ Result: Success
📸 Screenshot needed: test-audit-trail.png
Expected Results¶
✅ PASS if: - Notification received within 30 seconds - Approval buttons work - Tool executes after approval - Result shown in MCP client - Audit log shows complete record
❌ FAIL if: - No notification received - Approval buttons don't work - Tool executes immediately (without approval) - No audit log entry
Test 2: Decline Workflow¶
Goal¶
Verify declining an approval request works correctly and prevents execution.
Execute Test¶
Step 1: Trigger Another Tool Call
Step 2: Decline Request
When notification arrives:
Via Email: - Click Decline button (not Approve) - Optional: Add reason (e.g., "Test decline") - Click Confirm
Via Web Dashboard: - Click notification → View request - Click Decline button - Add reason: "Test decline" - Click Confirm
📸 Screenshot needed: test-approval-declined.png
Step 3: Verify No Execution
In MCP Client: - Should see decline message - Tool does NOT execute - Error or cancellation message:
In Web Dashboard: - Request shows as "Declined" - Status: ❌ Declined - No execution result - Shows decline reason
Expected Results¶
✅ PASS if: - Decline button works - Tool does NOT execute - MCP client receives decline message - Audit log shows "Declined" status
❌ FAIL if: - Tool executes despite decline - MCP client doesn't receive decline message
Test 3: Conditional Approval¶
Goal¶
Verify CEL conditions work: approval only required when condition matches.
Setup¶
Step 1: Update pay Tool Policy
- Go to Tools & MCP → Find
paytool → Configure - In Approval Condition field, enter:
- Click Save
This means: Only require approval if amount > $1000.
📸 Screenshot needed: test-conditional-policy.png
Execute Test¶
Test A: Amount Below Threshold (No Approval)
Expected behavior: - No approval request sent (amount ≤ 1000) - Tool executes immediately - MCP client shows result without waiting
✅ PASS: Tool executes without approval
Test B: Amount Above Threshold (Approval Required)
Expected behavior: - Approval request sent (amount > 1000) - Notification received - MCP client waits - Approve → Tool executes
✅ PASS: Approval required for amount > 1000
Expected Results¶
✅ PASS if: - Small amounts (≤ $1000) execute immediately - Large amounts (> $1000) require approval - Condition evaluated correctly - Audit log shows condition result
❌ FAIL if: - All amounts require approval (condition ignored) - No amounts require approval (condition broken)
Test 4: Team-Based Approval¶
Goal¶
Verify team-based approvals with quorum work correctly.
Setup¶
Prerequisites: - You need at least 2 users in your account for this test - If testing alone, skip to Test 5
Step 1: Create a Test Team
- Go to Settings → Teams
- Click + Create Team
- Configure:
- Click Create
Step 2: Update pay Tool Policy
- Tools & MCP →
pay→ Configure - Approvers: Select "Test Approvers" team
- Quorum: 2 (require 2 approvals)
- Condition: Remove (or set to always true)
- Click Save
📸 Screenshot needed: test-team-policy.png
Execute Test¶
Step 1: Trigger Tool Call
Step 2: First Approval
- You receive notification (as team member)
- Other user also receives notification
- You approve
- Tool does NOT execute yet (quorum not met)
Step 3: Second Approval
- Other user approves
- Quorum met (2 approvals)
- Tool NOW executes
Step 4: Verify Quorum
In audit log: - Shows both approvers - Shows quorum: 2/2 met - Execution after quorum met
Expected Results¶
✅ PASS if: - Both team members notified - Tool waits for quorum (2 approvals) - Executes after 2nd approval - Audit log shows both approvers
❌ FAIL if: - Tool executes after 1st approval (quorum ignored) - Only one person notified
Test 5: Timeout and Escalation¶
Goal¶
Verify approval requests timeout and escalation works.
Setup¶
Step 1: Update pay Tool Policy
- Tools & MCP →
pay→ Configure - Approvers: Yourself
- Timeout: 120 seconds (2 minutes)
- Escalation:
- Enabled: ON
- Escalate to: [Add another email or leave as admin]
- Escalation delay: 60 seconds (1 minute)
- Click Save
📸 Screenshot needed: test-escalation-policy.png
Execute Test¶
Step 1: Trigger Tool Call
Step 2: Wait Without Approving
- Receive notification
- Do NOT approve or decline
- Wait 1 minute
Step 3: Verify Escalation
After 1 minute: - Escalation notification sent - Email to escalation contact - Subject: "[ESCALATED] Approval Required: pay" - Shows original requester and timeout
📸 Screenshot needed: test-escalation-notification.png
Step 4: Continue Waiting
- Total 2 minutes pass
- Still do not approve
Step 5: Verify Timeout
After 2 minutes: - Request times out - MCP client receives timeout error:
- Audit log shows "Timeout" status📸 Screenshot needed: test-timeout-result.png
Expected Results¶
✅ PASS if: - Escalation notification sent after 1 minute - Request times out after 2 minutes - Tool does NOT execute on timeout - Audit log shows timeout + escalation
❌ FAIL if: - No escalation notification - Tool executes despite timeout - Request never times out
Test 6: Multiple Notification Channels¶
Goal¶
Verify notifications work across email, mobile, Slack, and web.
Setup¶
Prerequisites: - Email: Always configured - Mobile: Optional (iOS app installed and registered) - Slack: Optional (Slack integration configured)
Step 1: Enable All Channels
- Go to Settings → Notifications
- Verify enabled:
- ✅ Email: ON (always)
- ✅ Mobile: ON (if configured)
- ✅ Slack: ON (if configured)
- ✅ Web: ON (always)
Step 2: Update pay Tool Notification
- Tools & MCP →
pay→ Configure - Notification channels:
- ✅ Mobile (if configured)
- ✅ Slack (if configured)
- Slack channel:
#approvals(if using Slack) - Click Save
Execute Test¶
Step 1: Trigger Tool Call
Step 2: Check All Channels
Within 30 seconds, verify notification received on:
✅ Email: - Inbox has approval email - Approve/Decline buttons present
✅ Web Dashboard: - Notification bell badge: 1 - Pending request visible
✅ Mobile (if configured): - Push notification received - Can view details in app
✅ Slack (if configured): - Message posted to #approvals channel - Interactive Approve/Decline buttons - Shows tool name and arguments
📸 Screenshot needed: test-multi-channel-notifications.png (showing all channels)
Step 3: Approve from Any Channel
- Approve from ONE channel (e.g., Slack)
- All other channels should update:
- Email shows "Already approved" if you click button
- Web dashboard notification clears
- Slack message updates with approval status
- Mobile notification clears
Expected Results¶
✅ PASS if: - Notifications arrive on all configured channels within 30 seconds - Approve from any channel works - Other channels reflect approval status - Tool executes after approval
❌ FAIL if: - Missing notifications on any channel - Approve from one channel doesn't update others - Duplicate executions
Test 7: Non-Prelooped Tool¶
Goal¶
Verify non-prelooped tools execute immediately without approval.
Setup¶
Step 1: Add a Tool Without Approval
Use the get_random_number tool from example MCP server:
- Tools & MCP → Find
get_random_number - Verify Require Approval is OFF
- If ON, toggle it OFF and save
📸 Screenshot needed: test-non-prelooped-tool.png
Execute Test¶
Step 1: Call Non-Prelooped Tool
Expected behavior: - No approval request sent - Tool executes immediately - Result shown instantly:
Step 2: Verify No Notification
- No email received
- No web dashboard notification
- No Slack message
- Tool just works
Expected Results¶
✅ PASS if: - Tool executes immediately - No approval request - Result shown instantly - Still logged in audit trail (as "Auto-approved")
❌ FAIL if: - Approval requested (tool shouldn't require it) - Tool doesn't execute
Test 8: Error Handling¶
Goal¶
Verify error handling when tool execution fails or MCP server is unavailable.
Test A: Tool Execution Error¶
Step 1: Trigger Invalid Tool Call
Use invalid arguments to cause execution error:
Expected behavior: - Approval request still sent (if prelooped) - You approve - Tool tries to execute - Execution fails with error:
- Audit log shows "Approved but execution failed"✅ PASS: Error handled gracefully, shown to user
Test B: MCP Server Offline¶
Step 1: Temporarily "Break" Connection
- Go to Tools & MCP → Example MCP Server
- Click Edit
- Change URL to invalid:
https://invalid-server-url.example.com - Click Save
Step 2: Try to Use Tool
Expected behavior: - Error message:
- No approval request sent (can't reach server)Step 3: Fix Connection
- Edit server again
- Restore correct URL:
https://example-mcp.preloop.ai - Click Save
- Try tool call again → Should work
✅ PASS: Server errors handled, shown to user
Expected Results¶
✅ PASS if: - Invalid arguments shown as errors - Server offline errors reported - No mysterious failures - Errors logged in audit trail
Next Steps¶
Your setup is working! Next: Add your own MCP tools or create automated flows.