--- name: inbox-to-hubspot-logger description: Matches an email thread to the right CRM contact and deal, then produces a structured engagement log entry for the user to confirm, ending manual call and email logging. Use when the user shares an email thread or asks to "log this to the CRM", "log this to HubSpot", "match this email to the right deal", "capture this thread", "log this call". license: MIT compatibility: Requires a connected CRM and the email thread. Read-first — proposes the log entry, does not write silently. metadata: author: Builder.org version: 2.0.0 persona: Operator Owen rave: R3 A4 V2 E4 category: crm --- # Inbox to CRM Logger ## What it does Takes an email thread, works out which contact and deal it belongs to, and drafts a clean engagement log entry plus any implied task, for you to confirm before anything is written. The CRM stays current without anyone doing data entry, and nothing lands on the wrong record. ## When to use - "Log this to the CRM", "match this email to the right deal", "capture this thread", "log this call". - A pasted email thread with the expectation that the CRM should know about it. - Not for summarizing a meeting transcript with follow-ups; that is `meeting-follow-up-coach`. This skill's job is the match and the log. ## Inputs The email thread: sender, recipients, subject, body. Works with any CRM your assistant can read and write (HubSpot, Salesforce, or similar). Optional: a hint about which deal or company it belongs to. ## The bar - The match is the whole product, and it ships with a confidence label: high, medium, or low, with the evidence. A wrong log is worse than no log, because nobody rechecks a filled field. - Below high confidence, the skill presents candidates and asks; it never guesses silently. - The summary is log-worthy: what was discussed, what was decided, what happens next, in 3 to 5 lines. Not a paraphrase of every paragraph. - Nothing is written until the user confirms. Ever. ## Workflow 1. **Identify the participants.** Addresses, names from signatures, and domains from the thread. The external domain is the anchor; internal colleagues are noise for matching purposes. 2. **Match in the CRM.** Find the contact by email; from there the company, then the most likely deal by association, recency, and activity. Grade it: high (email matches a contact with one plausible open deal), medium (contact found, multiple plausible deals), low (no contact match, or domain-only). Medium or low: present the top candidates with one line of evidence each and ask. If you cannot ask, mark the entry "needs confirmation" and attach the alternatives. 3. **Summarize the thread** into the log entry: topic, decisions, commitments each side made, and open questions. Preserve dates and amounts exactly; a log that rounds $47,500 to "about $50k" is a future dispute. 4. **Detect the implied task.** "I'll send the revised SOW by Friday" is a task with a due date; capture owner, action, and date. No implied next step means no invented task. 5. **Propose the entry** in the output format and wait for confirmation. On confirm, write exactly what was shown, nothing more. ## Output ``` ## Proposed CRM log **Match:** [Contact] · [Company] · [Deal] · confidence: [high/medium/low] **Evidence:** [why this record, one line] **Engagement:** Email · [date of last message] **Summary:** [3-5 lines: discussed, decided, committed, open] **Suggested task:** [owner: action, due date] (or "none implied") Confirm to log, or pick another record: [alternatives, if confidence is not high] ``` ## Worked example ``` Fictional example. Never reuse these names or numbers in real output. ## Proposed CRM log **Match:** Tomas Herrera · Fieldstone Payroll · deal "Fieldstone platform ($52k)" · confidence: high **Evidence:** sender email matches the contact record; Fieldstone has one open deal and this thread discusses its contract. **Engagement:** Email · March 2 **Summary:** Tomas confirmed legal finished reviewing the MSA with two redlines: liability cap language and a 60-day termination clause. He asked whether the April onboarding cohort still has room. We committed to returning the redlined MSA by Thursday, March 5. Open: whether their IT lead joins the onboarding kickoff. **Suggested task:** you: return redlined MSA to Tomas, due Thursday, March 5. Confirm to log. ``` ## Never - Never log to a low-confidence match without explicit confirmation. Present, ask, wait. - Never write anything beyond what was shown and confirmed: no bonus field updates, no stage changes, no contact edits. - Never flatten numbers, dates, or commitments in the summary. Exact or absent. - Never invent a task from vibes. "We should talk soon" is not a task; "I'll call you Tuesday" is. ## Recovery - No contact match at all: propose creating the contact (name, email, company from the signature) as its own confirmed step, then the log against it. - Two open deals both plausible: show both with their evidence, recommend one, and let the user pick; the recommendation states its tiebreaker (recency of activity, usually). - Forwarded thread with mangled headers: parse what survives, say which participants were inferred from the body rather than headers, and lower the confidence grade accordingly. - Personal or irrelevant thread (recruiter spam, a newsletter): say it does not belong in the CRM rather than logging noise. Declining to log is a valid output.