This template is for Customer Success and Sales teams who use HubSpot. It automates the critical handoff from sales to success, ensuring every new customer gets a fast, personalized welcome. It's perfect for anyone looking to standardize their onboarding process, save time on manual tasks, and improve the new customer experience using AI.
This workflow triggers when a deal's "Is closed won" property is set to True in HubSpot. It assigns a Customer Success Manager (CSM) by querying an n8n Data Table to find the 'least busy' CSM (based on a deal count) and fetches the deal's details to find all associated contacts.
It then loops to identify the "Champion" contact by checking their "Buying Role" (hs_buying_role). An AI agent (in the AI: Write Welcome Email node) generates a personalized welcome email, which is converted to HTML and sent via Gmail. Finally, the workflow updates the Champion's contact record in HubSpot and updates the CSM's deal count in the Data Table to keep the logic in sync.
csm_assignments.csm_id (String) and deal_count (Number).deal_count of 0.Get CSM List and Increment CSM Deal Count nodes and select the csm_assignments table you just created from the Table dropdown.Configure Template Variables node, you must set your sender info (company_name, sender_name, and sender_email).AI: Write Welcome Email node, update the placeholder [Link to Your Video] and [Link to Your Help Doc] links with your own URLs.hs_buying_role) contact property to identify your "Champion". If you use a different property, you must update the HubSpot: Get Contact Details and If Role is 'Champion' nodes.Trigger: Deal Is 'Closed Won' node.Get Deal Details, Get Contact Details, Assign Contact Owner).AI Model node (the node connected to AI: Write Welcome Email).Gmail: Send Welcome Email node.You can easily customize this workflow to send different emails based on deal properties. Add an If node after the HubSpot: Get Deal Details node to check for the deal's value, product line, or region.
Based on these properties, you can route the flow to different AI: Write Welcome Email nodes with unique prompts. For example, you could check the contact's 'industry' or 'company size' to send them links to different, more relevant 'Getting Started' videos and documentation.