Automate Appointment Scheduling with Gmail, Google Calendar & OpenAI in n8n

Struggling to handle appointment requests via email? This n8n workflow uses Gmail triggers, OpenAI classification and Google Calendar checks to automate replies with precise time proposals. Save hours and reduce manual errors by automating your appointment scheduling today.
gmail
lmChatOpenAi
agent
+3
Workflow Identifier: 1022
NODES in Use: Sticky Note, OpenAI Chat Model, Gmail, Text Classifier, Agent, Google Calendar

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 Automation Does

This workflow checks every new unread email in Gmail to see if someone wants to set a meeting.

It looks at the message subject and snippet and decides if it is about making an appointment.

Then, it checks the Google Calendar for open times in the next month.

Using AI, it writes a reply that offers specific times with 15-minute breaks between meetings.

The workflow sends the reply back automatically and marks the original email as read.

If the email is not about scheduling, it just ignores it.


Tools and Services Used


Inputs, Processing, and Output

Inputs

  • New unread emails in Gmail inbox.
  • Message subject and snippet text for classification.
  • Google Calendar events from yesterday to one month ahead.

Processing Steps

  • Trigger on receiving a new unread email.
  • Use OpenAI text classifier to check if the email requests an appointment.
  • If yes, fetch calendar events to identify availability.
  • Use AI agent to write a reply with proposed meeting times, ensuring 15-minute buffers.
  • Send reply email with Gmail node.
  • Mark original email as read.
  • If not an appointment email, discard it.

Output

  • An email reply proposing specific meeting times based on calendar availability.
  • Cleared inbox by marking processed emails as read.
  • Reduced manual scheduling work and fewer scheduling errors.

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

Step 1: Import the Workflow

  1. Download the workflow file from the Download button on this page.
  2. Open the n8n editor where you manage workflows.
  3. Click the top left menu and select Import from File.
  4. Find and select the downloaded workflow file.

Step 2: Add Credentials and Update Settings

  1. Add your Gmail account credentials with OAuth2 in the credential manager.
  2. Connect Google Calendar account with OAuth2 credentials.
  3. Enter your OpenAI API key for GPT-4o-mini access.
  4. Check the Google Calendar node and update calendar ID or email if needed.
  5. Review any prompt or message text in the Agent node to customize if wanted (copy-paste prompt below).

Step 3: Test the Workflow

  1. Send a test email to your Gmail simulating an appointment request.
  2. Manually run the workflow or wait for the trigger and observe if it classifies and replies properly.

Step 4: Activate Workflow for Production

  1. After successful tests, toggle the workflow switch to ON.
  2. Let the workflow run automatically on new appointment emails.
  3. You can monitor executions in n8n dashboard for errors or logs.

Example prompt used in Agent node:

=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: {{ $now.toISO() }}.

Make sure to copy the exact prompt to get good responses.

If you use self-host n8n, check self-host n8n for advice about secure deployment.


Customizations

  • You can change the AI model from gpt-4o-mini to other GPT-4 variants in the OpenAI nodes for different responses.
  • Modify the Text Classifier prompt to better capture what type of emails count as appointment requests.
  • Adjust Google Calendar range, for example, to look only at the next two weeks by changing timeMax in the calendar node.
  • Edit reply tone or add calendar links by changing the system message in the Agent node.

Troubleshooting

  • Issue: Classifier returns “discard” on appointment emails.
    Fix: Improve prompt with more example phrases and check input data fields.
  • Issue: Google Calendar node shows no events.
    Fix: Verify calendar ID and OAuth scopes for calendar read access.
  • Issue: No reply emails sent.
    Fix: Refresh Gmail credentials and ensure message ID is passing correctly.

Summary of Results

✓ Saves hours of manual scheduling work
✓ Eliminates double bookings with calendar checks
✓ Sends fast, clear responses with meeting proposals
✓ Keeps inbox organized by marking emails read
✓ Runs fully automatic in n8n with minimal oversight

Frequently Asked Questions

The Gmail Trigger node watches for new unread emails in the inbox to start the workflow whenever a new appointment email arrives.
Confirm the calendar ID is correct and that the OAuth credentials include permission to read the calendar.
Yes, other OpenAI GPT-4 variants or supported large language models can be used by changing the model settings in the OpenAI nodes.
Import the workflow file into n8n, add all required credentials, test it once, then activate it by turning the workflow switch to ON.

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