Automate Appointment Scheduling with n8n and LLMs
Ever feel like you spend way too much time going back and forth over email just to find a meeting slot that works for everyone? With n8n, Gmail, Google Calendar, and a lightweight LLM-based agent, you can hand that job over to automation.
This workflow template reads your unread emails, figures out which ones are actually about scheduling, checks your calendar for open slots, and replies with a suggested time. It can even ping your team in Slack so everyone stays in the loop.
Let’s walk through what this template does, when it makes sense to use it, and how it all fits together in n8n.
What this n8n scheduling workflow actually does
At a high level, this automation turns your inbox into a smart scheduling assistant. Instead of you manually:
- Reading every new email
- Deciding if it is about booking a meeting
- Checking your Google Calendar
- Writing a polite reply with a suggested time
- Letting your team know what was scheduled
the workflow does all of that for you.
Here is the basic flow:
- New unread emails in Gmail trigger the workflow.
- An LLM or classifier checks if the email is about scheduling.
- If it is, Google Calendar is queried for your availability.
- An LLM-based scheduling agent writes a natural reply with specific times.
- The reply is sent via Gmail, the email is marked as read, and Slack can be notified.
You get faster responses, fewer scheduling headaches, and a much cleaner calendar routine.
When this template is a great fit
This n8n workflow template is especially helpful if you:
- Receive a lot of inbound emails asking to “hop on a call” or “book a quick meeting”.
- Use Gmail and Google Calendar as your main tools for communication and scheduling.
- Want to keep a human tone in replies but do not want to manually craft every email.
- Need your team to see what has been scheduled, for example via Slack updates.
If that sounds like you, this template can quietly take over a chunk of your daily admin work.
Core building blocks of the workflow
Here is a quick tour of the main n8n nodes and components involved, so you know what is happening under the hood:
- GmailInboundTrigger – polls for unread emails and starts the workflow.
- AppointmentClassifier / LLMChatClassifier – decides if the email is an appointment request or something to ignore.
- CalendarLookup – pulls your Google Calendar events and finds free time slots.
- SchedulingAgent (LLMChatAgent) – the LLM that writes a context-aware, time-specific reply.
- GmailSendReply – sends your response back to the original sender.
- MarkEmailRead – marks the email as read so it is not processed again.
- SlackNotifier – optionally posts the scheduled or proposed time to a Slack channel.
Now let us dive into how all of this flows together step by step.
How the automation works, step by step
1. Start with the Gmail trigger
The workflow begins with the GmailInboundTrigger node. It regularly checks your Gmail account for new unread emails.
In this node, you will typically:
- Poll only unread messages.
- Exclude spam and trash so you are only dealing with real emails.
- Set a polling interval that fits your use case, for example every 1 or 5 minutes.
Once a new email is spotted, the workflow kicks into gear.
2. Let the classifier decide if it is about scheduling
Not every email that lands in your inbox is a meeting request, so the next step is classification.
An AppointmentClassifier or LLMChatClassifier node looks at the email’s subject and body snippet and returns a label such as is_appointment or discard. Only emails that are classified as appointment-related move on to the scheduling steps.
Helpful tips for accurate classification
- Feed both the subject and a snippet of the body into the classifier for better accuracy.
- Always include a safe fallback category like
discard, so the workflow does not try to schedule from random messages. - During testing, log the classifier output so you can tweak prompts or category definitions if it mislabels messages.
This keeps the rest of the workflow efficient and focused only on real scheduling requests.
3. Check Google Calendar for availability
Once an email is confirmed as a scheduling request, the workflow moves to your calendar.
The CalendarLookup node queries your Google Calendar within a defined time window, for example from yesterday up to one month ahead. It pulls all events and then identifies the free gaps where a meeting could fit.
Key details to get calendar lookups right
- Use the correct calendar ID, which is often your email address.
- Make sure your OAuth credentials for Google Calendar are set up correctly.
- Normalize everything to a consistent timezone before proposing times.
- Respect buffers between meetings, for example this template uses a 15 minute buffer.
By the end of this step, the workflow knows exactly when you are busy and when you are free.
4. Let the LLM scheduling agent craft the reply
This is where things get smart. The SchedulingAgent (LLMChatAgent) takes in:
- Sender information
- Email subject and body
- Your calendar events and computed availability
- The current date and time
Using a carefully designed system prompt, the agent writes a natural, polite reply that proposes specific meeting times, respects buffers, and offers alternatives if the requested slot is not free.
Example system prompt for the agent
"You are an email scheduling assistant. Based on the received email, check my availability and propose an appropriate response. Aim to get a specific time, rather than just a day. When checking my availability, make sure that there's enough time in between meetings. If I'm not available, ALWAYS propose a new time based on my availability. When proposing a new time, always leave 15 minutes buffer from previous meeting. Today date and time is: [current ISO time]."
This prompt keeps the agent focused on concrete, bookable times instead of vague “sometime next week” suggestions.
5. Send the reply, clean up, and notify Slack
Once the LLM has drafted the email, the workflow moves into the final actions:
- GmailSendReply sends the generated response back to the original sender.
- MarkEmailRead marks the processed email as read so the trigger does not pick it up again.
- SlackNotifier can send a short summary of the scheduled or proposed time to a Slack channel for visibility.
From the user’s point of view, it feels like you replied personally, but you did not have to lift a finger.
Making the workflow production-ready
Once the basics are in place, you will probably want to harden the workflow a bit so it behaves reliably in real life.
Handling common edge cases
- Overlapping events – Always compute gaps between events and enforce your buffer time so the LLM does not propose back-to-back meetings.
- Different meeting lengths – If the email does not specify duration, let the agent ask for it or fall back to a default meeting length.
- Recurring events – Recurring series can block many slots, so make sure your availability logic respects them properly.
Security and privacy considerations
Because this workflow touches email and calendar data, it is worth paying attention to security:
- Use OAuth for Gmail and Google Calendar access.
- Limit token scopes to only what you need. For example, read-only calendar access might be enough for availability checks, while creating events requires write access.
- Avoid logging sensitive email content in plain text, especially in shared environments.
Choosing models and tuning prompts
The example template uses gpt-4o-mini as the chat model, which is a good balance of cost and responsiveness for this kind of task.
To keep the agent’s behavior predictable:
- Write clear, deterministic system prompts.
- Explicitly mention timezones, buffer requirements, and what to do when requested slots are not available.
- Iterate on the prompt if you notice vague or inconsistent replies.
Testing and debugging your setup
Before you trust the workflow with your real inbox, it is worth spending a bit of time testing.
- Run the workflow in a sandbox or test environment with sample emails:
- Clear, explicit meeting requests
- Vague “let us catch up” emails
- Messages with multiple time options
- Log intermediate outputs so you can see:
- How the classifier labels each email
- What free windows the calendar lookup returns
- The exact draft the LLM produces
- Adjust classifier thresholds, the system prompt, or the calendar time window until things look solid.
Advanced ways to level up this workflow
Automatically create Google Calendar events
If you want to go a step further, you can extend the workflow so that once a time is confirmed, n8n:
- Creates a Google Calendar event
- Adds the relevant attendees
- Includes conferencing details such as a Google Meet link
This turns your workflow into a full scheduling pipeline from email to calendar event.
Use two-way confirmations for extra safety
If you prefer more control, you can implement a short confirmation loop. For example:
- The LLM proposes 2 or 3 specific times.
- The sender chooses one in their reply.
- Only then does the workflow create the event in Google Calendar.
This keeps the human in the loop while still saving you a lot of time.
Personalized templates for your tone of voice
You can also combine small, reusable reply templates with the LLM. Let the model fill in the dynamic pieces such as:
- Exact times and dates
- Timezone conversions
- Polite, context-aware phrasing
This keeps your communication style consistent and professional, while still feeling personal.
Quick troubleshooting checklist
If something feels off, here are some common things to check first:
- No replies are being sent – Verify that your Gmail OAuth token is valid and that the GmailSendReply node is mapped to the correct
messageId. - Times appear in the wrong timezone – Make sure
$now.toISO()or your node-level timezone settings match your Google Calendar timezone. - Classifier mislabels emails – Revisit your classifier prompt or training examples, and add negative examples for messages that should be ignored.
Wrapping up: why this template makes life easier
Automating appointment scheduling with n8n and LLMs is one of those small changes that can have a big impact. You get:
- Less manual back-and-forth over email
- Faster, more consistent responses
- Cleaner calendar hygiene with built-in buffers
- Better visibility for your team when you connect Slack
Think of this template as a starting point. You can tweak it for different buffer times, multi-attendee scheduling, automatic event creation, or whatever your workflow needs.
Ready to try it out? Import the workflow template into n8n, connect your Gmail and Google Calendar accounts, and send a few test emails to see it in action.
If you want a more customized setup or a guided walkthrough, you can adapt this template further, add extra logic, or build a step-by-step version that matches your exact scheduling style.
Get started now: import the template, connect your accounts, and experiment with a set of sample emails to fine-tune it before going live.
