Quick Overview
This workflow accepts move-out inspection data via a webhook, logs it to Google Sheets, uses OpenAI to classify damages as chargeable or wear-and-tear, computes the security deposit refund or amount owed, emails an itemized statement via Gmail, and notifies the landlord via Telegram with daily pending reminders.
How it works
- Receives a POST webhook request with move-out details (tenant, unit, deposit, unpaid balances, and a damages list).
- Normalizes the payload, validates required fields, and either alerts the landlord about an invalid intake via Telegram and Gmail or continues.
- Appends the move-out as pending to a Google Sheets MoveOutLog tab and prepares the inspection details for review.
- Uses OpenAI to classify each damage item as chargeable or wear-and-tear with estimated costs, then parses and cleans the returned JSON.
- Calculates total deductions, applies unpaid rent/utilities, and generates an itemized deposit disposition statement with the net refund or amount owed.
- Emails the statement to the tenant via Gmail, updates the matching row in Google Sheets, and notifies the landlord via Telegram (plus a copy by Gmail when the tenant owes money).
- Runs daily on a schedule to scan Google Sheets for move-outs pending 3+ days and sends the landlord a Telegram/Gmail reminder or an all-clear message.
Setup
- Create and connect credentials for Google Sheets, OpenAI (Chat), Gmail, and Telegram.
- Create a Google Sheet with a MoveOutLog tab and columns that match the workflow’s fields (at minimum moveout_id, tenant_name, tenant_email, unit, move_out_date, deposit_amount, unpaid_rent, unpaid_utilities, damages, status, received_at, plus disposition outputs like deduction_total, unpaid_total, net_refund, classified_at).
- Update the Google Sheets document ID, sheet name, and matching column (moveout_id) if you use a different spreadsheet structure.
- Configure the webhook URL in your move-out intake source (property system or form) to POST to /lease/moveout with the expected fields, including a damages array.
- Set the landlord notification targets by updating the Telegram chat ID and the landlord email address used for invalid-intake, owed-copy, and daily sweep emails.
- Adjust the daily sweep cron schedule and the pending threshold (currently 3+ days) to fit your operations.