Enrich new HubSpot contacts with their PubMed research profile

When a new contact lands in HubSpot, Geni searches PubMed for their publications and attaches a research profile note to the record.

Agentic Task
HubSpotPubMed / NCBI E-utilitiesSalesOperationsLead EnrichmentResearch & Monitoring
PromptCreate

Build me an agent workflow that enriches every new HubSpot contact with their PubMed publication footprint. This is for a life sciences sales / MSL team selling to HCPs, scientists, and biotech employees.

Trigger: an incoming webhook from HubSpot configured to fire on the contact.creation event. The webhook payload will include the new contact's vid / object id.

When the agent runs, it should:

1. Read the contact from HubSpot using Get Contact, pulling firstname, lastname, company, jobtitle, and any institution field we expose. If firstname or lastname is missing, write a short "insufficient info to enrich" note and stop.

2. Search PubMed using ESearch with &retmode=json. Build the author term as `Lastname FI[au]` from last name and first initial. When the contact has a company or institution, AND in an affiliation tag like `"<institution>"[ad]`. Sort by most recent. Pull the top 5 to 8 PMIDs.

3. Call ESummary with &retmode=json on those PMIDs to get title, journal, authors, publication year, and identifiers. Then call EFetch to retrieve the abstract XML for the same PMIDs so the agent has enough context to characterize the person's work and judge whether it is really them.

4. Decide a match confidence (high / medium / low). Bias hard toward false negatives. Author disambiguation is the real risk because last names are not unique. Only commit to high or medium when affiliation, focus area, and recency line up.

5. Compose a structured research profile note containing: confirmed match confidence, inferred research focus areas (2 to 4 short phrases), top 3 most recent matching publications with title, journal, year, and a https://pubmed.ncbi.nlm.nih.gov/<PMID>/ link, and one outreach hook sentence tying their recent work to a plausible reason a rep would reach out.

6. Write the note back via HubSpot Create Note, associated to the contact id from the webhook. If confidence is low, skip the publications and the outreach hook entirely. The note body should just say "no confident PubMed match for <name> at <affiliation>" so reps know enrichment ran but found nothing trustworthy.

Important notes for the build: PubMed needs &retmode=json on ESearch and ESummary; EFetch for PubMed returns XML. Always send the NCBI api_key and email on every request. Keep the note plain text or simple markdown so it renders cleanly on the HubSpot timeline.

Additional information

What does this prompt do?
  • Listens for every new contact created in HubSpot and runs the moment they appear.
  • Searches PubMed for that person's publications, biased toward their institution or company affiliation so you don't get a random namesake.
  • Writes a structured research profile note onto the contact record, with confidence level, focus areas, top three recent papers, and a one-sentence outreach hook.
  • When the match is uncertain, leaves a short note saying so instead of attaching the wrong person's work.
What do I need to use this?
  • A HubSpot account with permission to read contacts and write notes.
  • A free NCBI account so PubMed searches don't get rate limited.
  • A HubSpot workflow or webhook configured to fire on new contact creation.
How can I customize it?
  • Change which contact properties count as an affiliation (company, job title, custom institution field) to sharpen the author match.
  • Tune how cautious the agent is about a confident match, especially if your reps prefer fewer false positives.
  • Adjust the structure of the note, for example to add MeSH topics, co-authors, or a clinical trial section.

Frequently asked questions

Will this misidentify people with common last names?
The agent biases toward false negatives. If it can't confidently pin papers to your contact, it skips publications and just writes a short "no confident PubMed match" note so your reps don't act on bad data.
What does the agent use to disambiguate authors?
It combines first initial and last name with the contact's company or institution when available, then sanity checks the top results against affiliation, focus area, and recency before committing.
Does this work for every HubSpot contact, or only researchers?
It runs on every new contact, but if there are no PubMed results it simply leaves a brief no match note. That is the right behavior for non scientists.
Where does the research note show up on the contact?
It is created as a standard HubSpot note associated to the contact, so it shows up in the activity timeline and is visible to anyone with access to that contact record.
Can I run this against existing contacts, not just new ones?
Yes. You can swap the trigger for a scheduled sweep over a list of contacts, or run it on demand from a chat. The enrichment logic stays the same.

Stop manually Googling every new HCP or scientist your team adds.

Connect HubSpot and PubMed once, and Geni drops a research profile on every new contact before your reps open the record.