Introduction
A wholesale company automates vendor payments. The pipeline matches invoices to purchase orders, flags discrepancies, and prepares payment batches. Everyone agrees that the final release of money needs a finance manager's approval. The first version sends an email with a link. Approvals take two days; people approve from their phones without seeing details, and nobody can later tell who approved which batch.
The problem is not that a human is involved. It is that the approval step was treated as a notification rather than as part of the system. Good approval queues are designed like any other workflow state: they have data, rules, timeouts, and an audit trail.
In this article you will learn how to model approval requests, deliver them in Slack and on the web, authorize approvers properly, execute approved actions safely, and handle the cases where nobody responds.
Modelling an Approval Request
An approval request is a record, not a message. It holds the exact action that will run if approved, its arguments, the requester (a person or an automation run), a risk level, the policy that requires approval, who may approve it, and when it expires.
CREATE TABLE approval_requests (
id uuid PRIMARY KEY,
action text NOT NULL, -- e.g. 'release_payment_batch'
payload jsonb NOT NULL, -- exact arguments that will execute
payload_hash text NOT NULL,
requested_by text NOT NULL,
approver_group text NOT NULL,
status text NOT NULL DEFAULT 'pending', -- pending, approved, rejected, expired
decided_by text, decided_at timestamptz, decision_note text,
expires_at timestamptz NOT NULL
);
Storing a hash of the payload lets you prove later that the action that executed is the one that was approved. If the payload changes, for example because an invoice was edited, the old request should be cancelled and a new one raised.
Delivering Approvals in Slack and on the Web
Slack is where approvers already are, so it gives the fastest response times. Post an interactive message with a short summary, the key numbers, the reason approval is needed, and the Approve, Reject, and View details buttons. When a button is clicked, Slack sends a request to your app; verify Slack's request signature, look up the approval by ID, and process it.
Keep the web queue as the source of truth. It shows the full context that does not fit in a chat message: line items, attachments, history, and related records. High-risk actions can require approval from the web view only, so nobody signs off on a payment from a one-line preview. Update the Slack message after a decision so everyone in the channel sees who decided and when.
Authorizing the Approver
Being in the Slack channel is not the same as being allowed to approve. Map the Slack user ID to your own user account, check that the user belongs to the approver group for this request, and enforce policy rules such as "the requester cannot approve their own request" and "payments above a threshold need two different approvers."
Record the decision with the authenticated user, timestamp, channel (Slack or web), and an optional note. Rejections should require a note, because they are often the most useful feedback for improving the automation.
Executing Approved Actions Safely
When an approval arrives, update the request status with a conditional statement, such as UPDATE ... SET status = 'approved' WHERE id = $1 AND status = 'pending'. If no row changes, someone else already decided, so show that instead of executing twice. Then enqueue the action with the approval ID as its idempotency key.
Execute the action from the stored payload, never from data in the Slack callback. Before executing, check that the payload hash still matches and that the request has not expired.
Timeouts and Escalation
Every request needs an expiry. Send a reminder at a set point, escalate to a backup approver group if there is still no decision, and expire the request when the deadline passes. Expired requests return the workflow to a state where it can be resubmitted, and expiry rates per approver group tell you where the process is overloaded.
Practical Examples: Real-World Use Cases
A distributor's credit note automation drafts credit notes from customer claims. Notes under a set value with complete evidence are issued automatically; larger ones go to a finance Slack channel. Median approval time dropped from a day and a half to under an hour, and every decision is visible in the credit note history.
A SaaS company requires approval for any production database access requested through its internal tooling. Engineers request access with a reason; an on-call lead approves in Slack; access is granted for two hours and logged.
A procurement platform routes purchase orders above a department's budget to the budget owner, then to finance above a second threshold, with each step recorded on the PO.
Common Mistakes to Avoid
Approving from a summary that hides the real numbers. Show the amounts.
and recipients that will be used.
Trusting the Slack payload for what to execute. Use the stored request.
Allowing anyone in the channel to approve. Check group membership and separation of duties.
No expiry. Stale approvals can be executed on outdated data weeks later.
Executing twice on double clicks. Use a conditional status update and an idempotency key.
Best Practices: Actionable Tips
Define approval policies as data: which actions, which thresholds, and which groups.
Keep approval messages short and link to a detailed web view for anything complex.
Measure time to decision and rejection rate per action type.
Require two approvers for the highest-risk actions.
Give approvers a single "my pending approvals" page across all workflows.
Conclusion
Human-in-the-loop approval works when the approval is a first-class workflow state: a stored request with an exact payload, delivered where approvers work, decided by authorized people, executed once and recorded permanently. The takeaway: let automation prepare everything, and make the human decision fast, informed, and impossible to misattribute.
Add Approval Gates to Your Workflows With Parallaxis
Parallaxis builds workflow automation for B2B teams, including Slack and web approval queues, escalation rules, and audit trails for payments, credit notes, and purchasing. If your automations stop at the point where someone needs to sign off, visit parallaxis.in to explore our automation services or discuss your workflow with us.


