Spin up a Box customer workspace when a HubSpot deal closes won
The moment a deal flips to Closed Won in HubSpot, build the customer's Box folder set, log the link on the deal, and ping the owner in Slack.
Build me an agent workflow that fires whenever a HubSpot deal moves into the Closed Won stage. Use a HubSpot webhook on the deal stage-change as the trigger so it runs the moment a deal closes.
When the workflow fires, here is exactly what I want the agent to do:
1) Pull deal context from HubSpot. Use Get Deal to retrieve the deal name, amount, owner ID, and the associated company. Then use Get Company on that association to grab the company name, and Get Owner on the deal owner so we have the owner's name and email.
2) Find or create the customer folder in Box. I have a top-level Customers parent folder in Box (its folder ID should be a configurable input). Use Box List Folder Items on that Customers folder to check whether a subfolder already exists with the same name as the company. If one exists, reuse it. If not, call Box Create Folder under the Customers parent, named exactly after the company.
3) Inside that customer folder, ensure a consistent set of subfolders exists: Contracts, Onboarding, Invoices, Shared with Customer, Internal. Use the same find-or-create pattern so re-running the workflow on the same deal never produces duplicates. Only create what is missing.
4) Call Box Add Shared Link to Folder on the top-level customer folder with company-only access, and capture the resulting shared URL. (Make the access level easy to swap later, e.g. company-only vs anyone-with-link.)
5) Back in HubSpot, use Create Note associated with the deal. The note body should include the Box workspace shared URL plus a short breakdown of the subfolders inside it (which ones were just created and which already existed), so anyone opening the deal can jump straight into the right place.
6) If the deal owner has an email, send the owner a Slack message via Send a Message. The message should include the deal name, the deal amount, and the Box workspace link, with a one-line nudge to drop kickoff materials into Shared with Customer. Keep the tone like a friendly handoff, not a robotic alert. If there is no owner or no owner email, skip the Slack step quietly and let the rest of the workflow succeed.
Important nuances to bake in:
• Never create a duplicate customer folder. Always check for an existing folder with that exact company name in the Customers parent first and reuse it. Treat the subfolder set the same way.
• Skip the Slack ping if the owner has no email; the Box folder and the HubSpot note must still complete.
• Make the following easy to edit later: the Customers parent folder ID in Box, the list of standard subfolders, the Slack shared link access level, and whether the Slack heads-up also goes to a sales handoff channel in addition to the owner.
Additional information
What does this prompt do?
- Watches HubSpot for any deal that moves into Closed Won.
- Creates a new customer folder in Box, with your standard subfolders inside it (Contracts, Onboarding, Invoices, Shared with Customer, Internal).
- Reuses the existing folder if you already have one for that customer, so re-runs never make duplicates.
- Writes the shareable Box link back onto the deal as a HubSpot note so the whole team can find it.
- Sends the deal owner a friendly Slack message with the deal name, amount, and folder link so they can drop kickoff materials in right away.
What do I need to use this?
- A HubSpot account where deals move through a pipeline to Closed Won.
- A Box account with a top-level Customers folder (or any parent folder you want new client workspaces to live under).
- A Slack workspace, so deal owners can be pinged on each win.
- Your preferred subfolder list, if it differs from the default Contracts, Onboarding, Invoices, Shared with Customer, Internal.
How can I customize it?
- Rename or reorder the standard subfolders that get created inside every customer workspace.
- Choose where the Slack heads-up goes: just the deal owner, a sales handoff channel, or both.
- Adjust the Box shared link access level, from company-only to anyone with the link, or add a password.
- Change which HubSpot fields land in the deal note (e.g. include the close date, products, or contract value).
Frequently asked questions
What if a Box folder for that customer already exists?
What happens if the HubSpot deal has no owner or no owner email?
Can I change which subfolders get created inside each customer workspace?
Where does the Box link end up in HubSpot?
Does this only run on brand new deals, or can I also re-trigger it for older ones?
Stop scrambling to set up customer workspaces.
Connect HubSpot, Box, and Slack once. Every Closed Won deal turns into a ready-to-go customer folder with the link sitting on the deal and the owner already notified.