Brief every new HubSpot deal with your past Mem notes

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.

Deterministic Code
HubSpotMemSalesLead EnrichmentAI ReportsMeeting Workflows
PromptCreate

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.

What does this prompt do?

  • Watches HubSpot for new deals and triggers the moment one is created.
  • Reads the deal, its associated company, and primary contact so we know who to look up.
  • Searches your Mem notes for everything you have written about that company and contact.
  • Writes a short brief covering what you already know, prior conversations, and open questions to ask, then pins it to the HubSpot deal and saves a copy in a Mem collection.

What do I need to use this?

  • A HubSpot account with permission to read deals, companies, and contacts and to create notes on records.
  • A Mem account with an API key from Settings, used to search your existing notes and save the new brief.
  • At least a few past notes in Mem about the companies or people you sell to (the workflow skips when there is nothing to pull from).

How can I customize it?

  • Change which Mem collection the brief is filed under, for example a per-rep collection or a per-quarter collection.
  • Tweak the brief's section headings to match how your team preps for first calls, such as adding a competitor section or a budget signals section.
  • Cap the search to the top 10 notes by default and raise or lower that depending on how dense your Mem library is.

FAQs

What happens if I have no past notes in Mem about the company?
The workflow checks the search results first. If nothing comes back, it skips quietly so your deal timeline does not get cluttered with empty briefs.
Does this work with HubSpot Free?
Yes. The workflow only needs basic CRM read and note write permissions, which are included in every HubSpot tier.
Will the brief appear on the deal itself or on the company?
The brief is created as a note and pinned to the deal so it shows up on the deal timeline. The Mem copy keeps a back-link to that same HubSpot deal.
How fast does the brief appear after a new deal is created?
HubSpot is polled on a short interval, so most briefs appear within a couple of minutes of the deal being created.
Can I use this with another note tool instead of Mem?
This template is wired specifically to Mem because of how its semantic search surfaces past context. You could swap in a different knowledge tool, but you would need to recreate the search and save steps for that tool.

Related templates

Client-by-client cold email pipeline review for agencies

Pick a client and a date range to see sent, replies, meetings booked and the real deal value your cold email produced, campaign by campaign.

Instantly
HubSpot
Slack Bot
App
Partner tier review board for quarterly promotion calls

Work every partner tier decision from one board, with the revenue and commission numbers, clear promotion thresholds, and AI review briefs.

Introw
HubSpot
Slack
App
Reconcile partner commissions between HubSpot and Introw

Open one board at month end to find every closed deal missing a commission, every commission with no deal behind it, and every amount that does not add up.

Introw
HubSpot
Slack
App
Hiring signal board for your customers and open pipeline

Open one board each morning to see which of your accounts are hiring, what they are building, and where your product fits the roles they just opened.

JobsPipe
HubSpot
App
Placement pricing desk for recruiting and staffing agencies

Open a live deal, see the market pay range for that role and city, set your markup, and write the agreed numbers straight back onto the deal.

Job Salary Data
HubSpot
App
Instagram comment and DM triage inbox for your team

Work every unanswered Instagram comment, Reel reply and Direct message from one queue, with claimed rows so two people never answer the same person.

Instagram
HubSpot
Slack Bot
App

Stop digging through your second brain before every sales call.

Connect HubSpot and Mem once, and Geni quietly prepares a context brief for every new deal that lands in your pipeline.