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.

Deterministic Code
HubSpotGroqSlack BotSalesDaily DigestsAI Reports
PromptCreate

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.

Additional information

What does this prompt do?
  • 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 do I need to use this?
  • 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 can I 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

Frequently asked questions

Which HubSpot plan do I need?
Any HubSpot tier that includes the Deals object works, including Starter. The recap uses your standard deal fields (name, stage, amount, owner, close date) plus any custom won/lost reason fields you already track.
Can we run this daily instead of weekly?
Yes. The schedule and the 'last 7 days' window are both easy to adjust when you set the workflow up. A daily standup version or a monthly board version both work.
How does it know which deals are stalled?
A deal is flagged as stalled when it hasn't been touched in the past 7 days and its expected close date has already passed. You can widen or narrow that threshold.
Can we send the recap to more than one Slack channel?
Yes. Duplicate the Slack step and point each copy at a different channel, or send a shortened version to one channel and the full narrative to another.
Why use Groq for the writeup?
Groq is fast and inexpensive for structured text generation, so the whole workflow finishes in a few seconds and costs almost nothing to run week after week.

Stop hand-writing the Friday pipeline update.

Automate the weekly deal-motion recap and send a clean written summary to leadership without lifting a finger.