# Spin up a OneDrive client workspace when a HubSpot deal closes won

> Every time a HubSpot deal moves to Closed Won, scaffold a full OneDrive client folder, share it with the deal owner, and announce the new client in Slack.

- Workflow type: agent
- Services: HubSpot, Microsoft OneDrive, Slack
- Categories: Sales, Operations
- Published: 2026-07-02

## What it does

- Watches HubSpot for deals moving into Closed Won and reacts within seconds, no manual handoff required.
- Creates a tidy client folder in OneDrive with a standard subfolder set (Contracts, Invoices, Deliverables, Kickoff, Communications).
- Seeds the Kickoff folder with your project brief and kickoff checklist by copying from a template folder you point it at.
- Shares the new folder with the deal owner, posts a short new-client announcement in your Slack ops channel, and logs the folder link back on the HubSpot deal so the CRM stays the source of truth.

## What you'll need

- A HubSpot account with access to deals, companies, owners, and notes.
- A Microsoft OneDrive or SharePoint account with a Clients root folder and a Templates folder that holds your kickoff assets.
- A Slack workspace and a channel where the team wants new-client announcements posted.
- The name of the pipeline stage that means Closed Won in your setup, plus any pipelines you want to exclude (like a testing pipeline).

## Prompt

Build an agent workflow that scaffolds a full client workspace in OneDrive whenever a HubSpot deal moves to Closed Won, then announces the new client in Slack and logs the folder link back on the deal in HubSpot.

Trigger: a HubSpot webhook for a deal stage change where the new stage is Closed Won. Ignore events from any pipeline the user marks as a test or sandbox pipeline. Skip firing if the same deal has already been scaffolded (checked via the OneDrive folder lookup below and/or a marker note on the deal).

Step 1. Gather the deal context in HubSpot. Use Get Deal on the incoming deal id and pull in company, primary contact, and owner associations. Then Get Company for the associated company to grab the client name (and domain, if available). Then List Owners to look up the deal owner's email address from the owner id on the deal. Capture: client company name, deal amount, close date, deal owner name and email, and primary contact name and email.

Step 2. Decide where the client folder should live in OneDrive. The user will configure a Clients root folder (either their personal OneDrive, a shared drive, or a SharePoint site) and a Templates folder that contains a project brief and a kickoff checklist. Sanitize the company name into a safe folder name (strip legal suffixes like Inc/LLC only if the user asks, trim, replace unsafe characters).

Step 3. Dedupe before creating. Use List Children on the Clients root and compare against the sanitized client folder name. If a folder with that name already exists, do not create a new one and do not append (2). Use the existing folder for the rest of the run so re-runs are idempotent.

Step 4. Scaffold the folder tree in OneDrive. If the client folder does not exist yet, Create Folder for the top-level client folder under the Clients root. Then Create Folder for each of these standard subfolders inside it: Contracts, Invoices, Deliverables, Kickoff, Communications. Keep this subfolder set easy to edit in one place so users can add Legal or drop Communications.

Step 5. Seed the Kickoff folder from templates. Use Copy Item to copy the project brief and the kickoff checklist from the Templates folder into the new client's Kickoff subfolder. If the copies already exist (idempotent re-run), leave them alone.

Step 6. Share the folder with the deal owner. Use Create Sharing Link on the top-level client folder to get a shareable URL, and use Add Permissions (Invite) to send a sharing invitation to the deal owner's email so they get a proper notification and edit access.

Step 7. Announce in Slack. Use Send a Message in Slack to post to a project ops channel that the user configures. Keep it short: new client name, deal amount, close date, deal owner, and a link to the OneDrive folder. Use Slack mrkdwn formatting for the link.

Step 8. Log back to HubSpot. Use Create Note on the deal recording the OneDrive folder URL and a one-line summary of what was scaffolded, so the CRM remains the source of truth for where the client workspace lives.

Configuration surface (things the user will set once): Clients root folder (drive/site + folder), Templates folder, subfolder set, Slack channel for announcements, pipelines to include, and any deal filters (e.g. minimum amount). Make these easy to change without re-authoring the workflow.

Non-goals: do not create the HubSpot deal, do not modify deal stage, do not send any external emails to the client, and do not touch any subfolders beyond the ones listed.

## How to customize

- Change the subfolder set. Add Legal or Onboarding, drop Communications, or rename anything to match how your team actually organizes client work.
- Swap the announcement destination. Post to a different Slack channel, DM the deal owner directly, or add a second message for your delivery lead.
- Filter which deals qualify. Only fire for specific pipelines, a minimum deal amount, or deals with a custom property set, so test deals and internal work stay out of the flow.

## FAQ

### Will it create duplicate folders if the deal moves in and out of Closed Won?

No. Before creating anything, the agent looks for an existing folder that matches the client name in your Clients root. If it finds one, it skips the scaffolding and just makes sure the deal has the folder link logged. Re-runs stay safe.

### Can I point it at SharePoint or a Teams document library instead of my personal OneDrive?

Yes. Tell the agent which shared drive or SharePoint site to use and it will build the client folders there. Everything works the same way, just in a place the whole team can see.

### What if I update my kickoff templates later?

The agent copies from whatever Templates folder you point it at every time it runs. Update the source files and every new client automatically picks up the latest versions.

### How does the deal owner get access to the folder?

The agent sends a Microsoft sharing invitation to the deal owner's email address, so they get a link and land in the folder with edit access as soon as the workspace is ready.

### Can I skip test deals or deals under a certain size?

Yes. Add a filter on pipeline, deal amount, or any custom property. The agent will ignore anything that doesn't match, so only real production wins trigger a scaffold.

Use this prompt in General Input: https://www.generalinput.com/prompts/spin-up-a-onedrive-client-workspace-when-a-hubspot-deal-closes-won