Hand off HubSpot closed-won deals to Loops and Slack
When a HubSpot deal moves to Closed Won, add the new customer to Loops, kick off the right onboarding sequence, and ping your CS team in Slack.
Build me a sales-to-customer-success handoff that fires whenever a HubSpot deal moves to the Closed Won stage. It should seed the new customer in Loops, kick off the onboarding sequence, and ping our CS team in Slack.
Trigger: a webhook from HubSpot on deal stage change. Only run the flow when the new stage is closedwon (default sales pipeline) so we don't fire on every stage move.
On each fire, run this sequence:
1. HubSpot Get Deal by ID. Request the deal amount, our plan_tier property, industry, close date, and the deal owner, plus the associated primary contact. If the deal has more than one contact associated, use the primary one.
2. HubSpot Get Contact for that primary contact. Pull email, first name, last name, job title, and company name.
3. Loops List Mailing Lists. Find the mailing list named "Customers" and grab its ID so we can subscribe the new customer to it.
4. Loops Update Contact (upsert) using the contact's email as the identifier. Set firstName, lastName, and put company name and job title on the contact. Then include custom top-level camelCase properties: planTier, dealAmount, industry, and companySize when we have it. In the mailingLists object, set the Customers list ID to true so we subscribe them. Remember that custom properties are top-level camelCase keys, not nested under a "properties" object, and mailingLists is an object mapping list ID to boolean (never the list name).
5. Loops Send Event to kick off the pre-built onboarding sequence. Pick the event name by deal amount: if the amount is at or above $25,000, use customer_onboarding_started_enterprise; otherwise use customer_onboarding_started_smb. Pass plan tier and deal owner name as event properties so the Loops sequence can personalize. Include an Idempotency-Key header derived from the HubSpot deal ID (for example the deal ID itself) so a webhook retry does not re-fire the onboarding sequence.
6. Slack Send a Message (as the bot) to our #cs-handoffs channel. Summarize the deal: name, amount, plan tier, industry, close date, deal owner (call them out by @-mention if you can resolve the Slack user by email, otherwise plain name), and primary contact (name, title, email). Include a link back to the HubSpot deal record and a link to the HubSpot contact record. Close the message with a one-line reminder of what the first onboarding email will do so CS knows what the customer is about to see.
Guardrails the agent should apply on its own:
- If the deal has no primary contact, or the contact has no valid email, skip both the Loops upsert and the Loops Send Event so we don't create an orphan customer. Still post the Slack message, but flag it clearly at the top (something like "heads up: no contact email on this deal, CS please gather it before starting onboarding").
- If the deal amount is missing or unparseable, default to the SMB event name rather than skipping the fire.
- Never re-fire the Loops event for the same deal close. The Idempotency-Key tied to the deal ID enforces this, and the agent should not remove it on retry.
- Read the amount in USD; if HubSpot returns a different currency, note it in the Slack message but still use the numeric amount for the enterprise-versus-SMB decision.
Additional information
What does this prompt do?
- The moment a deal moves to Closed Won in HubSpot, the new customer is added to Loops with their name, company, plan tier, deal size, and industry.
- They get subscribed to your Customers mailing list and dropped into the right onboarding sequence, with a different path for enterprise deals versus SMB deals.
- Your Customer Success channel in Slack gets a clean handoff message with the deal owner called out, the plan tier, and links back to the HubSpot deal and contact.
- If the deal is missing a contact email, we skip Loops so no orphan record is created, but still ping Slack so CS can chase the missing detail.
What do I need to use this?
- A HubSpot account where your sales team is closing deals (with contacts associated to each deal).
- A Loops.so account with a Customers mailing list and an onboarding email sequence already set up.
- A Slack workspace and a channel where your CS team wants to see new customer handoffs.
How can I customize it?
- Change which HubSpot deal stage triggers the handoff, so it also runs on renewals, expansions, or upgrades.
- Adjust the deal-amount threshold that splits the enterprise onboarding path from the SMB one, or add a mid-market tier.
- Point the Slack notification at a different channel, add extra fields like MRR or industry, or route enterprise handoffs to a dedicated channel.
Frequently asked questions
What happens if a Closed Won deal has no contact email?
Will this create duplicates in Loops if the same deal closes twice?
Can I pick which Loops mailing list customers get added to?
Does this work with any HubSpot pipeline, not just the default sales pipeline?
How do I switch which onboarding sequence gets fired?
Related templates
Stop dropping new customers between sales and CS.
Connect HubSpot, Loops, and Slack once, and every Closed Won deal kicks off the same clean, tiered handoff without anyone lifting a finger.