Scaffold a SharePoint client workspace when HubSpot deals close won

By General Input

The moment a HubSpot deal flips to Closed Won, build the new client's SharePoint folder set, log it in your Clients list, and announce the win in Slack.

Integrations

  • HubSpot
  • Microsoft SharePoint
  • Slack Bot

Type

Agentic Task

Categories

  • Sales
  • Operations

Build me an agent workflow that scaffolds a new client workspace in Microsoft SharePoint and announces the win in Slack the moment a HubSpot deal moves to Closed Won.

Trigger: a HubSpot webhook on deal stage change, filtered to the Closed Won stage. The workflow should ignore any other stage transitions.

When it fires, the agent should:

1. Use HubSpot Get Deal to load the full deal record (name, amount, close date, owner, pipeline, stage, associated company and primary contact IDs). Use Get Company to load the company name, domain, and industry. Use Get Contact on the primary contact to load their name, email, and title. Use Get Owner to resolve the deal owner's name and email.

2. Pick a folder name for the client. Default rule: slugify the company name (lowercase, hyphenated, alphanumerics only). Check SharePoint first and if a folder with that name already exists under the configured parent path, append a short disambiguator (for example the HubSpot deal ID, or a numeric suffix) so we never collide.

3. In Microsoft SharePoint, use Create Folder to create the new client folder under a configured parent path on a configured site and drive. Then create a standard set of subfolders inside it: Contracts, SOWs, Invoices, Onboarding, and Communications. The subfolder set should be configurable so the team can change it later without editing the workflow.

4. Use Create List Item to add a row to a configured Clients list in the same SharePoint site. Columns to populate: Client Name, HubSpot Deal ID, Deal Value, Owner, Primary Contact, Contract Start Date, Contract End Date, and Folder URL (the web URL of the new SharePoint folder).

5. Use Slack Bot Send a Message to post a win announcement in a configured sales-ops channel. The agent should write the copy itself from the deal context. Include: company name, deal value, deal owner (mentioned by Slack handle if we can resolve them by email via the bot, otherwise by name), primary contact, contract dates if present, and a link to the new SharePoint folder. Keep it short and celebratory.

Configuration the agent should expose at setup time: the HubSpot pipeline and the exact Closed Won stage ID to listen for, the SharePoint site (by hostname and path), the parent folder path inside that site's drive, the subfolder list, the Clients list ID, and the Slack channel ID for announcements.

Quality bar: the folder, the list row, and the Slack message should all reference the same HubSpot deal ID so we can trace everything back. If any step fails (for example the SharePoint folder already exists for a different deal), the agent should fall back gracefully, log what happened, and still post a Slack message saying the win landed but the workspace needs manual review.

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