Automate Appointment Booking & AI Email Labeling with n8n

Save hours by automating appointment bookings with Google Calendar and categorizing emails with AI in n8n. This workflow uses LangChain, Pinecone, and Slack to streamline scheduling and intelligent email handling effortlessly.
Slack
Embeddings OpenAI
Gmail
+17
Workflow Identifier: 1045
NODES in Use: Slack, Sticky Note, Code, Recursive Character Text Splitter, Embeddings OpenAI, Default Data Loader, OpenAI Chat Model, Vector Store Retriever, HTTP Request, NoOp, Vector Store Pinecone, Chat Trigger, Text Classifier, Gmail, If, Webhook, Anthropic Chat Model, Tool HTTP Request, Agent, Memory Buffer Window
Automate booking with n8n and Google Calendar

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

Learn how to Build this Workflow with AI:

What this workflow does

This workflow helps you organize incoming emails automatically. It also schedules meetings by checking your calendar. The workflow labels emails as “automation” or “music”. It alerts a Slack channel if emails come from certain senders. It loads PDFs to create a searchable knowledge base. You can chat to ask questions or book appointments. This saves lots of time and stops errors.

You get emails sorted, meeting times booked without overlap, and smart answers from documents.


Tools and services used

  • Gmail API: To monitor and label incoming emails.
  • Slack API: To send notifications when specific emails arrive.
  • Google Calendar API: To check free slots and book appointments.
  • LangChain with OpenAI GPT-4: For AI text classification and chat responses.
  • Pinecone Vector Database: To store PDF document embeddings for search.
  • HTTP Request nodes: To download PDFs and book calendar events.
  • n8n Workflow Automation Platform: To connect all services and automate processing.

Inputs, processing steps, and outputs

Inputs

  • Incoming emails from Gmail inbox monitored every minute.
  • User chat messages asking for help or appointment requests.
  • PDF files accessed via URLs for creating searchable text.

Processing Steps

  • AI reads each new email and labels it as “automation” or “music”.
  • Specific email addresses trigger Slack messages with email info.
  • PDFs are downloaded and split into text chunks for embedding.
  • Text chunks generate vector embeddings stored in Pinecone.
  • Chat messages use AI over Pinecone data to answer questions.
  • Chat agent checks Google Calendar free/busy times for appointment slots.
  • Agent books 30-minute events when users pick a time.

Outputs

  • Emails tagged with correct labels in Gmail automatically.
  • Slack channel receives notifications for certain important emails.
  • Knowledge base from PDFs available for quick AI answers.
  • Appointments booked into the Google Calendar with no conflicts.

Who should use this workflow

This is useful for busy people handling many emails and meetings. You want to save time on sorting emails. You want to avoid scheduling errors. You like chatting with an AI assistant for booking. You want document info ready to answer questions quickly.

No programming skills are needed to use it but you need accounts for Gmail, Slack, Google Calendar, and Pinecone.


Beginner step-by-step: How to use this workflow in n8n production

Step 1: Download and import the workflow

  1. Click the Download button on this page to get the workflow file.
  2. Open your n8n editor.
  3. Choose Import from File and pick the downloaded workflow file.

Step 2: Configure credentials and IDs

  1. Add your Gmail API credentials in Gmail Trigger and Gmail nodes.
  2. Add your Slack OAuth2 credentials in the Slack node.
  3. Provide Google Calendar OAuth2 credentials in calendar nodes.
  4. Fill Pinecone API key in the vector store nodes.
  5. If needed, update Slack channel ID, Gmail label IDs, emails, or calendar settings.
  6. Check any code or prompt fields for API keys or updated URLs and replace with your own.

Step 3: Test the workflow

  1. Send a test email to the Gmail inbox to check if labeling works.
  2. Send test chat messages to trigger AI answers and appointment booking.
  3. Verify received Slack notifications if test emails match the filter.

Step 4: Activate the workflow

  1. Once tests pass, turn on all nodes in n8n to enable real-time automation.
  2. Monitor logs from the n8n dashboard to check workflow runs.

If using self-host n8n, consider visiting self-host n8n for setup resources.


Customization ideas

  • You can add or change email categories in the AI classifier node by editing the categories list.
  • Change meeting length by editing text in the appointment agent and updating calendar event duration.
  • Modify Slack message node to send alerts to a different channel or user group.
  • Switch AI models in LangChain nodes to another supported model like Anthropic.
  • Add more PDFs to the knowledge base by adding HTTP Request nodes and updating metadata.

Troubleshooting common issues

  • Slack messages do not send: Check OAuth2 credentials in Slack node and reconnect if needed.
  • Email labels not applied: Make sure message ID and label IDs match Gmail settings exactly.
  • Appointment booking fails: Verify the timezone and JSON format of event start and end times.

Pre-production checklist

  • Confirm all API credentials for Gmail, Slack, and Google Calendar are connected.
  • Test Gmail trigger by sending a sample email.
  • Verify PDF URLs are accessible and correctly download the documents.
  • Send a chat message and check for correct AI responses and appointment booking prompts.
  • Check Pinecone vector store logs to confirm embeddings insertion.
  • Back up the workflow before turning it on.

Conclusion

By using this workflow, you get automatic email organization and appointment booking. It reduces manual work and mistakes. You also have document knowledge ready for AI questions. Use this workflow to work smarter and save time each week.


Code snippet for adding a custom field in the data

This code adds a new field named myNewField with value 1 to every data item passing through the node. Put it inside a Code node.

// Loop over input items and add a new field called 'myNewField'
for (const item of $input.all()) {
  item.json.myNewField = 1;
}
return $input.all();


Example Slack message text

Use this message template in the Slack node to notify about important emails:

Data from webhook: {{ $json.query.email }}


Automate booking with n8n and Google Calendar

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

No, this workflow uses Gmail API specific nodes which do not support Outlook.
Yes, Pinecone charges based on usage for vector storage and queries.
Missing or incorrect OAuth2 credentials in the Slack node cause message sending failures.
Ensure calendar event start and end times use correct ISO format and timezone in booking nodes.

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.