Automate Appointment Booking with n8n, OpenAI & Microsoft Outlook

This workflow solves the challenge of manually checking calendar availabilities and booking appointments by integrating n8n with OpenAI and Microsoft Outlook. It intelligently checks free time slots in your calendar and books appointments without double booking, saving hours of time and reducing errors.
agent
toolHttpRequest
httpRequest
+12
Workflow Identifier: 1137
NODES in Use: memoryBufferWindow, respondToWebhook, lmChatOpenAi, toolHttpRequest, executeWorkflowTrigger, set, code, httpRequest, toolWorkflow, switch, microsoftOutlook, agent, if, chatTrigger, stickyNote
Automate appointment booking with n8n and Outlook

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does ⚙️

This workflow takes chat requests from a website and books appointments automatically in Microsoft Outlook.
It finds free times during business hours in the next 14 days and uses AI to talk to clients about booking.
It saves time by avoiding manual checking and double bookings.
You get an automatic calendar with precise 30-minute meetings set as Teams calls.
Clients get fast replies, and scheduling errors go down.


Who Should Use This Workflow

This is good for people who get many meeting requests online but don’t want to spend hours managing them.
Non-technical users who want to avoid email back-and-forth about scheduling will benefit a lot.


Tools and Services Used

  • Microsoft Outlook Calendar API: To read and write calendar events.
  • OpenAI GPT-4: To chat with clients and confirm booking details.
  • n8n Automation Platform: To connect all steps and run the workflow.
  • Website Webhook: To receive chat messages from website chatbot.

Beginner Step-by-Step: How to Use This Workflow in n8n

Download and Import Workflow

  1. Click the Download button on this page to get the workflow file.
  2. Open your n8n editor where you want to run this.
  3. Use “Import from File” option in n8n and load the downloaded workflow.

Configure Credentials and Settings

  1. Add Microsoft Outlook OAuth2 credentials with calendar permission.
  2. Enter your OpenAI API key into the AI Agent node.
  3. Update any email addresses or IDs if needed in the appointment creation or notification nodes.
  4. Check and update the webhook URL if your frontend needs a different endpoint.
  5. Copy-paste any code or prompt text exactly from the input sections if present.

Test and Activate

  1. Run the workflow manually with a test chat message to check if it works.
  2. Look at output messages and calendar events to confirm.
  3. Fix any errors you see, especially permissions or keys.
  4. When ready, activate the workflow for continuous use.

For better security and customization, consider self-host n8n.


Inputs, Processing, and Outputs

Inputs: Website chatbot messages arrive via the Webhook node.
Calendar events are fetched from Microsoft Outlook for the next 14 days.

Processing: The workflow checks if the chat message has text. If not, it sends a greeting reply. If yes, it uses AI (GPT-4) to understand client questions and intent.
It fetches all busy times, then runs JavaScript code to find free 30-minute slots in UK business hours (Mon-Fri, 8am-6pm).
Based on client intent, it either confirms available appointments or forwards inquiries for manual reply.

Outputs: New calendar events are created in Outlook with Teams meeting details.
Clients receive chat replies with booked times or further instructions.
Fallback emails are sent to notify about unresolved client inquiries.


Customization Ideas

  • Change work hours in the freeTimeSlots code node by editing business start and end times.
  • Switch timezones in the HTTP request and appointment nodes from ‘Europe/London’ to local time.
  • Modify the HTML template in the Microsoft Outlook node for emails to reflect your branding.
  • Expand calendar range beyond 14 days in the Get Events HTTP request node.
  • Try newer or different OpenAI models by updating the AI Agent node’s settings.

Edge Cases and Failures

  • 401 Unauthorized on calendar access: Fix by reauthorizing Outlook credentials in n8n.
  • AI replies too generic or empty: Improve AI Agent system prompt with clearer instructions.
  • Webhook no response: Check webhook URL is public, enabled, and CORS allows frontend.

Summary and Result

✓ Saves about 5 hours every week by fully automating appointment booking.
✓ Prevents double bookings and manual errors.
✓ Gives clients fast, smart replies confirming available meeting times.
✓ Automatically sets appointments in Outlook with Teams links.
✓ Sends fallback emails so no client message is lost.


Automate appointment booking with n8n and Outlook

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Yes, but the user must replace the Microsoft Graph API calls with Google Calendar API calls and update the authentication accordingly.
Yes, each interaction with the AI Agent calls the OpenAI API and consumes usage credits based on the subscription plan.
Such errors happen due to invalid or expired Microsoft Outlook OAuth2 credentials. Reauthorization in n8n is required to fix this.
After importing the workflow, configure the required credentials and settings, run a test, then activate the workflow to accept real chat inputs.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.