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

By General Input

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.

Integrations

  • HubSpot
  • Microsoft OneDrive
  • Slack

Type

Agentic Task

Categories

  • Sales
  • Operations

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.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredTurn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationLusha prospecting workbench with credit-safe reveals