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

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

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.


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.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free