Post a custom deal-won celebration card in Slack

Every time a HubSpot deal closes won, generate a branded celebration card with the customer name and amount, then drop it into your wins channel.

Deterministic Code
HubSpotGenerate ImageSlackSalesOperationsNotifications & AlertsContent Generation
PromptCreate

Build a code workflow that posts a personalized celebration card to our #wins Slack channel every time a HubSpot deal closes won. The whole chain is deterministic: webhook in, three CRM fetches, one image generation, one file upload, one message. Use these integrations: HubSpot, Generate Image, Slack.

Trigger: a HubSpot webhook for deal property changes, filtered to deal stage transitions where the new stage is closed-won (the closed-won stage in the deal's pipeline). The webhook payload gives us the deal id.

Step 1 - HubSpot Get Deal: fetch the deal by id and request the properties dealname, amount, dealstage, pipeline, closedate, and hubspot_owner_id, plus associations to companies and contacts.

Step 2 - HubSpot Get Company: take the first associated company id from step 1 and fetch it, requesting properties name, domain, and industry.

Step 3 - HubSpot Get Contact: fetch the deal owner if hubspot_owner_id is set (use the owners endpoint to resolve the owner's name and email), otherwise fall back to the first associated contact id from step 1 and fetch it with properties firstname, lastname, and email.

Guard rail: if any of the three lookups returns null or the deal has no associated company, the workflow should no-op cleanly and exit without posting anything. Do not generate a half-personalized card.

Step 4 - Generate Image: call Generate an Image with aspect ratio 16:9. Keep the prompt structure stable across runs so every card feels like part of one consistent series. Template: a celebratory branded card that prominently displays the company name from step 2, the deal name from step 1, and the closing amount from step 1 formatted as a currency value. Use a clean modern style with confetti or rising-line motifs, our brand colors, large readable typography, no stock-photo people, and leave whitespace for Slack feed display. The image comes back as imageBase64 plus mimeType.

Step 5 - Slack Upload a File: decode the base64 image and upload it into the #wins channel using Slack's 3-step upload flow (files.getUploadURLExternal then upload bytes then files.completeUploadExternal). Filename should include the company name and the date so files are searchable.

Step 6 - Slack Send a Message: post a short caption to #wins as a follow-up message that tags the deal owner by Slack user (look up their Slack user id by matching the HubSpot owner email to a Slack user via users.lookupByEmail). Caption template: a one-line congrats that includes the customer company name, the deal name, the amount, and an @-mention of the owner. Keep it punchy and on-brand, two sentences max.

Make the channel name (#wins) and the brand styling in the image prompt easy to edit at the top of the workflow so the team can tweak them without touching the rest of the code. Log each step with the deal id so failures are easy to trace.

What does this prompt do?

  • Watches HubSpot for any deal that moves to closed-won and kicks off automatically.
  • Pulls the company, the deal details, and the deal owner so the card is fully personalized.
  • Generates a fresh 16:9 celebration graphic with the customer name, deal name, and closing amount.
  • Posts the card into your wins channel in Slack with a short caption that tags the rep who closed it.

What do I need to use this?

  • A HubSpot account where you can turn on a webhook for deal stage changes.
  • A Slack workspace and a channel for sharing wins (for example #wins).
  • Permission to connect both accounts to General Input.

How can I customize it?

  • Change the Slack channel, or fan out to multiple channels for different segments.
  • Tweak the visual style of the card so every win looks like part of one consistent series.
  • Adjust the caption template, including who gets tagged and what extra context shows up.
  • Choose which deal pipelines or amount thresholds qualify for a celebration card.

FAQs

Does this work for every deal that closes, or only certain ones?
Out of the box it fires for any deal that moves into your closed-won stage. You can narrow it to a specific pipeline, deal owner, or minimum amount when you customize it.
What happens if a deal is missing a company or contact?
The workflow skips quietly instead of posting a half-personalized card. You will not get a celebration graphic until the deal record has the company and owner filled in.
Can I change the look of the celebration card?
Yes. The image prompt is part of the workflow, so you can lock in your brand colors, style, and layout so every card feels like part of one consistent series.
Will the deal owner get tagged in Slack?
Yes. The caption that goes with the image tags the rep who closed the deal so the whole team can react and celebrate.
Can I post into more than one Slack channel?
Yes. Duplicate the posting step or branch it on deal size or pipeline so big wins land in a leadership channel and the rest land in the team channel.

Related templates

Call overdue Xero customers with an AI collections agent

Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.

LiveKit
Xero
Deepgram
+2
Agentic Task
Win back LiveChat visitors whose chats went unanswered

Every couple of hours we find the chats your team never answered, email those visitors a real reply, and hand the sensitive ones to a support lead.

LiveChat
Gmail
Slack
Agentic Task
Turn Mailjet email clicks into ranked HubSpot follow-ups

Twice a day we spot the people clicking your pricing and demo pages, create a follow-up task for their owner, and post a ranked recap to Slack.

Mailjet
HubSpot
Slack Bot
Agentic Task
iMessage campaign console with pre-flight checks and delivery board

Build every text campaign in one screen: check who is actually reachable, see a realistic send plan, then watch delivery land row by row.

LoopMessage
Google Sheets
HubSpot
App
Chat quality review board for LiveChat support leads

Score last week's finished live chats against one rubric, let an AI grader draft the notes with quotes, and send coaching straight to the agent.

LiveChat
Slack
General Input Database
App
A searchable RFP answer library your bid team drafts from

Every proposal you have ever submitted in one searchable archive, with the closest past answers lined up against each question in a new RFP.

General Input Storage
General Input Database
Mistral AI
+2
App

Make every closed-won feel like a moment.

Connect HubSpot and Slack once, and every deal that closes turns into a custom card in your wins channel automatically.