Daily Slack digest of Aircall calls and availability

By General Input

Every weekday at 8:30am, post a Slack digest of yesterday's Aircall calls, missed vs answered, plus who is on the line right now.

Integrations

  • Aircall
  • Slack Bot

Type

Deterministic Code

Categories

  • Operations
  • Customer Support

Every weekday at 8:30am in the workspace time zone, compile a deterministic daily digest of yesterday's Aircall phone activity and post it as a single Slack message to a designated ops channel (default: #phone-team). Trigger: cron, Monday through Friday at 08:30 local time. Purely deterministic aggregation, no LLM reasoning.

Step 1. Pull yesterday's calls with Aircall List Calls. Compute yesterday's start and end as UNIX seconds in the configured time zone (00:00:00 to 23:59:59) and pass them as the from and to filters. Page through the results at 50 per page until exhausted. Do not attempt to page without a date filter, since Aircall caps List Calls at 10,000 items total across pages; a single day's volume comfortably fits inside that when the date range is applied.

Step 2. Aggregate the call list. For each call, bucket by direction (inbound vs outbound) and by user (assigned user id and name). Count answered vs missed, where missed means the call status is missed or the inbound call has no answered_at timestamp. Flag any call whose duration is 0 seconds (voicemail-only or immediate hang-up) and any call whose duration is over 15 minutes (long call). All of this is basic grouping and counting, no reasoning needed.

Step 3. Pull the live availability snapshot with Aircall List Users Availability. Bucket every user into available, in a call, or offline based on the returned status.

Step 4. Format one Slack message with Slack Bot Send a Message to the designated ops channel. Use Slack mrkdwn (single asterisks for bold, backticks for code) and structure the payload as three sections. Top section: yesterday's totals, i.e. total calls, inbound vs outbound, answered vs missed, count of voicemails, count of long calls, and each long call's user plus duration. Middle section: a per-rep table listing each user with their inbound answered, inbound missed, outbound, average duration, and any flagged calls. Bottom section: the current availability roster, one line per bucket (available, in a call, offline) with user names. Keep the payload under Slack's 40,000-character limit; if the per-rep table would blow past it, truncate to the top 20 reps by call count and add a short note that the rest were omitted.

Configuration knobs to expose: target Slack channel, time zone for what counts as yesterday, long-call threshold (default 15 minutes), and whether to run on weekends. Aircall's public API rate limit is 120 requests per minute per company, so even a busy day sits well under the limit.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them