Business Process Automationadvanced
November 15, 2025
6 min read
1 hour 30 minutes
Build an AI-Powered HR Automation System with WhatsApp and n8n
Turn WhatsApp into a fully automated HR command center that manages leave requests, attendance, policy queries, and hiring using n8n, AI, and Google Workspace.
By Nayma Sultana

HR teams spend countless hours on repetitive tasks. Approving leave requests, answering policy questions, tracking attendance, forwarding complaints to department heads, and screening resumes. It's the same cycle every week, draining time that could go toward strategic work.
What if employees could simply send a WhatsApp message and get instant responses? What if your HR system could understand natural language, route requests intelligently, and take action without human intervention?
This n8n workflow does exactly that. It transforms WhatsApp into a complete HR command center, powered by GPT-4 and integrated with Google Workspace. One message triggers the right automation, whether it's booking interview slots, logging attendance via GPS, or escalating urgent complaints.
Prerequisites: What You'll Need
Before building this workflow, make sure you have access to these services:
- n8n instance (cloud or self-hosted)
- WhatsApp Business API account with credentials
- OpenAI API key (for GPT-4 and embeddings)
- Google Workspace account with:
- Google Sheets (for employee data, leave records, attendance)
- Gmail (for sending approval emails)
- Google Calendar (for interview scheduling)
- Google Drive (for CV storage)
- Supabase account (for vector storage of policy documents)
- Google Gemini API key (for transcribing audio and analyzing images)
Key Components: The n8n Nodes Powering This System
This workflow uses several specialized n8n nodes working together:
- WhatsApp Trigger: Receives incoming messages
- AI Agent nodes: Five specialized agents handle different HR tasks
- OpenAI Chat Model: Powers the classification and agent reasoning
- Google Gemini: Transcribes voice notes and analyzes images
- Supabase Vector Store: Stores and retrieves company policies using semantic search
- Google Sheets Tool: Reads and writes employee data
- Gmail Tool: Sends automated emails
- Google Calendar Tool: Books interview meetings
- Switch nodes: Route messages based on classification
- Code node: Validates office location using geofencing
How to Build This Workflow: Step by Step
Step 1: Set Up Message Classification
Start with a WhatsApp Trigger node that listens for incoming messages. Every message flows into a classification system powered by GPT-4.
The Delegatory LLM node analyzes each message and returns a single number based on intent:
- 1 for leave requests
- 2 for HR policy questions
- 3 for attendance (via location)
- 4 for complaints or escalations
- 5 for candidate shortlisting requests
img_1.png
The prompt instructs the AI to examine message type and content. If someone sends "I need leave tomorrow," it returns 1. If they share their GPS location, it returns 3. If they upload a voice note asking about holidays, it returns 2.
This classification output feeds into a Switch node that routes the message to the correct specialized agent.
Step 2: Handle Leave Requests Automatically
The Leave Agent connects to your Google Sheets database containing employee information. When a leave request arrives, it extracts the dates and employee name, then checks available leave balance.
For single-day sick leave with sufficient balance, the agent sends an approval email immediately using the Gmail Tool. It CCs the department head, deducts one day from the employee's leave quota, and updates the "last leave" field in the spreadsheet.
img_2.png
img_3.png
For longer leave requests or different leave types, it forwards the request to the department head for manual approval. The employee receives a WhatsApp confirmation either way.
Step 3: Create a Smart HR Chatbot with Vector Search
The HR Chatbot Agent handles general queries. Employees can ask about dress code, holiday lists, salary slips, or leave policies. They can send text, voice notes, or even photos of documents.
Here's where it gets interesting. The workflow includes a Verify Message Type switch that detects audio and image inputs. Audio gets transcribed using Google Gemini, and images are analyzed to extract text. Everything converts to a standard format before reaching the agent.
The agent has access to a Supabase Vector Store loaded with your company's policy documents. When someone asks "How many holidays do we get?" it performs semantic search across embedded policies and retrieves relevant passages. The response includes the accurate information without you manually updating FAQs.
The agent can also check attendance records and calculate how many days an employee worked, including overtime hours.
Step 4: Track Attendance with GPS Validation
When an employee shares their location via WhatsApp, the Attendance Agent takes over. A custom Code node uses the haversine formula to calculate distance between the shared coordinates and your office boundary polygon.
If the employee is within range (approximately 100 meters), the system logs their entry or exit time in Google Sheets. The first location share of the day creates an entry timestamp. The second one adds an exit timestamp. If they mention overtime, the agent calculates extra hours automatically.
img_4.png
Employees outside the office perimeter receive a message asking them to share location again once inside the building. No manual attendance registers, no buddy punching, no paper trails.
Step 5: Automate Candidate Shortlisting and Interview Scheduling
Recruitment gets its own dedicated agent. When you message "Shortlist 3 candidates for backend developer," the Shortlist Agent springs into action.
It retrieves the job description from your JD Google Sheet and pulls applicant data filtered by the requested position. Then it calls a sub-workflow that downloads CVs from Google Drive and extracts text content.
The agent compares each CV against the job requirements, scoring candidates from 1 to 10 based on experience, relevant projects, and listed skills. It writes results to a spreadsheet including the score, reasoning, and missing skills for each candidate.
img_5.png
Top candidates automatically get interview slots booked via Google Calendar. The system sends you a WhatsApp message with meeting details and a confirmation link. Once you approve, personalized emails go out to shortlisted candidates with interview times and encouraging messages. Rejected candidates receive polite notifications thanking them for applying.
Step 6: Forward Complaints and Requests Instantly
The Email Agent handles escalations. If an employee messages "Send a complaint to IT about my laptop issue," the agent generates a professional email describing the problem. It fetches the department head's email from Google Sheets and sends the message with proper formatting and context.
img_6.png
This eliminates the friction of employees not knowing who to contact or how to phrase formal requests. The AI handles tone, structure, and routing.
Benefits and Real-World Use Cases
This workflow transforms how HR departments operate. Teams using similar automation report 70% reduction in response time for routine queries. Employees get instant answers at any hour without waiting for business hours.
Leave approvals that once took hours now complete in seconds. Attendance tracking becomes effortless with location sharing. Recruitment teams can screen dozens of candidates in minutes instead of days.
The vector search capability means your policy knowledge base stays current. Update documents once and the chatbot automatically has access to new information. No more outdated FAQ pages or inconsistent answers from different HR team members.
Multimodal support breaks language barriers. Employees who prefer voice over text, or who need to share document photos, can interact naturally. The system understands intent regardless of input format.
You can extend this workflow for onboarding automation, training session booking, payroll queries, expense approvals, or facility requests. The architecture scales to handle any HR process that follows clear rules and has defined data sources.
The best part? Everything runs through WhatsApp, an app employees already use daily. No new software to learn, no separate portals to remember, no app downloads required. Just natural conversation that triggers sophisticated automation behind the scenes.
Building intelligent HR systems used to require enterprise budgets and development teams. With n8n, OpenAI, and Google Workspace, you can deploy this complete solution in an afternoon. Your HR team focuses on people, while AI handles the paperwork.
Share this article
Help others discover this content
Tap and hold the link button above to access your device's native sharing options
More in Business Process Automation
Continue exploring workflows in this category

Business Process Automationintermediate
1 min read
Automated Lead Generation & Qualification Using GPT-4o, Google Workspace, and Smart Follow-Up Workflows
Nayma Sultana
Nov 13
Est: 55 minutes

Business Process Automationadvanced
1 min read
The N8N Workflow That Reverse-Engineers Your Competition
Kazi Sakib
Nov 11
Est: 45 minutes

Business Process Automationadvanced
1 min read
Transform Your Hiring Process: Build an AI-Powered Recruitment System with n8n
Nayma Sultana
Nov 9
Est: 2 hour