8
n8n 中文网amn8n.com

争议警报和案件跟踪

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 18 个节点。主要使用 If, Code, Slack, ClickUp, HttpRequest 等节点。 使用Slack + ClickUp实现Stripe争议警报和案件跟踪自动化

前置要求
  • Slack Bot Token 或 Webhook URL
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "f9zTmUYtY72kArnG",
  "meta": {
    "instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177"
  },
  "name": "争议警报和案件跟踪",
  "tags": [
    {
      "id": "BpF0Qmae1NRI1U4c",
      "name": "Dispute Management",
      "createdAt": "2025-09-23T11:26:26.687Z",
      "updatedAt": "2025-09-23T11:26:26.687Z"
    },
    {
      "id": "dgO0TsPr0SmRbCKq",
      "name": "Stripe Automation",
      "createdAt": "2025-09-23T11:26:26.712Z",
      "updatedAt": "2025-09-23T11:26:26.712Z"
    }
  ],
  "nodes": [
    {
      "id": "58fe9cc9-46d1-4f70-8d1d-cc0c0d844e26",
      "name": "点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1328,
        736
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8409e177-a881-449b-8f03-384dcfa5da2b",
      "name": "📋 工作流概览",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        416
      ],
      "parameters": {
        "width": 280,
        "height": 304,
        "content": "## 🔄 工作流开始"
      },
      "typeVersion": 1
    },
    {
      "id": "7d8379ef-39c1-4b8f-b78b-64a488d4eae2",
      "name": "1️⃣ 获取 Stripe 争议",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Retrieves all current payment disputes from your Stripe account. This includes disputes that customers have filed against payments.",
      "position": [
        -1056,
        736
      ],
      "parameters": {
        "url": "https://api.stripe.com/v1/disputes",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "stripeApi"
      },
      "credentials": {
        "stripeApi": {
          "id": "DV4tPpxjbOUkGfAx",
          "name": "Stripe account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "be8f6d05-cd3f-4ea0-a658-2ee402b92a9b",
      "name": "📊 数据检查信息",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        944
      ],
      "parameters": {
        "width": 260,
        "height": 332,
        "content": "## 🔍 数据验证"
      },
      "typeVersion": 1
    },
    {
      "id": "53483405-3ad7-4298-b3d2-5e9fb6e88e03",
      "name": "2️⃣ 验证争议数据",
      "type": "n8n-nodes-base.if",
      "notes": "Checks if the Stripe API returned any disputes. If no disputes exist, workflow will notify and end gracefully.",
      "position": [
        -800,
        736
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "condition1",
              "operator": {
                "type": "boolean",
                "operation": "equal"
              },
              "leftValue": "={{ $json.data && $json.data.length > 0 }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "853ffdbf-ac1a-41dd-9c29-cd9ed36e4e37",
      "name": "⚠️ 优先级逻辑",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        304
      ],
      "parameters": {
        "width": 280,
        "height": 316,
        "content": "## ⚡ 优先级评估"
      },
      "typeVersion": 1
    },
    {
      "id": "ed16b61a-4131-446e-aaa9-a5dae2d93dfb",
      "name": "3️⃣ 确定优先级级别",
      "type": "n8n-nodes-base.if",
      "notes": "Analyzes dispute urgency. High priority disputes (needs_response status) get immediate alerts, others get standard notifications.",
      "position": [
        -368,
        640
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "condition1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data[0].status }}",
              "rightValue": "needs_response"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "99b8a90e-7421-4de5-aaa8-1b207c69fc33",
      "name": "🚨 紧急操作",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        304
      ],
      "parameters": {
        "width": 280,
        "height": 300,
        "content": "## 🚨 高优先级路径"
      },
      "typeVersion": 1
    },
    {
      "id": "f20b396e-13d8-4762-9378-5fe27a7b6c7a",
      "name": "4a️⃣ 发送紧急 Slack 警报",
      "type": "n8n-nodes-base.slack",
      "notes": "Sends immediate alert to Slack with comprehensive dispute information. Formatted for high visibility and quick action.",
      "position": [
        -144,
        624
      ],
      "webhookId": "7de9b2a5-9e88-4e24-b903-67fae9142120",
      "parameters": {
        "text": "=🚨 **HIGH PRIORITY DISPUTE ALERT** 🚨\n\n*Dispute Details:*\n• **Amount:** {{ $json.formatted_amount }}\n• **Reason:** {{ $json.reason.charAt(0).toUpperCase() + $json.reason.slice(1) }}\n• **Status:** {{ $json.status.charAt(0).toUpperCase() + $json.status.slice(1) }}\n• **Priority:** {{ $json.priority }}\n• **Customer:** {{ $json.customer_info }}\n\n*Timeline:*\n• **Created:** {{ $json.created_date }}\n• **Evidence Due:** {{ $json.evidence_deadline }}\n• **Days Remaining:** {{ $json.days_until_deadline }} days\n\n*IDs for Reference:*\n• **Dispute ID:** `{{ $json.dispute_id }}`\n• **Charge ID:** `{{ $json.charge_id }}`\n• **Payment Intent:** `{{ $json.payment_intent_id }}`\n\n⚠️ Immediate action required for High Priority disputes!",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "select": "user",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "rNqvWj9TfChPVRYY",
          "name": "Slack account vivek"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "37c7b6d3-9b83-4c89-a611-eb988d8f7523",
      "name": "5a️⃣ 创建紧急 ClickUp 任务",
      "type": "n8n-nodes-base.clickUp",
      "notes": "Creates high-priority task in ClickUp with detailed action plan and evidence deadline as due date.",
      "position": [
        96,
        624
      ],
      "parameters": {
        "list": "901611225384",
        "name": "=🚨 URGENT: Dispute {{ $json.dispute_id }} - {{ $json.formatted_amount }}",
        "team": "90161261705",
        "space": "90165174252",
        "folderless": true,
        "additionalFields": {
          "status": "Open",
          "dueDate": "={{ $json.evidence_deadline }}",
          "priority": "1"
        }
      },
      "credentials": {
        "clickUpApi": {
          "id": "mcOAWijv7qCSnkNx",
          "name": "ClickUp account-test anuj"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9144129c-51ac-4fc7-bcfb-63c7076a5dfb",
      "name": "📊 标准流程",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        1040
      ],
      "parameters": {
        "width": 280,
        "height": 316,
        "content": "## 📋 常规优先级路径"
      },
      "typeVersion": 1
    },
    {
      "id": "874519fe-db61-42c9-894d-ae03fb65d1a0",
      "name": "4b️⃣ 发送标准 Slack 警报",
      "type": "n8n-nodes-base.slack",
      "notes": "Sends standard dispute notification to Slack for non-urgent cases. Contains essential information for tracking.",
      "position": [
        -176,
        848
      ],
      "webhookId": "cb14a1ec-1847-4131-b60e-195bc6e9b789",
      "parameters": {
        "text": "=📋 **New Dispute Notification**\n\n*Details:*\n• **Amount:** {{ $json.formatted_amount }}\n• **Reason:** {{ $json.reason.charAt(0).toUpperCase() + $json.reason.slice(1) }}\n• **Priority:** {{ $json.priority }}\n• **Evidence Due:** {{ $json.evidence_deadline }} ({{ $json.days_until_deadline }} days)\n• **Customer:** {{ $json.customer_info }}\n\n*Reference:* `{{ $json.dispute_id }}`",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "U09D7N46YLV",
          "cachedResultName": "herevivekpatidar"
        },
        "select": "user",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "rNqvWj9TfChPVRYY",
          "name": "Slack account vivek"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "71e0651d-577e-4c10-a685-d0ba87fc27a0",
      "name": "5b️⃣ 创建标准 ClickUp 任务",
      "type": "n8n-nodes-base.clickUp",
      "notes": "Creates standard priority task in ClickUp with appropriate priority level and comprehensive details.",
      "position": [
        112,
        848
      ],
      "parameters": {
        "list": "901611225384",
        "name": "=Dispute: {{ $json.dispute_id }} - {{ $json.formatted_amount }}",
        "team": "90161261705",
        "space": "90165174252",
        "folderless": true,
        "additionalFields": {
          "status": "To Do",
          "dueDate": "={{ $json.evidence_deadline }}",
          "priority": "={{ $json.priority === 'High' ? '1' : ($json.priority === 'Medium' ? '2' : '3') }}"
        }
      },
      "credentials": {
        "clickUpApi": {
          "id": "mcOAWijv7qCSnkNx",
          "name": "ClickUp account-test anuj"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "99c2b53a-5770-43d7-af23-c11e33c9a1ca",
      "name": "✅ 无需操作",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        976
      ],
      "parameters": {
        "width": 264,
        "height": 348,
        "content": "## ℹ️ 未找到争议"
      },
      "typeVersion": 1
    },
    {
      "id": "d2afaf00-ef9a-4425-82b0-dc57f34f4424",
      "name": "6️⃣ 发送状态摘要",
      "type": "n8n-nodes-base.slack",
      "notes": "Sends confirmation message when no disputes need processing. Provides audit trail of workflow execution.",
      "position": [
        -496,
        800
      ],
      "webhookId": "10571d90-875c-4e22-ae06-6e120e723efd",
      "parameters": {
        "text": "=ℹ️ **Dispute Monitoring Summary**\n\n• **Total disputes found:** {{ $json.data.length }}\n• **Time:** {{ new Date().toLocaleString() }}\n• **Status:** No new disputes to process\n\nAll current disputes have been previously handled.\n\n✅ Monitoring system is working correctly.",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "U09D7N46YLV",
          "cachedResultName": "herevivekpatidar"
        },
        "select": "user",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "rNqvWj9TfChPVRYY",
          "name": "Slack account vivek"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b1126924-f2a8-491a-b42a-b17c66a4ef96",
      "name": "⚙️ 设置说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1712,
        592
      ],
      "parameters": {
        "width": 280,
        "height": 384,
        "content": "## 🚀 自动化设置"
      },
      "typeVersion": 1
    },
    {
      "id": "3264e793-2963-4a6d-aaa7-b3401bde76e5",
      "name": "✅ 工作流完成",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        624
      ],
      "parameters": {
        "width": 280,
        "height": 368,
        "content": "## 🔄 工作流完成"
      },
      "typeVersion": 1
    },
    {
      "id": "cbf7a6c5-4829-421b-89a1-dfbe1f102c85",
      "name": "🔧 格式化争议数据",
      "type": "n8n-nodes-base.code",
      "notes": "Transforms raw Stripe data into user-friendly format. Calculates priority, formats amounts, and prepares data for notifications.",
      "position": [
        -576,
        656
      ],
      "parameters": {
        "jsCode": "// Transform raw Stripe dispute data into formatted output for notifications\nconst items = $input.all();\n\nreturn items.map(item => {\n  const dispute = item.json.data[0]; // Get first dispute from array\n  \n  // Format amount with currency\n  const amount = dispute.amount / 100; // Convert from cents\n  const currency = dispute.currency.toUpperCase();\n  const formatted_amount = `${currency} ${amount.toFixed(2)}`;\n  \n  // Calculate days until evidence deadline\n  const evidenceDate = new Date(dispute.evidence_details.due_by * 1000);\n  const now = new Date();\n  const days_until_deadline = Math.ceil((evidenceDate - now) / (1000 * 60 * 60 * 24));\n  \n  // Determine priority based on days remaining and amount\n  let priority = 'Low';\n  if (days_until_deadline <= 3 || amount >= 500) {\n    priority = 'High';\n  } else if (days_until_deadline <= 7 || amount >= 100) {\n    priority = 'Medium';\n  }\n  \n  // Get customer information\n  const customer_info = dispute.charge?.billing_details?.email || \n                       dispute.charge?.customer || \n                       'Unknown customer';\n  \n  return {\n    json: {\n      ...dispute,\n      formatted_amount,\n      priority,\n      days_until_deadline,\n      evidence_deadline: evidenceDate.toLocaleDateString(),\n      created_date: new Date(dispute.created * 1000).toLocaleDateString(),\n      customer_info,\n      dispute_id: dispute.id,\n      charge_id: dispute.charge?.id || 'N/A',\n      payment_intent_id: dispute.payment_intent || 'N/A'\n    }\n  };\n});"
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "31c94be9-7bf0-4cbb-8684-a5354a504073",
  "connections": {
    "🔧 Format Dispute Data": {
      "main": [
        [
          {
            "node": "3️⃣ Determine Priority Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1️⃣ Fetch Stripe Disputes": {
      "main": [
        [
          {
            "node": "2️⃣ Validate Disputes Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2️⃣ Validate Disputes Data": {
      "main": [
        [
          {
            "node": "🔧 Format Dispute Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "6️⃣ Send Status Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3️⃣ Determine Priority Level": {
      "main": [
        [
          {
            "node": "4a️⃣ Send Urgent Slack Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "4b️⃣ Send Standard Slack Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4a️⃣ Send Urgent Slack Alert": {
      "main": [
        [
          {
            "node": "5a️⃣ Create Urgent ClickUp Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4b️⃣ Send Standard Slack Alert": {
      "main": [
        [
          {
            "node": "5b️⃣ Create Standard ClickUp Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "1️⃣ Fetch Stripe Disputes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 内容创作, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量18
分类2
节点类型7
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Rahul Joshi

Rahul Joshi

@rahul08

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

外部链接
在 n8n.io 查看

分享此工作流