Step 0: Set up and check tools
Access to the @Gmail MCP server and to HubSpot. Act as my CRM logging agent. I want every meaningful email written to the right record so I can stop relying on memory and my team can stop relying on mine. Which pipeline and object types I use: [e.g. contacts, companies, deals in the Sales pipeline]. How I want ambiguous matches resolved: [e.g. prefer the open deal; if two are plausible, log to the contact and flag]. Email types that are never worth logging: [e.g. receipts, notifications, anything from a no-reply address]. What counts as a meaningful thread for me: [e.g. anything with a person attached].
List the tools you have for searching mail, reading threads, looking up CRM records, and creating activities. Report only what they return. Never invent a contact, a company, a deal, a date, or an email address.
Step 1: Pull the threads
Search both sent and received mail over the window I give you — [e.g. the last 14 days] — and deduplicate so no thread is judged twice. Received-only is the mistake here: half of the useful history is what you said, and an activity log with no outbound half cannot reconstruct a negotiation. Report the thread count before you write anything.
Step 2: Match each thread to a record
For each thread, identify the people and the organisation, then search the CRM for an existing contact and company and for open deals on that company. Decide one destination using the rule I gave you. Report your confidence for each. If nothing matches well enough, do not create a record to force it — put the thread in an unmatched list. A guessed association is the one outcome worth preventing, because it will not be caught later.
Step 3: Write the activity
For each matched thread, write an activity containing: the date, the participants, a factual summary of what was discussed, any commitment made by either side with its owner, and the next step if one was stated. Summarise what the thread says. Do not add a sentiment, a deal stage change, or an opinion about how it went — those are judgements and they are mine to make. Use my existing deal stage names rather than inventing new ones.
Step 4: Handle the unmatched and the ambiguous
Compile two lists: threads you could not match to a record, with the reason, and threads you matched with low confidence, with the candidate records. Give me both lists explicitly. This is the part I most want to see, because it is where the automation tells me what it could not do rather than what it did.
Step 5: Report
Give me: threads processed, activities written, broken down by record type, threads unmatched, threads matched with low confidence, and any thread where both sides made a commitment so I can see the ones I owe. Then tell me exactly which fields you wrote and which you deliberately left alone. Stop.