How to Build an AI Agent for HubSpot and Google Calendar
Automatically schedule product demos when prospects submit forms, matching availability in real time and enriching calendar events with CRM context.
Last updated: February 27, 2026
The workflow problem
Every B2B company with inbound demand runs into the same bottleneck: a prospect fills out a “Request a Demo” form, and then waits. The lead sits in a HubSpot queue while an SDR manually checks their own calendar, crafts a personalized invite, and sends it over email. That process takes anywhere from thirty minutes to several hours depending on time zones and workload. During that delay, the prospect’s intent cools. They visit a competitor. They move on.
The problem compounds at scale. When your marketing team is generating hundreds of MQLs per week, the SDR team spends a disproportionate amount of time on scheduling logistics rather than actual selling. They alt-tab between HubSpot contact records, Google Calendar availability views, and their email client. They copy-paste company names, phone numbers, and deal context into calendar descriptions. They forget to log the meeting back in HubSpot, which means the marketing team’s attribution data is incomplete.
This is not a problem that a simple calendar link solves. Generic scheduling tools do not know which rep should take the call, what the prospect’s company size is, or whether this lead has engaged with previous campaigns. The scheduling decision needs CRM context.
Why an AI agent, not just automation
Traditional scheduling automation works on rigid rules: form submitted, send link, book slot. It has no capacity to evaluate context or make judgment calls. An AI agent brings genuine intelligence to the scheduling process.
Consider what happens when a prospect fills out a demo request at 4:55 PM on a Friday. A simple automation sends them a scheduling link showing slots starting Monday morning. An AI agent recognizes that this is a high-value lead from a target account, sees that the assigned AE has a fifteen-minute opening in thirty minutes, and proactively offers that slot with a personalized message referencing the prospect’s industry and use case.
The agent can also handle ambiguity. When a form submission includes a note like “I’d prefer to meet with someone who understands healthcare compliance,” the agent parses that context, identifies reps with healthcare vertical experience from HubSpot’s owner assignments, and routes the scheduling accordingly. It can detect scheduling conflicts, suggest alternative times when the ideal rep is unavailable, and even reschedule meetings when higher-priority leads come in.
Beyond scheduling, the agent adds post-meeting intelligence. It can update HubSpot deal stages based on whether the meeting actually happened, flag no-shows for follow-up, and ensure that the meeting notes field gets populated before the next touchpoint.
How it works with ACP
The Agentic Control Plane provides your agent with scoped access to both HubSpot and Google Calendar through secure OAuth connections. Here is what the agent can work with:
HubSpot tools available to the agent:
- Read contact and company properties (name, email, company size, lifecycle stage, lead score)
- Read and update deal records (stage, amount, close date)
- Read form submission data and marketing event history
- Create and update activities (notes, tasks, meetings)
- Read owner/rep assignments and team structures
Google Calendar tools available to the agent:
- Check free/busy status across multiple calendars
- Create calendar events with attendees, descriptions, and conferencing links
- Read existing event details and detect conflicts
- Update or cancel events
- Access calendar settings for timezone awareness
When a new form submission arrives in HubSpot, the agent evaluates the lead and orchestrates the scheduling flow end to end. Here is a realistic example:
Trigger: Sarah Chen submits a “Request Enterprise Demo” form at 2:15 PM EST. Her company, MedVault, has 340 employees. She’s visited the pricing page three times this week.
Agent reasoning: “This is a healthcare company with 340 employees, which puts them in the mid-market segment. The form specifies enterprise interest, and the lead score is 82. The assigned AE for healthcare mid-market is David Park. Let me check David’s calendar.”
Calendar check: David has an opening tomorrow at 10:00 AM and 2:30 PM EST. He also has a slot today at 4:00 PM.
Agent action: Creates a 45-minute Google Calendar event for today at 4:00 PM with a Google Meet link. The calendar description includes: “Demo with Sarah Chen, VP of Engineering at MedVault (healthcare, 340 employees). Enterprise tier interest. Has visited pricing page 3x this week. Lead score: 82.” Simultaneously logs a meeting activity in HubSpot and moves the deal to “Demo Scheduled” stage.
Follow-up: If Sarah doesn’t accept within 90 minutes, the agent sends a follow-up via HubSpot with the two alternative slots for tomorrow.
Governance and security
Scheduling automation touches both your CRM data and your team’s calendars, which makes governance critical. ACP enforces strict boundaries on what the agent can access and do.
HubSpot OAuth scopes: The agent requests only crm.objects.contacts.read, crm.objects.deals.read, crm.objects.deals.write, and crm.objects.owners.read. It does not have access to delete contacts, modify marketing email templates, or change workflow configurations. If your HubSpot instance contains financial data in custom properties, you can configure ACP to exclude those fields from the agent’s readable scope.
Google Calendar scopes: The agent uses calendar.events (read and write for events) and calendar.readonly (for free/busy checks). It cannot access other Google Workspace data like Drive files, Gmail messages, or admin settings. Calendar access is limited to the specific calendars you designate during setup. Personal calendars remain inaccessible unless explicitly shared.
Audit trail: Every action the agent takes is logged in ACP’s audit system. You can see exactly when it read a HubSpot contact record, what calendar it queried, and what event it created. Each log entry includes the authenticated identity of the agent, the specific API call made, and a timestamp. This audit trail is immutable and exportable for compliance reporting.
Permission boundaries: The agent operates under a specific ACP identity, not a shared service account. This means you can revoke its access to either tool independently without affecting other integrations. If the agent attempts an action outside its granted scopes, ACP blocks the request and logs the attempted boundary violation.
Example use cases
-
Inbound demo scheduling: A prospect submits a form on your website. The agent checks the assigned rep’s availability, creates a calendar event with full CRM context in the description, and logs the meeting in HubSpot. If the prospect’s timezone is different, the agent adjusts the invitation accordingly.
-
Re-engagement meeting booking: A deal has been stuck in “Proposal Sent” for fourteen days. The agent identifies the stall, checks the AE’s calendar for openings next week, and drafts a re-engagement meeting invitation through HubSpot with a personalized message referencing the last interaction.
-
Post-meeting deal updates: After a scheduled demo occurs, the agent checks whether the Google Calendar event was completed (not cancelled or declined). If the meeting happened, it moves the HubSpot deal to the next stage and creates a follow-up task for the rep within 24 hours.
-
Round-robin scheduling with context: Multiple reps are available for a demo, but the agent selects the rep whose calendar has the nearest available slot and who has the most experience with the prospect’s industry, based on HubSpot deal history.
-
Timezone-aware scheduling for global teams: The agent detects the prospect’s timezone from their HubSpot contact record or IP-based form submission data, then finds calendar slots that fall within business hours for both parties.
Getting started
Building this agent takes just a few minutes with ACP:
-
Sign up at cloud.agenticcontrolplane.com. The free tier includes everything you need to get started.
-
Connect your tools. Navigate to the Data Sources page and authorize both HubSpot and Google Calendar via OAuth. ACP will guide you through the exact scopes required. No API keys to manage manually.
-
Describe your agent. Tell ACP what you want in plain English: “When a new demo request form is submitted in HubSpot, check the assigned rep’s Google Calendar for availability, schedule a 45-minute meeting at the earliest slot, and log it back in HubSpot.” Select which tools the agent can access, and you are live.
Ready to build this agent?
Sign up free, connect your tools, and have this running in minutes.