# Hotel Housekeeping Auto-Assignment

**Category:** Hospitality  
**Tools:** n8n, Google Sheets, Slack  
**Nodes:** 25  
**Built by:** Forgent Systems

When a guest checks out, a cleaning task is created and assigned to the least-busy available staff based on room type. Staff get a WhatsApp alert and close the task through a form.

![Workflow](preview.webp)

## How it works

1. A booking status change to checked out starts the workflow.
2. Room type decides priority and how many staff are needed.
3. Available staff with the fewest active tasks are assigned, and Slack is alerted if nobody is free.
4. Staff are notified on WhatsApp and marked as busy.
5. A completion form response closes the task and frees the staff member.

## Use cases

- Hotels and resorts
- Serviced apartments
- Hostels

## Data setup

**Google Sheets** (tab: columns)

- **Housekeeping Auto-Task → Bookings**: _(columns as used in the nodes)_
- **Housekeeping Auto-Task → Staff**: `Status`, `Active`, `Phone`, `Staff ID`, `Active Tasks`
- **Housekeeping Auto-Task → Tasks**: `Task ID`, `Booking ID`, `Room No`, `RoomType`, `Cleaning Minutes`, `Priority`, `Assigned To`, `Phone`, `Status`, `CreatedAt`, `CompletedAt`
- **Housekeeping Auto-Task → Form Responses 1**: _(columns as used in the nodes)_

## Setup

1. In n8n open **Workflows → Import from File** and choose `workflow.json`.
2. Connect these credentials:
   - Google Sheets Trigger account
   - Google Sheets account
   - Slack account
   - Twilio account
3. Point the Sheets / Airtable / Drive / Slack nodes at your own resources (structure above).
4. Replace placeholder emails, phone numbers and `YOUR-FORM-ID` links with your own.
5. Times use the America/New_York timezone and dates use MM/DD/YYYY. Adjust if needed.
6. Run a test execution, then activate.

## Nodes

- **Loop Over Bookings** — `n8n-nodes-base.splitInBatches`
- **Trigger to Booking Status Updated** — `n8n-nodes-base.googleSheetsTrigger`
- **Check Status = Checked Out** — `n8n-nodes-base.if`
- **Logic for RoomType → Priority + Staff Count** — `n8n-nodes-base.code`
- **Get Available Staff List** — `n8n-nodes-base.googleSheets`
- **Auto Assign Staff (Lowest Active Tasks)** — `n8n-nodes-base.code`
- **Alert - Slack (No Staff Available)** — `n8n-nodes-base.slack`
- **Check Staff Availability** — `n8n-nodes-base.if`
- **Append - New Task** — `n8n-nodes-base.googleSheets`
- **Split Out Staff Phone Number** — `n8n-nodes-base.splitOut`
- **Notify For Task Assigned to Staff** — `n8n-nodes-base.twilio`
- **Update Staff Status = On Working** — `n8n-nodes-base.googleSheets`
- **Trigger - Form Response Added** — `n8n-nodes-base.googleSheetsTrigger`
- **Loop Over Form Responses** — `n8n-nodes-base.splitInBatches`
- **Check Response Status = Completed** — `n8n-nodes-base.if`
- **Get Task Row By Task ID** — `n8n-nodes-base.googleSheets`
- **Split Task Phones (Multiple Staff)** — `n8n-nodes-base.code`
- **Get Staff Row By Phone** — `n8n-nodes-base.googleSheets`
- **Logic - Update Active Tasks (+1)** — `n8n-nodes-base.code`
- **Update Staff Status 'Available' + 'ActiveTasks'** — `n8n-nodes-base.googleSheets`
- **Update Task Status = Completed** — `n8n-nodes-base.googleSheets`
- **Sticky Note1** — `n8n-nodes-base.stickyNote`
- **Sticky Note** — `n8n-nodes-base.stickyNote`
- **Sticky Note2** — `n8n-nodes-base.stickyNote`
- **Notify to Manager** — `n8n-nodes-base.twilio`
