Send a GitBook onboarding kit when a HubSpot deal closes won

By General Input

The moment a deal hits closed won, draft a warm welcome email in Gmail with the 3 to 5 GitBook pages that actually fit what they bought.

Integrations

  • HubSpot
  • GitBook
  • Gmail

Type

Agentic Task

Categories

  • Sales
  • Customer Support

Build me an agent workflow that turns every closed-won HubSpot deal into a personalized onboarding email, drafted from our GitBook docs, ready for the AE or CSM to review and send.

Trigger: a HubSpot webhook on deal property change. Fire when a deal's stage moves into our closed-won stage (let me configure which pipeline and stage qualifies). Ignore stage changes that don't land on closed won.

When it fires, the agent should:

1. Use HubSpot Get Deal on the deal ID from the webhook, requesting associations to the company and the primary contact, plus deal properties that describe what they bought (product line or line items, amount, segment, and any free-text notes that describe their use case).

2. Use HubSpot Get Company on the associated company to pull industry, size, and any segment or vertical fields we track. Pull the primary contact's first name, last name, and email from the contact association.

3. From all of that, synthesize a short internal picture of the customer: who they are, what they bought, and the specific use case in their own words where possible.

4. Use GitBook Search Site Content against our docs site to find candidate onboarding pages. Run a few targeted searches keyed off the product line, the use case, and the segment, not one broad query. For the top hits, call GitBook Get Page By ID to confirm the page actually matches before recommending it. Pick the 3 to 5 pages that best fit this customer, and explicitly skip generic content that doesn't apply to what they bought.

5. Use Gmail Create a Draft, sent from the deal owner's Gmail account, addressed to the primary contact. The email should be short and warm: a one-sentence congrats and intro that references their use case in their own words, then a curated Start Here list of the chosen GitBook pages. Each link gets one sentence on why that specific page matters for this customer. Close with an offer to help and the AE's signature.

Leave the email as a draft in the AE's Gmail. Do not auto-send. The whole point is that the AE or CSM does a quick read, tweaks anything off, and sends it themselves.

Edge cases: if the deal has no primary contact, no company, or no use case context at all, skip drafting and flag it instead of sending a generic email. If GitBook search returns nothing relevant, do the same. I would rather miss one than send a bad first impression.

Make the closed-won stage, the pipeline, the GitBook site to search, the sender mailbox, and the tone of the email configurable when I set this up.

Related prompts

Explore more prompts
Win back LiveChat visitors whose chats went unansweredTurn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardA 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 conversationChase the paperwork every new client and vendor still owesLusha prospecting workbench with credit-safe revealsWhich companies your LinkedIn ads reach, matched to your CRM