How to Build an AI Agent for Microsoft 365 and HubSpot
Sync Outlook contacts and email activity into HubSpot, log Teams meetings automatically, and keep your CRM data fresh without manual entry.
Last updated: March 1, 2026
The workflow problem
Companies that run Microsoft 365 for communication and HubSpot for CRM face a persistent data gap. Sales reps conduct conversations in Outlook, hold discovery calls on Teams, and share proposals through OneDrive, but none of that activity automatically appears in HubSpot. The CRM becomes a partial record of reality, showing only what reps manually choose to log.
This data gap creates downstream problems that compound over time. Marketing cannot accurately attribute pipeline to campaigns because email engagement data lives in Outlook, not HubSpot. Sales managers review deal progress in HubSpot and see sparse activity timelines, not because reps are inactive, but because they are doing their work in Microsoft 365 and not logging it. When a rep leaves the company, their entire relationship history disappears with their Outlook mailbox because none of it was captured in the CRM.
The manual workaround is painful. Reps are asked to BCC a HubSpot tracking address on every email, manually log every Teams meeting, and copy contact details from Outlook into HubSpot. Compliance with these requirements is typically below 40%. The reps who do comply spend significant time on data entry that directly competes with selling time. The result is an organization that pays for both Microsoft 365 and HubSpot but gets the full value of neither.
Why an AI agent, not just automation
Native integrations between Microsoft 365 and HubSpot exist, but they are shallow. They sync contacts bidirectionally and track email opens. They do not understand the content or context of interactions. An AI agent goes further by interpreting what is happening and translating it into meaningful CRM data.
When a rep receives an email from a prospect asking about pricing, a sync tool records “email received.” An AI agent reads the email subject and body, identifies that this is a pricing inquiry, and creates a HubSpot task for the rep: “Prospect asked about enterprise pricing. Send proposal by Thursday.” It updates the deal stage from “Discovery” to “Proposal” because the conversation content signals that progression.
The agent also handles the nuance of contact management intelligently. When a rep meets someone new at a conference and adds them as an Outlook contact, the agent does not just create a HubSpot contact. It checks whether that person’s company already exists in HubSpot, associates the contact with the right company record, looks up the company’s existing deal history, and notifies the rep if someone else on the team already has a relationship with that account.
For Teams meetings, the agent goes beyond logging that a meeting occurred. It can process meeting metadata like duration, number of participants, and whether the meeting was recorded, and use these signals to assess engagement level. A 15-minute Teams call with one person is different from a 60-minute call with five stakeholders, and the agent reflects that distinction in how it updates HubSpot.
How it works with ACP
ACP provides secure, scoped access to both Microsoft 365’s communication stack and HubSpot’s CRM platform. Here is what your agent can work with:
Microsoft 365 tools available to the agent:
- Read Outlook email headers, subjects, and bodies (send-only with explicit permission)
- Access Outlook contacts and contact folders
- Read Teams meeting metadata: attendees, duration, scheduled time, join URLs
- Check Teams presence and availability status
- Access OneDrive file metadata (names, sharing status, last modified)
- Read calendar events from Outlook calendars
HubSpot tools available to the agent:
- Create and update contacts, companies, and deals
- Log emails, calls, meetings, and notes as activities
- Create and assign tasks with due dates
- Read and update deal stages and pipeline positions
- Access contact lists and smart list membership
- Read marketing event data (form submissions, page views)
The agent continuously bridges the gap between where your team communicates and where your business data lives. Here is a concrete example:
Scenario: Sales rep Maria finishes a 45-minute Teams call with three people from Datastream Inc. The meeting was titled “Datastream - Technical Architecture Review.”
Agent detection: The agent sees a completed Teams meeting involving external attendees from the datastream.com domain.
HubSpot lookup: The agent searches HubSpot for the Datastream Inc. company record and finds an open deal in the “Technical Evaluation” stage worth $95K. Two of the three attendees are already contacts; one is new.
Agent actions:
- Creates a new HubSpot contact for the unknown attendee (Alex Rivera, Engineering Lead) and associates them with Datastream Inc.
- Logs a meeting activity on the deal: “45-minute technical architecture review with 3 Datastream stakeholders including new contact Alex Rivera (Engineering Lead). Meeting recorded.”
- Creates a task for Maria: “Send follow-up with architecture diagram to Datastream team. New stakeholder Alex Rivera joined the call, consider adding to communication thread.”
- Updates the deal’s “Last Meeting Date” custom property and adds “Engineering Lead engaged” to the deal notes.
Governance and security
Integrating email and meeting data with a CRM touches sensitive communication content. ACP enforces strict boundaries to protect employee privacy and customer data.
Microsoft 365 OAuth scopes: The agent uses Microsoft Graph API scopes: Mail.Read for email access, Contacts.Read for contact sync, Calendars.Read for meeting data, and OnlineMeetings.Read for Teams meeting metadata. It does not have Mail.Send, Mail.ReadWrite, or any administrative scopes unless you explicitly grant them. The agent cannot delete emails, modify contacts in Outlook, or access other users’ mailboxes without delegated permissions.
HubSpot OAuth scopes: The agent requests crm.objects.contacts.write, crm.objects.deals.write, crm.objects.companies.read, and sales-email-read. It cannot modify HubSpot marketing email templates, change workflow automation, or access billing information. Write access is limited to creating and updating records, not deleting them.
Privacy controls: You can configure the agent to process only email metadata (sender, recipient, subject, timestamp) without reading email bodies. This satisfies privacy requirements in regulated industries while still enabling activity logging. Similarly, Teams meeting content (transcripts, recordings) can be excluded from the agent’s scope.
Audit trail: Every contact created, deal updated, and email logged is recorded with the agent’s identity and the source data from Microsoft 365. Compliance teams can review exactly what Microsoft 365 data was read and what HubSpot actions resulted. The audit log captures both successful actions and any blocked attempts where the agent tried to exceed its permissions.
Access isolation: The agent’s Microsoft 365 connection is tied to a specific user or service account. It does not have tenant-wide access unless explicitly configured with admin consent. This means the agent only processes data from the mailboxes and calendars you designate.
Example use cases
-
Automatic email logging: When a rep sends or receives an email involving a known HubSpot contact, the agent logs it as an email activity on the contact’s timeline. It captures the subject, participants, and timestamp without requiring the rep to BCC any address or click any buttons.
-
New contact capture from meetings: External attendees on Teams meetings who are not yet in HubSpot are automatically created as contacts, associated with their company, and linked to any existing deals. The rep gets a notification if the new contact is from a company already being worked by another team member.
-
Meeting-driven deal stage updates: The agent recognizes meeting patterns that indicate deal progression. A first meeting moves the deal to “Discovery,” a meeting titled with words like “proposal” or “pricing” advances it to “Proposal Sent,” and meetings with titles containing “contract” or “legal” signal “Negotiation.”
-
Shared document tracking: When a rep shares a OneDrive file with a prospect via email or Teams, the agent logs the sharing event in HubSpot and tracks whether the recipient accessed the file. This helps reps understand which proposals are actually being reviewed.
-
Stale contact refresh: The agent periodically compares Outlook contact details (job titles, phone numbers) with HubSpot records and flags discrepancies. When a contact’s title changes in Outlook, the agent updates HubSpot and alerts the rep that their champion may have changed roles.
Getting started
Get this agent running in just a few steps:
-
Sign up at cloud.agenticcontrolplane.com. The free tier covers everything you need to start.
-
Connect Microsoft 365 and HubSpot. Use ACP’s Data Sources page to authorize both platforms via OAuth. For Microsoft 365, you will authenticate through your organization’s Azure AD. ACP requests only the minimum scopes needed.
-
Describe your agent. Tell ACP what you want: “Sync Outlook email activity and Teams meeting data into HubSpot. Create new contacts when unknown attendees appear in meetings. Log all meetings as activities on the associated deal.” Select your tools and your agent begins working immediately.
Ready to build this agent?
Sign up free, connect your tools, and have this running in minutes.