AI Appointment Booking & Lead Qualification Agent for Microsoft Outlook
Integrates with:
Overview
Unlock Automated Appointment Scheduling & Intelligent Lead Management with this AI Agent
This n8n AI Agent acts as a virtual assistant, designed to streamline how you connect with clients and prospects. It integrates directly with your Microsoft Outlook calendar, leveraging OpenAI's GPT-4o for natural, intelligent conversations. The agent can understand appointment requests, check your real-time availability, book meetings (including Microsoft Teams invites), gather crucial lead information, and even forward inquiries to you via email when a human touch is needed. It's perfect for solopreneurs and businesses looking to automate their front-desk operations and improve responsiveness.
Key Features & Benefits
- Intelligent Appointment Booking: Leverages OpenAI (GPT-4o) to understand user requests, check real-time availability in your Microsoft Outlook calendar, and book 30-minute consultations. It's designed to avoid double bookings and respect predefined business hours and notice periods (e.g., 48-hour notice).
- Automated Availability Check: Dynamically fetches your calendar events for the next 14 days and calculates free slots based on your configured business hours (default: 8 AM - 5:30 PM, Europe/London) and existing commitments.
- Lead Qualification & Routing: Gathers essential customer information (name, company, email, project details). If a customer isn't ready to book or has complex questions, the agent can send a detailed email summary to a designated address.
- Microsoft Outlook & Teams Integration: Directly creates events in your Outlook calendar and automatically sets them up as Microsoft Teams online meetings.
- Conversational Context: Employs window buffer memory to recall the last 20 turns of the conversation, enabling more natural and context-aware interactions.
- Highly Customizable Persona & Rules: The agent's system prompt is detailed, allowing you to define its personality, specific tasks, business rules (like meeting duration, lead qualification questions), and how it represents your business (e.g., "nocodecreative.io").
- Webhook Triggered: Designed to be initiated via a chat interface (webhook), making it easy to embed on your website or integrate with other chat platforms.
- Self-Contained Logic: Uses n8n's
toolWorkflow
andExecute Workflow Trigger
nodes to manage different functions like checking availability or sending messages within the same workflow structure.
Use Cases
- Automating client appointment scheduling for consultants, coaches, and agencies.
- Providing 24/7 first-line customer interaction and lead qualification via a website chatbot.
- Reducing the manual back-and-forth typically involved in meeting coordination.
- Ensuring leads provide necessary project details before a sales or consultation call.
- Streamlining the intake process for new client inquiries directly into your calendar.
Prerequisites
- An n8n instance (Cloud or self-hosted).
- OpenAI API Key with access to a GPT-4o model (or a comparable powerful model).
- Microsoft 365 / Outlook account with OAuth2 credentials configured in n8n. This is required for:
- Reading calendar events (Microsoft Graph API).
- Creating calendar events/appointments (Microsoft Graph API).
- Sending email notifications (Microsoft Outlook node).
- Familiarity with n8n workflow concepts, especially credentials management and expression editing for customization.
Setup Instructions
- Download the n8n workflow JSON file.
- Import the workflow into your n8n instance.
- Configure Credentials:
- OpenAI: In the 'OpenAI Chat Model' node, select or create your OpenAI credentials and ensure the chosen model (e.g.,
gpt-4o-2024-08-06
) is appropriate. - Microsoft Outlook/Graph API: Create Microsoft OAuth2 credentials in n8n. Assign these credentials to the 'Make Appointment' (HTTP Request node), 'Get Events' (HTTP Request node), and 'Send Message1' (Microsoft Outlook node).
- OpenAI: In the 'OpenAI Chat Model' node, select or create your OpenAI credentials and ensure the chosen model (e.g.,
- Customize AI Agent Persona:
- Navigate to the 'AI Agent' node. Carefully review and edit the
systemMessage
in the 'Options' tab. This is where you define the AI's role, your business name (e.g., replace 'Wayne, Founder at nocodecreative.io'), booking rules (notice period, meeting duration), time zone considerations, and lead qualification questions. The default prompt is a great starting point.
- Navigate to the 'AI Agent' node. Carefully review and edit the
- Review & Adjust Tool Configurations:
- 'Make Appointment' tool (HTTP Request node):
- Verify the Microsoft Graph API URL (
https://graph.microsoft.com/v1.0/me/events
). - Review the JSON body. You might want to adjust the default
timeZone
forstart
andend
times if it's not 'Europe/London'. - Check
placeholderDefinitions
to ensure they match the information your AI agent will gather.
- Verify the Microsoft Graph API URL (
- 'Get Availability' logic (part of the main workflow, routed via 'Execute Workflow Trigger' and 'Switch'):
- 'Get Events' node (HTTP Request): Confirm the
startDateTime
andendDateTime
expressions meet your needs (default looks 2-16 days ahead). Check thePrefer: outlook.timezone="Europe/London"
header. - 'freeTimeSlots' node (Code): Adjust
businessHoursStart
(e.g., "08:00:00Z") andbusinessHoursEnd
(e.g., "17:30:00Z") variables if your business hours differ. The code assumes Europe/London for processing; adapt if necessary.
- 'Get Events' node (HTTP Request): Confirm the
- 'Send Message' logic (part of the main workflow):
- 'Send Message1' node (Microsoft Outlook): Change the
toRecipients
to your desired email address. Customize the emailsubject
andbodyContent
(HTML) for the notifications.
- 'Send Message1' node (Microsoft Outlook): Change the
- 'Make Appointment' tool (HTTP Request node):
- Workflow ID for Tools:
- The 'Get Availability' and 'Send Message' (Langchain Tool Workflow) nodes are configured to call this same workflow. The
workflowId
parameter in these nodes should correctly reference the ID or name of this imported workflow. TheExecute Workflow Trigger
node in the workflow is what responds to these internal calls.
- The 'Get Availability' and 'Send Message' (Langchain Tool Workflow) nodes are configured to call this same workflow. The
- Test Thoroughly:
- Use the 'Chat Trigger' node's manual execution feature or its public webhook URL to interact with the AI agent. Test different scenarios: booking appointments, asking for availability, asking to send a message, providing insufficient information, etc.
- Deploy:
- Once satisfied, activate the workflow.
- Copy the public Webhook URL from the 'Chat Trigger' node and integrate it into your website's chat widget or any other platform you intend to use for chat interactions.
Want your own unique AI agent?
Talk to us - we know how to build custom AI agents for your specific needs.
Schedule a Consultation