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

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


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