وكيل ذكي لطلبات المستأجرين على واتساب
يبلغ المستأجرون عن الأعطال ويسألون عن الإيجار وقواعد المبنى على واتساب؛ ويسجّل الوكيل كل طلب للفريق.
كيف تعمل
- يبلغ المستأجر عن مشكلة أو يسأل سؤالًا.
- يراجع الوكيل سجل وحدته ومعلومات المبنى.
- للأعطال، يسأل الأسئلة الصحيحة ويسجّل طلب صيانة.
- ينبّه الفريق، ويحوّل الحالات العاجلة لرقم الطوارئ.
ماذا يستطيع أن يفعل
على عكس الأتمتة الثابتة، يقرر الوكيل أي أدواته يستخدم وبأي ترتيب — ويتذكر المحادثة.
- يسجّل طلبات الصيانة بالمشكلة ودرجة الاستعجال وموعد الزيارة
- يخبر المستأجر بإيجاره ويوم الاستحقاق ونهاية العقد
- يجيب عن قواعد المبنى وأسئلة الدفع
التعليمات (System prompt)
التعليمات التي تشكّل سلوك الوكيل. موجودة بالفعل داخل قالب n8n — انسخها إلى Make أو Zapier، وعدّل أجزاء YOUR_….
You are the WhatsApp assistant for YOUR_PROPERTY_COMPANY, talking to tenants. Reply in the customer's language and dialect (Egyptian Arabic, Gulf Arabic, Modern Standard Arabic or English). Be warm and brief.
Today is {{ $now.toFormat('cccc d LLLL yyyy') }}. The tenant's phone is {{ $('Get question').item.json.from }}.
Tools:
- "My unit": this tenant's record (building, unit, rent, due day, lease end, balance). It only returns the person who is messaging.
- "Building info": rules, payment methods, parking, garbage days, emergency contacts.
- "Log maintenance request": logs a repair request. Ask what's wrong, where in the unit, since when, and when someone can visit, before logging.
- "Notify team": alerts the property team about every maintenance request, payment questions, complaints and lease questions.
Rules:
- If "My unit" returns nothing, say the number isn't registered and use "Notify team".
- For urgent issues (water leak, no electricity, gas smell, broken door lock), tell them to call YOUR_EMERGENCY_PHONE now and use "Notify team".
- Never agree to rent changes, late-payment exceptions or lease terms; the team decides.
- Never share other tenants' details.قواعد الأمان
مدمجة في التعليمات والأدوات:
- يعرض للمستأجر وحدته فقط
- لا يوافق أبدًا على تغيير الإيجار أو العقد
- يحوّل تسريب المياه والكهرباء والغاز إلى خط الطوارئ
يستخدم مفتاح الذكاء الاصطناعي الخاص بك (Claude أو OpenAI أو غيرهما). التكلفة تعتمد على النموذج وطول المحادثة — والنموذج الصغير السريع يجعل معظم المحادثات بجزء من السنت.
المخطط
الكود
كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.
// Keeps only text messages and pulls out who sent it and what they asked.
const msg = $input.first().json.messages?.[0];
if (!msg || msg.type !== "text") return [];
return [{ json: { from: msg.from, question: msg.text.body } }];ابنِها بأداتك
اختر أداتك — نفس الأتمتة، خطوة بخطوة.
انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_. خطوات الذكاء الاصطناعي تستخدم نموذج Claude، ويمكنك استبداله بـ OpenAI أو Gemini أو Ollama.
عرض الكود (341 سطر)
{
"name": "وكيل ذكي لطلبات المستأجرين على واتساب (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## وكيل ذكي لطلبات المستأجرين على واتساب\nيبلغ المستأجرون عن الأعطال ويسألون عن الإيجار وقواعد المبنى على واتساب؛ ويسجّل الوكيل كل طلب للفريق.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
"height": 260,
"width": 340
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"updates": [
"messages"
]
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Incoming message",
"type": "n8n-nodes-base.whatsAppTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"webhookId": "3da33d1f-b5bd-449b-aacb-2636d9dfa052"
},
{
"parameters": {
"jsCode": "// Keeps only text messages and pulls out who sent it and what they asked.\nconst msg = $input.first().json.messages?.[0];\nif (!msg || msg.type !== \"text\") return [];\n\nreturn [{ json: { from: msg.from, question: msg.text.body } }];"
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Get question",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
300,
0
]
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.question }}",
"options": {
"systemMessage": "=You are the WhatsApp assistant for YOUR_PROPERTY_COMPANY, talking to tenants. Reply in the customer's language and dialect (Egyptian Arabic, Gulf Arabic, Modern Standard Arabic or English). Be warm and brief.\n\nToday is {{ $now.toFormat('cccc d LLLL yyyy') }}. The tenant's phone is {{ $('Get question').item.json.from }}.\n\nTools:\n- \"My unit\": this tenant's record (building, unit, rent, due day, lease end, balance). It only returns the person who is messaging.\n- \"Building info\": rules, payment methods, parking, garbage days, emergency contacts.\n- \"Log maintenance request\": logs a repair request. Ask what's wrong, where in the unit, since when, and when someone can visit, before logging.\n- \"Notify team\": alerts the property team about every maintenance request, payment questions, complaints and lease questions.\n\nRules:\n- If \"My unit\" returns nothing, say the number isn't registered and use \"Notify team\".\n- For urgent issues (water leak, no electricity, gas smell, broken door lock), tell them to call YOUR_EMERGENCY_PHONE now and use \"Notify team\".\n- Never agree to rent changes, late-payment exceptions or lease terms; the team decides.\n- Never share other tenants' details."
}
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Tenant agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.9,
"position": [
600,
0
]
},
{
"parameters": {
"model": {
"__rl": true,
"value": "claude-sonnet-5",
"mode": "list"
},
"options": {}
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Claude model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"typeVersion": 1.3,
"position": [
175,
220
]
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Get question').item.json.from }}",
"contextWindowLength": 10
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
345,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Returns the record of the tenant who is messaging.",
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Tenants",
"mode": "name"
},
"filtersUI": {
"values": [
{
"lookupColumn": "phone",
"lookupValue": "={{ $('Get question').item.json.from }}"
}
]
},
"options": {}
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "My unit",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
515,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Returns building rules, payment methods, parking, garbage days and emergency contacts.",
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Building info",
"mode": "name"
},
"options": {}
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Building info",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
685,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Logs a maintenance request.",
"operation": "append",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Maintenance",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"date": "={{ $now.toISO() }}",
"phone": "={{ $('Get question').item.json.from }}",
"unit": "={{ $fromAI('unit', \"Building and unit\", 'string') }}",
"problem": "={{ $fromAI('problem', \"What's wrong and where\", 'string') }}",
"urgency": "={{ $fromAI('urgency', \"urgent, soon or whenever\", 'string') }}",
"visit_time": "={{ $fromAI('visit_time', \"When someone can visit\", 'string') }}",
"status": "open"
}
},
"options": {}
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Log maintenance request",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
855,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Alerts the property team about maintenance, payments, complaints and lease questions.",
"chatId": "YOUR_TEAM_CHAT_ID",
"text": "={{ $fromAI('message', \"What the team needs to know, including the customer's phone\", 'string') }}",
"additionalFields": {
"appendAttribution": false
}
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Notify team",
"type": "n8n-nodes-base.telegramTool",
"typeVersion": 1.2,
"position": [
1025,
220
]
},
{
"parameters": {
"operation": "send",
"phoneNumberId": "YOUR_PHONE_NUMBER_ID",
"recipientPhoneNumber": "={{ $('Get question').item.json.from }}",
"textBody": "={{ $json.output }}"
},
"id": "3da33d1f-b5bd-449b-aacb-2636d9dfa052",
"name": "Reply on WhatsApp",
"type": "n8n-nodes-base.whatsApp",
"typeVersion": 1,
"position": [
900,
0
]
}
],
"connections": {
"Incoming message": {
"main": [
[
{
"node": "Get question",
"type": "main",
"index": 0
}
]
]
},
"Get question": {
"main": [
[
{
"node": "Tenant agent",
"type": "main",
"index": 0
}
]
]
},
"Tenant agent": {
"main": [
[
{
"node": "Reply on WhatsApp",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Tenant agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Memory": {
"ai_memory": [
[
{
"node": "Tenant agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"My unit": {
"ai_tool": [
[
{
"node": "Tenant agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Building info": {
"ai_tool": [
[
{
"node": "Tenant agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Log maintenance request": {
"ai_tool": [
[
{
"node": "Tenant agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Notify team": {
"ai_tool": [
[
{
"node": "Tenant agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}في Make، أنشئ سيناريو جديدًا وأضف هذه الوحدات بالترتيب:
- WhatsApp Business Cloud › Watch Events (messages)
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Make AI Agents › Run an agent — give it these tools: “My unit” (Google Sheets), “Building info” (Google Sheets), “Log maintenance request” (Google Sheets), “Notify team” (Telegram Bot); paste the system prompt as the agent's instructions
- WhatsApp Business Cloud › Send a Message
- كل تشغيل لوحدة يستهلك عمليات (operations) في Make — والباقة المجانية تتضمن حصة شهرية.
- دوال Make المدمجة (map و sum و formatDate…) تغني عن معظم خطوات Code؛ وللمنطق المعقد استخدم وحدة كود.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
في Zapier، أنشئ Zap جديدًا وأضف هذه الخطوات بالترتيب:
- WhatsApp — New Message
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Zapier Agents — create an agent (or AI by Zapier for a single step) — give it these tools: “My unit” (Google Sheets), “Building info” (Google Sheets), “Log maintenance request” (Google Sheets), “Notify team” (Telegram); paste the system prompt as the agent's instructions
- WhatsApp — Send Message
- الـ Zaps التي فيها أكثر من خطوتين تحتاج باقة Zapier مدفوعة.
- الـ Webhooks والفلاتر/المسارات و Code by Zapier ميزات مدفوعة في بعض باقات Zapier.
- Code by Zapier يشغّل JavaScript: أعد استخدام الكود بالأعلى، مع قراءة المدخلات من inputData بدلًا من $json.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
نصائح
- اجمعه مع أتمتة تذكير الإيجار، فهي تستخدم نفس جدول Tenants.
أتمتات مشابهة
وكيل مبيعات ذكي على واتساب (بالعربية)
يبيع على واتساب بلهجة العميل: يراجع منتجاتك، ويجيب الأسئلة، ويأخذ طلبات الدفع عند الاستلام.
وكيل ذكي للطلبات والمرتجعات على واتساب (بالعربية)
يجيب عن "طلبي فين؟"، ويعطي تحديثات التوصيل، ويسجل المرتجعات والاستبدال — بلهجة العميل.
وكيل ذكي للعقارات على واتساب
يفهم ما يريده العميل، ويقترح وحدات مناسبة، ويحجز المعاينات — بالعربية أو الإنجليزية.