Automate Calendar Appointments with Langchain and n8n
detail.loadingPreview
This workflow uses Langchain's OpenAI Chat Model and Window Buffer Memory to intelligently schedule appointments. It fetches calendar availability via Microsoft Graph API, processes it with a Code node, and uses a `Make Appointment` tool to create new events, all triggered by a webhook.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow automates the process of scheduling calendar appointments by leveraging the power of Langchain and OpenAI's LLMs. It's designed to intelligently find free slots in your calendar and create new appointments based on user requests. The workflow begins with a webhook trigger, then uses Window Buffer Memory to maintain conversation context with the OpenAI Chat Model. It queries your Microsoft Outlook calendar for availability using the Get Events HTTP Request node. A Code node (freeTimeSlots) processes this data to identify available time slots within business hours. Finally, a Make Appointment tool, configured as an HTTP Request to the Microsoft Graph API, creates the new event, and the Respond to Webhook node provides feedback.
Key Features
- Intelligent Scheduling: Utilizes OpenAI's LLMs to understand appointment requests and find optimal times.
- Calendar Integration: Connects with Microsoft Outlook via API to check availability and create events.
- Conversation Memory: Employs Langchain's Window Buffer Memory to maintain context across multiple turns.
- Automated Free Slot Calculation: Processes calendar data to dynamically identify available time slots.
- Webhook Trigger: Allows for external systems to initiate appointment scheduling requests.
- Structured Appointment Data: Formats appointment details like subject, attendees, start/end times, and location for the Microsoft Graph API.
How To Use
- Set up Credentials: Configure n8n credentials for OpenAI and Microsoft Outlook OAuth2.
- Configure Webhook Trigger: Set up the
Execute Workflow Triggeror a webhook node to receive appointment requests. - Customize OpenAI Parameters: Adjust the
OpenAI Chat Modelnode for your desired model and temperature. - Define Business Hours: Modify the
businessHoursStartandbusinessHoursEndvariables within thefreeTimeSlotsCode node to match your working hours. - Map Input Data: Ensure the data from your webhook or preceding nodes correctly populates the expected fields for the
Make Appointmenttool (e.g., email, name, reason, date/time). - Test the Workflow: Send a test request to the webhook to verify that appointments are created correctly in your calendar.
Apps Used
Workflow JSON
{
"id": "4cfc03d7-d3a5-40bd-a0bf-257294e42cb6",
"name": "Automate Calendar Appointments with Langchain and n8n",
"nodes": 0,
"category": "AI & LLMs",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 4cfc03d7-d3a5...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
AI-Powered Conversational Agent with Tools
This n8n workflow creates an AI conversational agent that leverages multiple tools, including Wikipedia and a weather API, to answer complex user queries. It utilizes a buffer memory to maintain conversation context.
RAG Workflow for Stock Earnings Report Analysis
Analyze stock earnings reports using Retrieval Augmented Generation (RAG). This workflow leverages Pinecone for vector storage and Google Gemini for embeddings and chat, enabling detailed trend and outlier analysis from financial documents.
AI Agent to Chat with Your Search Console Data using OpenAI and PostgreSQL
Leverage an AI agent to query your Google Search Console data. This n8n workflow uses OpenAI for natural language processing and PostgreSQL for chat memory, allowing interactive data retrieval.