Daily Coupa approval backlog digest for procurement

By General Input

Every weekday at 8:30am, your procurement team gets one Slack message showing every approval still waiting, who owns it, and what it is holding up.

Integrations

  • Coupa
  • Slack

Type

Agentic Task

Categories

  • Operations
  • Finance

Every weekday at 8:30am, give my procurement team a single view of everything stuck in Coupa approvals so nothing sits and ages quietly. Use a cron trigger set to weekdays at 8:30am in our local timezone. Coupa does not send outgoing webhooks through this integration and is not a supported polling source, so cron is the only valid trigger here.

Start with Coupa's List Approvals operation to pull every approval still in a pending state. Coupa list endpoints return at most 50 records per call and only support offset based pagination, so loop with offset increments of 50 until a call returns fewer than 50 records. Do not assume one call is enough. Narrow the set with filter operators where useful, for example created_at[gt_or_eq] to skip ancient noise, and remember that date values must be URL encoded.

Each approval points at an underlying document, so enrich every pending approval by fetching that document based on what is awaiting sign off. For requisitions use Get Requisition, for purchase orders use Get Purchase Order, and for invoices use Get Invoice. Note that our Coupa catalog has no list invoices operation, so invoices must be fetched individually by ID. Where you have many requisition or purchase order IDs, you can reduce call volume by batching them through List Requisitions or List Purchase Orders with an id filter instead of fetching one at a time. From each document pull the supplier, the total amount and currency, the requester name, and a short description of what the spend is actually for, so the digest explains the item rather than just naming a document number.

Group the results by approver name. Coupa has no documented user lookup operation in our catalog, so do not try to resolve approvers to email addresses or Slack accounts and do not attempt to direct message individual approvers. Group by the approver name exactly as Coupa returns it, in one shared channel digest. Within each approver group, sort by how many days the item has been waiting, longest first, and then by value, highest first.

Calculate days waiting from the date the approval entered its current pending state. Treat the aging threshold as a configurable value with a default of three business days, and count business days rather than calendar days so a weekend does not make a Monday item look overdue. Clearly call out every item past that threshold, for example with a warning marker and the number of days it has been waiting.

Keep the message readable. Use a configurable low value threshold, and collapse every pending item below it into a single count line per approver, such as a line noting a number of additional low value items with their combined total, rather than listing each one. Only items at or above the threshold get their own line.

Post the digest as a single Slack message to our procurement operations channel using Slack's Send a Message operation. Do not split it across multiple messages. Lead with a one line headline covering the total number of items pending, the total value held up, and the oldest item with its age. Follow that with the per approver breakdown, each group headed by the approver name and their item count and total value, then their sorted item lines showing supplier, amount, requester, purpose, and days waiting.

If nothing is past the aging threshold, do not post the long breakdown. Post a short all clear message instead, noting how many items are pending and that none have breached the threshold, so the channel stays quiet on good days.

Expose the aging threshold, the low value threshold, and the target Slack channel as configurable values at the top of the workflow so they are easy to change without rewriting the logic. If a document lookup fails for a single approval, skip that item gracefully and still post the digest rather than failing the whole run, and note the count of items that could not be enriched.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes