You are helping me build the following AI agent workflow. ## Goal Real Estate Lead Qualifier via SMS: Instantly texts new website leads to qualify them via chat, logging budget and preferences to Google Sheets. ## Specification - What it does: You instantly qualify real estate leads via SMS by gathering their budget, location preferences, and timeline directly from website visitors. The agent remembers each conversation using your phone numbers and automatically saves all details to Google Sheets for easy access. - Trigger: Triggered by an event (Event ยท on new form submission) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Twilio: SMS communication with leads - OpenAI Chat Model: Conversational qualification agent - Google Sheets: Logging lead summaries and data - Postgres Chat Memory: Storing chat history per phone number ## Known pitfalls, handle each one explicitly in your implementation 1. SMS character limits can truncate long AI responses so you must implement logic to split messages or summarize key points before sending. 2. Chat memory can grow indefinitely and increase token costs so implement a sliding window strategy that only keeps the last N exchanges in context. ## Reference implementation https://n8n.io/workflows/6332 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/real-estate-lead-qualifier-via-sms/ via usecasesforagents.com