Brief every new HubSpot deal with your past Mem notes

By General Input

When a new deal lands in HubSpot, pull every relevant note from your Mem second brain and attach a clean context brief to the deal timeline.

Integrations

  • HubSpot
  • Mem

Type

Deterministic Code

Categories

  • Sales

Build a code workflow that automatically prepares a sales context brief whenever a new deal is created in HubSpot, using my Mem notes as the knowledge base.

Trigger: poll HubSpot for the deals_created event so the workflow fires every time a new deal lands in my pipeline.

Step 1. Use HubSpot Get Deal on the new deal id and pull the deal name along with its associated company and primary contact. We need the company name and the contact's full name for the searches that follow.

Step 2. Use Mem Search Notes with the company name as the primary query. Cap the results at the top 10 notes. Then run a second Mem Search Notes call using the contact's full name as a secondary query, also capped at the top 10. De-duplicate the combined note set by note id.

Step 3. If the combined, de-duplicated note set is empty, exit the workflow early. Do not create any notes in HubSpot or Mem when there is nothing to brief on.

Step 4. Pass the note snippets (title plus a short excerpt of each) through an AI generation step. The AI should produce a concise markdown brief with three headings: "What we know about this company", "Prior conversations", and "Open questions to ask on the first call". Keep the brief tight, roughly 250 to 400 words, and have it cite the source note titles inline so I can trace any claim back.

Step 5. Use HubSpot Create Note to attach the generated brief to the deal so it shows up on the deal timeline. Associate the note with the deal id from step 1.

Step 6. Use Mem Create Note to save the same brief into Mem, and use Add Note to Collection to file it under a collection titled "Sales Context Briefs" (create the collection by title if it does not already exist). Put a back-link to the HubSpot deal URL at the top of the Mem note so I can jump from my second brain to the live deal.

Treat the company name and contact name as the only required inputs into the search. Be defensive: if the deal has no associated company, fall back to searching only by contact name. If it has no contact either, exit early.

Related prompts

Explore more prompts
Turn 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 conversationLusha prospecting workbench with credit-safe revealsWhich companies your LinkedIn ads reach, matched to your CRMLead response desk with a running clock on every new leadApprove Lusha enrichment field by field before HubSpot saves it