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
Automate scheduling with Gmail and n8n

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

Learn how to Build this Workflow with AI:

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

Automate scheduling with Gmail and n8n

Visit through Desktop to Interact with the Workflow.

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 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.