أرسل الوحدات الجديدة للمشترين المناسبين على واتساب
عند إضافة وحدة، تصل لكل مشترٍ موافق على التواصل تطابق منطقته ونوعه وميزانيته على واتساب.
كيف تعمل
المشغّل: Google Sheets — صف جديد في جدول Listings
- أضف وحدة (الكود، المنطقة، النوع، الغرف، السعر، رابط الصور).
- اقرأ جدول Buyers.
- احتفظ بالمشترين الموافقين الذين تناسبهم المنطقة والنوع والميزانية.
- أرسل لكل منهم قالب واتساب بالوحدة.
المخطط
مشغّل تطبيق كود
الكود
كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.
// Buyers sheet columns: name | phone | area | type (apartment, villa…) | min_budget | max_budget | opted_in
// Finds opted-in buyers whose area, type and budget fit the new listing.
const listing = $("New listing").first().json;
const price = Number(String(listing.price).replace(/[^0-9.]/g, ""));
const same = (a, b) => String(a || "").trim().toLowerCase() === String(b || "").trim().toLowerCase();
return $input.all()
.map((item) => item.json)
.filter((b) => String(b.opted_in).toLowerCase() === "yes" && b.phone)
.filter((b) => same(b.area, listing.area) && (!b.type || same(b.type, listing.type)))
.filter((b) => price >= (Number(b.min_budget) || 0) && price <= (Number(b.max_budget) || Infinity))
.map((b) => ({
json: {
phone: String(b.phone).replace(/[^0-9]/g, ""),
name: b.name,
code: listing.code,
summary: `${listing.type} · ${listing.bedrooms} bed · ${listing.area}`,
price: listing.price,
link: listing.photos_link || "",
},
}));ابنِها بأداتك
اختر أداتك — نفس الأتمتة، خطوة بخطوة.
انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_.
عرض الكود (174 سطر)
{
"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": "343164f5-4864-4c3c-aba4-cefe1e85c9da",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Listings",
"mode": "name"
},
"event": "rowAdded",
"options": {}
},
"id": "343164f5-4864-4c3c-aba4-cefe1e85c9da",
"name": "New listing",
"type": "n8n-nodes-base.googleSheetsTrigger",
"typeVersion": 1,
"position": [
0,
0
]
},
{
"parameters": {
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Buyers",
"mode": "name"
},
"options": {}
},
"id": "343164f5-4864-4c3c-aba4-cefe1e85c9da",
"name": "Read buyers",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
300,
0
]
},
{
"parameters": {
"jsCode": "// Buyers sheet columns: name | phone | area | type (apartment, villa…) | min_budget | max_budget | opted_in\n// Finds opted-in buyers whose area, type and budget fit the new listing.\nconst listing = $(\"New listing\").first().json;\nconst price = Number(String(listing.price).replace(/[^0-9.]/g, \"\"));\nconst same = (a, b) => String(a || \"\").trim().toLowerCase() === String(b || \"\").trim().toLowerCase();\n\nreturn $input.all()\n .map((item) => item.json)\n .filter((b) => String(b.opted_in).toLowerCase() === \"yes\" && b.phone)\n .filter((b) => same(b.area, listing.area) && (!b.type || same(b.type, listing.type)))\n .filter((b) => price >= (Number(b.min_budget) || 0) && price <= (Number(b.max_budget) || Infinity))\n .map((b) => ({\n json: {\n phone: String(b.phone).replace(/[^0-9]/g, \"\"),\n name: b.name,\n code: listing.code,\n summary: `${listing.type} · ${listing.bedrooms} bed · ${listing.area}`,\n price: listing.price,\n link: listing.photos_link || \"\",\n },\n }));"
},
"id": "343164f5-4864-4c3c-aba4-cefe1e85c9da",
"name": "Matching buyers",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
600,
0
]
},
{
"parameters": {
"operation": "sendTemplate",
"phoneNumberId": "YOUR_PHONE_NUMBER_ID",
"recipientPhoneNumber": "={{ $json.phone }}",
"template": "YOUR_NEW_LISTING_TEMPLATE|ar",
"components": {
"component": [
{
"type": "body",
"bodyParameters": {
"parameter": [
{
"type": "text",
"text": "={{ $json.name }}"
},
{
"type": "text",
"text": "={{ $json.summary }}"
},
{
"type": "text",
"text": "={{ $json.price }}"
},
{
"type": "text",
"text": "={{ $json.link }}"
}
]
}
}
]
}
},
"id": "343164f5-4864-4c3c-aba4-cefe1e85c9da",
"name": "Send the listing",
"type": "n8n-nodes-base.whatsApp",
"typeVersion": 1,
"position": [
900,
0
]
}
],
"connections": {
"New listing": {
"main": [
[
{
"node": "Read buyers",
"type": "main",
"index": 0
}
]
]
},
"Read buyers": {
"main": [
[
{
"node": "Matching buyers",
"type": "main",
"index": 0
}
]
]
},
"Matching buyers": {
"main": [
[
{
"node": "Send the listing",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}في Make، أنشئ سيناريو جديدًا وأضف هذه الوحدات بالترتيب:
- Google Sheets › Watch New Rows
- Google Sheets › Search Rows
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- WhatsApp Business Cloud › Send a Template Message
- كل تشغيل لوحدة يستهلك عمليات (operations) في Make — والباقة المجانية تتضمن حصة شهرية.
- دوال Make المدمجة (map و sum و formatDate…) تغني عن معظم خطوات Code؛ وللمنطق المعقد استخدم وحدة كود.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
في Zapier، أنشئ Zap جديدًا وأضف هذه الخطوات بالترتيب:
- Google Sheets — New Spreadsheet Row
- Google Sheets — Lookup Spreadsheet Rows (or Code by Zapier)
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- WhatsApp — Send Template Message
- الـ Zaps التي فيها أكثر من خطوتين تحتاج باقة Zapier مدفوعة.
- الـ Webhooks والفلاتر/المسارات و Code by Zapier ميزات مدفوعة في بعض باقات Zapier.
- Code by Zapier يشغّل JavaScript: أعد استخدام الكود بالأعلى، مع قراءة المدخلات من inputData بدلًا من $json.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
نصائح
- اكتب أسماء المناطق بنفس الطريقة في الجدولين، مثل "New Cairo".
أتمتات مشابهة
العقاراتسهل
تذكير بموعد الإيجار على واتساب
قبل موعد الإيجار بثلاثة أيام، يصل كل مستأجر تذكير مهذب على واتساب بالمبلغ والتاريخ.
Google Sheets → WhatsApp6 س/شهر
العقاراتسهل
استفسارات العقارات مباشرة إلى هاتف الوكيل
استفسارات الموقع والبوابات العقارية تُحفظ كعملاء محتملين وتصل الوكيل على تيليجرام خلال ثوانٍ.
Webhook → Google Sheets → Telegram5 س/شهر
تطبيقات المنطقةمتقدم
تحديثات شحنات بوسطة للعملاء على واتساب
يصل العميل رسالة واتساب عند استلام شحنته من بوسطة، وخروجها للتوصيل، وتسليمها.
Bosta → Google Sheets → WhatsApp10 س/شهر