Turn HubSpot deal stage changes into a Microsoft To Do action plan
Every time a HubSpot deal moves stages, an agent reads the deal context and drops 3 to 5 next-step tasks into the owner's Microsoft To Do list.
Build me an agent workflow that turns HubSpot deal stage changes into a stage-aware action plan in Microsoft To Do for the deal owner.
Trigger: an incoming webhook from HubSpot. HubSpot is configured to send an outgoing webhook whenever a deal's dealstage property changes. The payload includes the dealId and the new stage. The workflow should fire once per stage change.
On each fire, the agent should:
1. Use HubSpot Get Deal on the dealId from the webhook, requesting the dealname, dealstage, pipeline, amount, closedate, hubspot_owner_id properties, and the associated primary contact and primary company. If the stage is one the user does not care about, exit early.
2. Use HubSpot Get Owner on hubspot_owner_id to get the owner's name and email. Use HubSpot Get Contact on the primary contact id to get their name, title, and email. (If the deal has an associated company, the company name and domain from the Get Deal associations are enough; do not make a separate company call unless the agent needs more.)
3. Reason about what actually moves a deal forward from THIS specific stage, given THIS deal's context (who the contact is, what company they work at, deal size, close date). Examples to follow the spirit of, not copy verbatim: on 'Decision Maker Bought-In', tasks might be 'Send security questionnaire to the contact's IT team', 'Draft mutual action plan with the contact', 'Schedule procurement intro'. On 'Closed Lost', tasks are cleanup-flavored: 'Log loss reason on the deal', 'Add the contact to a 90-day re-engage list', 'Thank-you note to the champion'. Keep it to 3 to 5 tasks. Stage-appropriate. No generic sales playbook filler.
4. In Microsoft To Do, find or create a task list named after the deal (e.g. the dealname). First List Task Lists to check whether one already exists with that name; if not, Create Task List. The list belongs to the deal owner's Microsoft To Do account (the workflow runs as the user who connected Microsoft To Do; if multi-owner support is needed, document that as a limitation).
5. For each of the 3 to 5 next-step tasks, call Create Task in that list with a clear title, a one-sentence body that names the contact/company, and a sensible due date (default: 2 business days out for early-stage tasks, same-day or next-day for urgent stages like procurement intro). For any task with obvious sub-steps, add Create Checklist Item entries (e.g. 'Pull the latest SOC 2 report', 'Attach to the email', 'Send'). On every task, Create Linked Resource pointing back to the HubSpot deal URL (https://app.hubspot.com/contacts/{portalId}/deal/{dealId}) so the owner can jump from To Do straight to the deal.
6. Idempotency: if the same stage fires twice for the same deal (e.g. someone toggled the stage), do not duplicate tasks. Check the existing tasks in the list first and skip ones whose title already exists.
Style rules for the generated tasks: write them like a senior AE would write them, not like a template. Reference the contact by name and the company by name where it helps. Keep titles short and verb-led. No 'Follow up with prospect' filler.
Integrations: HubSpot (Get Deal, Get Owner, Get Contact) and Microsoft To Do (List Task Lists, Create Task List, Create Task, Create Checklist Item, Create Linked Resource). Trigger type: webhook.
Additional information
What does this prompt do?
- Watches your HubSpot deals and runs the moment one moves to a new stage.
- Reads the deal, the primary contact, the company, and the owner so the tasks reflect what is actually happening.
- Writes a short, stage-specific action plan, 3 to 5 tasks, into a per-deal list in Microsoft To Do.
- Adds checklist sub-steps and a link back to the HubSpot deal on every task so the owner can jump straight in.
What do I need to use this?
- A HubSpot account with permission to read deals, contacts, companies, and owners.
- A Microsoft account with Microsoft To Do enabled (Microsoft 365 personal or work).
- The deal owner field in HubSpot set, so we know whose To Do list to write into.
How can I customize it?
- Choose which stages should trigger tasks, for example only later-stage moves, or every stage.
- Tune the style of tasks the agent writes for each stage, such as security review steps on Decision Maker Bought-In, or cleanup steps on Closed Lost.
- Change the due-date logic, for example 2 business days for early stages and same-day for hot stages.
- Decide whether to create one list per deal, one list per pipeline, or append to a single Sales list.
Frequently asked questions
Does this replace the generic one-task-per-stage automations?
Will it spam my To Do list?
What if a deal moves stages twice in one day?
Can the owner click straight from a task to the HubSpot deal?
Does it work for any pipeline or just the default one?
Stop guessing what to do next after a deal moves stages.
Connect HubSpot and Microsoft To Do once, and every stage change becomes a clear 3 to 5 task action plan for the deal owner.