一个 Webhook 接收所有外部事件,分类路由到对应子工作流。
适用场景
Teams using 3+ SaaS tools that want centralized automation instead of point-to-point integrations.
前提条件
n8n self-hosted or Cloud, external app webhook capability
工作流图
用 n8n 搭建 Webhook 自动化中心
分步指南
-
Create Webhook Trigger
Add a Webhook node. Set method to POST. Copy the webhook URL. This URL will receive all events from your external apps. Configure a response to return 200 OK immediately.
-
Parse and Classify Event
Add a Code node to parse the incoming JSON. Extract event_type from the payload. Use a Switch node to route based on event_type: payment_received, form_submitted, issue_opened, etc.
-
Build Sub-Workflows
For each event type, create a sub-workflow: payment_received updates CRM + sends receipt, form_submitted adds to spreadsheet + sends welcome email, issue_opened creates Slack alert + assigns in project tool.
-
Add Error Handling
Add an Error Trigger node that catches failures and sends a Slack/Discord notification with the error details. Set retry logic: 3 retries with exponential backoff for API failures.
-
Test and Deploy
Send test webhooks using curl or Postman for each event type. Verify routing works correctly. Configure your external apps to send webhooks to this n8n endpoint. Monitor the execution log daily for the first week.