تذكيرات تلقائية بالفواتير المتأخرة
كل صباح، يصل العملاء أصحاب الفواتير المتأخرة تذكير مهذب بالبريد.
كيف تعمل
المشغّل: جدول زمني — أيام العمل الساعة 9:00
- اقرأ جدول الفواتير.
- احتفظ بالفواتير غير المدفوعة التي تجاوزت موعد استحقاقها.
- أرسل لكل عميل تذكيرًا لطيفًا بالمبلغ وعدد أيام التأخير.
المخطط
مشغّل تطبيق كود
الكود
كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.
// Invoices sheet columns: invoice | client | email | amount | due_date | status
// Keeps unpaid invoices that are past their due date.
const DAY = 24 * 60 * 60 * 1000;
const today = new Date();
today.setHours(0, 0, 0, 0);
return $input.all()
.map((item) => item.json)
.filter((r) => r.email && String(r.status).toLowerCase() !== "paid" && new Date(r.due_date) < today)
.map((r) => ({
json: { ...r, days_late: Math.floor((today - new Date(r.due_date)) / DAY) },
}));ابنِها بأداتك
اختر أداتك — نفس الأتمتة، خطوة بخطوة.
انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_.
عرض الكود (139 سطر)
{
"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": "329e24cb-bac4-44a3-ab91-22f1786e75ae",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 9 * * 1-5"
}
]
}
},
"id": "329e24cb-bac4-44a3-ab91-22f1786e75ae",
"name": "Weekdays 9:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
]
},
{
"parameters": {
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Invoices",
"mode": "name"
},
"options": {}
},
"id": "329e24cb-bac4-44a3-ab91-22f1786e75ae",
"name": "Read invoices",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
300,
0
]
},
{
"parameters": {
"jsCode": "// Invoices sheet columns: invoice | client | email | amount | due_date | status\n// Keeps unpaid invoices that are past their due date.\nconst DAY = 24 * 60 * 60 * 1000;\nconst today = new Date();\ntoday.setHours(0, 0, 0, 0);\n\nreturn $input.all()\n .map((item) => item.json)\n .filter((r) => r.email && String(r.status).toLowerCase() !== \"paid\" && new Date(r.due_date) < today)\n .map((r) => ({\n json: { ...r, days_late: Math.floor((today - new Date(r.due_date)) / DAY) },\n }));"
},
"id": "329e24cb-bac4-44a3-ab91-22f1786e75ae",
"name": "Find overdue",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
600,
0
]
},
{
"parameters": {
"sendTo": "={{ $json.email }}",
"subject": "=Friendly reminder: invoice {{ $json.invoice }}",
"emailType": "text",
"message": "=Hi {{ $json.client }},\n\nJust a friendly reminder that invoice {{ $json.invoice }} for {{ $json.amount }} was due {{ $json.days_late }} day(s) ago. If you've already paid, please ignore this email.\n\nThank you!\nYOUR_NAME",
"options": {
"appendAttribution": false
}
},
"id": "329e24cb-bac4-44a3-ab91-22f1786e75ae",
"name": "Send reminder",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
900,
0
]
}
],
"connections": {
"Weekdays 9:00": {
"main": [
[
{
"node": "Read invoices",
"type": "main",
"index": 0
}
]
]
},
"Read invoices": {
"main": [
[
{
"node": "Find overdue",
"type": "main",
"index": 0
}
]
]
},
"Find overdue": {
"main": [
[
{
"node": "Send reminder",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}في Make، أنشئ سيناريو جديدًا وأضف هذه الوحدات بالترتيب:
- Schedule the scenario: Weekdays 9:00
- Google Sheets › Search Rows
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Gmail › Send an Email
- كل تشغيل لوحدة يستهلك عمليات (operations) في Make — والباقة المجانية تتضمن حصة شهرية.
- دوال Make المدمجة (map و sum و formatDate…) تغني عن معظم خطوات Code؛ وللمنطق المعقد استخدم وحدة كود.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
في Zapier، أنشئ Zap جديدًا وأضف هذه الخطوات بالترتيب:
- Schedule by Zapier — Weekdays 9:00
- Google Sheets — Lookup Spreadsheet Rows (or Code by Zapier)
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Gmail — Send Email
- الـ Zaps التي فيها أكثر من خطوتين تحتاج باقة Zapier مدفوعة.
- الـ Webhooks والفلاتر/المسارات و Code by Zapier ميزات مدفوعة في بعض باقات Zapier.
- Code by Zapier يشغّل JavaScript: أعد استخدام الكود بالأعلى، مع قراءة المدخلات من inputData بدلًا من $json.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
نصائح
- علّم الفاتورة "paid" في الجدول فتتوقف التذكيرات تلقائيًا.
- أضف خطوة لإرسال التذكير مرة واحدة أسبوعيًا كحد أقصى لكل فاتورة.
أتمتات مشابهة
المالية والإدارةمتوسط
تقرير مؤشرات الأداء الأسبوعي بالبريد
كل يوم اثنين، يصلك ملخص قصير لأهم أرقام الأسبوع الماضي من جدولك.
Google Sheets → Gmail3 س/شهر
المالية والإدارةمتوسط
الذكاء الاصطناعي يقرأ إيصالات البريد إلى جدول المصروفات
الذكاء الاصطناعي يستخرج البائع والمبلغ والعملة والتاريخ من رسائل الإيصالات ويسجلها.
Gmail → AI model → Google Sheets5 س/شهر
المالية والإدارةسهل
المصروفات الشهرية حسب البند، بالبريد إلى محاسبك
في أول كل شهر، اجمع مصروفات الشهر الماضي حسب البند وأرسل الملخص إلى محاسبك.
Google Sheets → Gmail2 س/شهر