تنبيه فوري عند فشل دفعة في Stripe
اعرف بالمدفوعات الفاشلة فورًا وسجّلها للمتابعة.
كيف تعمل
المشغّل: Stripe — حدث فشل الدفع
- استقبل حدث فشل الدفع من Stripe.
- أرسل بريد العميل والمبلغ وسبب الفشل إلى Slack.
- أضف نفس البيانات إلى ورقة "Failed payments".
المخطط
مشغّل تطبيق منطق
ابنِها بأداتك
اختر أداتك — نفس الأتمتة، خطوة بخطوة.
انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_.
عرض الكود (162 سطر)
{
"name": "تنبيه فوري عند فشل دفعة في Stripe (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## تنبيه فوري عند فشل دفعة في Stripe\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": "458223d5-1673-42cd-a93b-ba83e3101dc7",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"events": [
"payment_intent.payment_failed"
]
},
"id": "458223d5-1673-42cd-a93b-ba83e3101dc7",
"name": "Payment failed",
"type": "n8n-nodes-base.stripeTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"webhookId": "458223d5-1673-42cd-a93b-ba83e3101dc7"
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "#billing",
"mode": "name"
},
"text": "=💳 Payment failed: {{ ($json.data.object.amount / 100).toFixed(2) }} {{ $json.data.object.currency.toUpperCase() }}\nCustomer: {{ $json.data.object.receipt_email || $json.data.object.customer }}\nReason: {{ $json.data.object.last_payment_error?.message }}",
"otherOptions": {}
},
"id": "458223d5-1673-42cd-a93b-ba83e3101dc7",
"name": "Alert #billing",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
300,
0
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "a1",
"name": "date",
"value": "={{ $now.toISO() }}",
"type": "string"
},
{
"id": "a2",
"name": "customer",
"value": "={{ $json.data.object.receipt_email || $json.data.object.customer }}",
"type": "string"
},
{
"id": "a3",
"name": "amount",
"value": "={{ $json.data.object.amount / 100 }}",
"type": "number"
},
{
"id": "a4",
"name": "reason",
"value": "={{ $json.data.object.last_payment_error?.message }}",
"type": "string"
}
]
},
"options": {}
},
"id": "458223d5-1673-42cd-a93b-ba83e3101dc7",
"name": "Pick fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
300,
220
]
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Failed payments",
"mode": "name"
},
"columns": {
"mappingMode": "autoMapInputData",
"value": {}
},
"options": {}
},
"id": "458223d5-1673-42cd-a93b-ba83e3101dc7",
"name": "Log failed payment",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
600,
0
]
}
],
"connections": {
"Payment failed": {
"main": [
[
{
"node": "Alert #billing",
"type": "main",
"index": 0
},
{
"node": "Pick fields",
"type": "main",
"index": 0
}
]
]
},
"Pick fields": {
"main": [
[
{
"node": "Log failed payment",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}في Make، أنشئ سيناريو جديدًا وأضف هذه الوحدات بالترتيب:
- Stripe › Watch Events (payment failed)
- Slack › Create a Message
- Tools › Set multiple variables
- Google Sheets › Add a Row
- كل تشغيل لوحدة يستهلك عمليات (operations) في Make — والباقة المجانية تتضمن حصة شهرية.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
في Zapier، أنشئ Zap جديدًا وأضف هذه الخطوات بالترتيب:
- Stripe — New Event (payment failed)
- Slack — Send Channel Message
- Formatter by Zapier (map the fields you need)
- Google Sheets — Create Spreadsheet Row
- الـ Zaps التي فيها أكثر من خطوتين تحتاج باقة Zapier مدفوعة.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
نصائح
- أضف خطوة Gmail ترسل للعميل تذكيرًا لطيفًا بتحديث بطاقته.
أتمتات مشابهة
المالية والإدارةسهل
الفواتير المدفوعة في جدول المحاسبة
كل فاتورة مدفوعة في Stripe تُسجَّل تلقائيًا، جاهزة لمحاسبك.
Stripe → Google Sheets5 س/شهر
المالية والإدارةمتوسط
إيرادات Stripe اليومية في Slack
كل صباح، شاهد إيرادات الأمس وعدد المدفوعات في Slack.
Stripe → Slack2 س/شهر
المالية والإدارةمتوسط
تقرير مؤشرات الأداء الأسبوعي بالبريد
كل يوم اثنين، يصلك ملخص قصير لأهم أرقام الأسبوع الماضي من جدولك.
Google Sheets → Gmail3 س/شهر