Weekly HubSpot deal recap posted to Slack every Friday
Every Friday at 4pm, roll up the week's HubSpot deal activity into a plain-English recap and post it to your leadership Slack channel.
Integrations
HubSpot
Groq
Slack Bot
Type
Categories
- Sales
Every Friday at 4pm local time, a cron trigger kicks off a weekly deal-motion recap for our leadership team. This is a deterministic pipeline: fixed query, fixed grouping logic, one LLM formatting step, one Slack post.
Step 1 (HubSpot Search Deals). Call HubSpot's Search Deals with a filter on hs_lastmodifieddate greater than 7 days ago. Request these properties: dealname, dealstage, amount, hubspot_owner_id, closedate, createdate, hs_lastmodifieddate, plus any custom "won reason" and "lost reason" properties the account has. Resolve owner names by calling Get Owner (or batching them) on the returned hubspot_owner_id values.
Step 2 (group in code, deterministically). Sort the returned deals into five buckets:
• New deals created — createdate falls within the last 7 days.
• Deals that advanced stages — dealstage changed in the last 7 days and the new stage sits later in the pipeline than the previous one.
• Deals won — dealstage is closedwon and closedate is within the last 7 days. Include the won-reason field if present.
• Deals lost — dealstage is closedlost and closedate is within the last 7 days. Include the lost-reason field if present.
• Deals stalled — no modification in >7 days AND closedate is in the past.
For every deal in every bucket include: deal name, amount, owner name, current stage, close date, and the relevant reason field where applicable. Also compute per-bucket count and total amount.
Step 3 (Groq Create Chat Completion). Send the grouped payload to Groq using the llama-3.3-70b model (versatile variant is fine) with a fixed prompt template that outputs a written narrative in the same structure every single week. The system message locks the format so week-over-week diffs are readable at a glance. Target output shape:
*Deal recap — week of [start] to [end]*
*Won this week:* [N] deals, $[total] — [name, owner, amount, reason for each]
*Lost this week:* [N] deals, $[total] — [name, owner, amount, reason]
*Advanced:* [N] deals — [name, owner, old stage → new stage, amount]
*New:* [N] deals, $[total] — [name, owner, amount, stage]
*At risk (stalled past expected close):* [N] deals, $[total] — [name, owner, amount, days past close]
Keep the LLM temperature low (0.2 or lower) so the structure stays stable. No branching, no reasoning about what to include — the code decides which deals are in which bucket, Groq only formats.
Step 4 (Slack Bot Send a Message). Post the returned markdown to a configurable leadership Slack channel via the Slack Bot Send a Message operation. Slack mrkdwn (single-asterisk bold) is what the LLM should emit, so the recap lands with proper formatting.
Handle empty weeks gracefully: if all buckets are empty, still post a short "Quiet week — no closed or advanced deals" note rather than skipping.
What it does
- Pulls every HubSpot deal touched in the last 7 days along with owner, stage, amount, close date, and any custom won/lost reason
- Groups them into five buckets: newly created, advanced a stage, won, lost, and stalled past their expected close date
- Writes a short narrative recap in the same structure every week so leadership learns to skim it in 30 seconds
- Posts the finished recap to your chosen Slack channel automatically every Friday afternoon
What you’ll need
- A HubSpot account you can connect
- A Slack workspace and the channel you want the recap sent to
- A Groq account (used to write the recap quickly and cheaply)
How to customize it
- Change the day or time (e.g. Monday at 8am instead of Friday at 4pm)
- Point it at a different Slack channel, or add a second post for a regional leadership channel
- Adjust which buckets are highlighted, or add custom deal fields like win/loss reason to the recap
Use cases
- Daily Digests
- AI Reports