Weekly customer usage brief from your DynamoDB events

By General Input

Every Monday at 8am, roll up last week's events from DynamoDB, spotlight top movers, at-risk accounts, and silent customers, and email it to you.

Integrations

  • Amazon DynamoDB
  • Gmail

Type

Agentic Task

Categories

  • Operations
  • Product

Every Monday at 8am, read the last seven days of usage events from my DynamoDB events table and email me a plain-English customer-usage brief.

At setup, ask me three things about the events table: its name, the attribute name that holds the customer id, and the attribute name that holds the event timestamp (plus whether that timestamp is a Unix epoch number or an ISO 8601 string). Also ask which Gmail account should receive the brief and what my timezone is.

Trigger: cron, every Monday at 08:00 in my timezone.

Step 1. Use Amazon DynamoDB to pull last week's rows. Prefer Query with a KeyConditionExpression on the timestamp if the table's partition/sort-key layout supports it; otherwise Scan with a FilterExpression on the timestamp attribute. Paginate through LastEvaluatedKey (pass it back as ExclusiveStartKey) until there is no more LastEvaluatedKey — do not stop after the first page. Then repeat the same read for the previous seven-day window so we can compare week over week.

Step 2. Group the current week's rows by customer id and count events per customer. Do the same for the prior week.

Step 3. From those two grouped counts, derive three lists: Top movers = the five customers with the highest event counts this week; At risk = any customer whose event count dropped more than 25% versus the prior week (skip customers with fewer than 5 events last week so we don't cry wolf on tiny denominators); Silent this week = any customer who had events last week but zero events this week.

Step 4. Draft a plain-English report with three sections in this order: 'Top movers', 'At risk', 'Silent this week'. Name specific customers with their event counts (e.g. 'Acme Corp — 142 events, up from 96 last week'). Keep the whole thing to one screen: a one-line intro, three tight sections, and one short 'so what' sentence per section that tells me what to actually do (e.g. 'Book a check-in call with these accounts this week — they were healthy last week and just fell off a cliff'). If a section has no entries, keep the heading and say so briefly ('No customers went silent this week.') rather than dropping the section. Round percentages to whole numbers.

Step 5. Send the report to me via Gmail (Send a Message) with a subject line like 'Customer usage brief — week of <Monday's date>'. Body should be plain text or lightly formatted; no attachments.

Nuance: do not dump the full customer list — only the top five movers plus every account that hits an at-risk or silent criterion. The whole point is that I can read it in under a minute and know which accounts to reach out to.

Related prompts

Explore more prompts
Win back LiveChat visitors whose chats went unansweredChase the paperwork every new client and vendor still owesFile Gmail attachments into storage with names you can findCandidate rediscovery desk for your archived Lever applicantsLaytime and demurrage claim workspace for chartering opsKajabi customer support console for member access fixesRun your application review round on Jotform submissionsRun your nutrition clients' weekly meal plans from one consoleReplace the dispatch whiteboard with a live production boardJob search command center with a self-filling pipeline board