Post a Slack alert when a new HubSpot deal is created

By General Input

Every time a deal is created in HubSpot, drop a formatted card into your sales Slack channel so the whole team sees the win without anyone announcing it.

Integrations

  • HubSpot
  • Slack Bot

Type

Deterministic Code

Categories

  • Sales

Build a code workflow that posts a formatted Slack card to our sales channel every time a new deal is created in HubSpot, so the team gets shared visibility on wins without anyone manually announcing them.

Trigger: incoming webhook from HubSpot on the deal.creation event. The webhook payload includes the deal's objectId, which is what the workflow uses to load the full record.

Steps:

1. Parse the webhook payload and pull out the new deal's objectId.

2. Call HubSpot Get Deal for that objectId. Request the properties dealname, amount, dealstage, pipeline, hubspot_owner_id, and closedate. Include associations to contacts and companies so the primary contact and company come back in the same response.

3. If the deal has an associated company, resolve its name and domain. If it has an associated contact, resolve the contact's first name, last name, and email. If hubspot_owner_id is set, resolve the owner's name and email so the message can credit them.

4. Pick a leading emoji based on the amount band. Default thresholds: under 5,000 is a small deal (use a small emoji like a seedling), 5,000 to 49,999 is mid (use a chart-rising emoji), 50,000 and above is big (use a rocket or money-bag emoji). Make these thresholds easy to edit at the top of the workflow.

5. Format a deterministic Slack message using Block Kit. The card should include: a header line with the band emoji and deal name, the amount formatted with currency and thousands separators, the pipeline stage label, the deal owner's name, the primary contact's name and email, the company name and domain, and a button or link that deep-links to the deal in HubSpot at https://app.hubspot.com/contacts/{portalId}/deal/{dealId}. Fall back gracefully if any of these fields are missing rather than printing 'undefined'.

6. Use Slack Bot Send a Message to post the formatted card to a configurable channel (default to the sales channel ID stored as a workflow variable). Set unfurl_links and unfurl_media to false so the HubSpot link does not balloon the message.

Keep the flow strictly deterministic. No LLM calls. No retries beyond standard transient-error handling. If the HubSpot fetch fails, log and exit cleanly so we do not double-post on retry.

Expose the following as configurable variables: Slack channel ID, currency code (default USD), small/mid/big amount thresholds, and the HubSpot portal ID used to build the deep link.

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 reasoniMessage campaign console with pre-flight checks and delivery boardLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsA searchable RFP answer library your bid team drafts fromLinkedIn Ads budget pacing dashboard for every client account