使用強大的 n8n 工作流、PostgreSQL、Slack、Telegram 和 Email 自動化多通訊管道的任務提醒。使用這個穩健的 n8n 範本來確保排程和傳送的可靠性。
下載此 n8n 工作流程範本並立即開始使用。
建置通知微服務的系統管理員和開發人員。
需要集中化、可設定提醒排程的團隊。
尋找用於多通訊管道溝通的穩健、複雜 n8n 範本的使用者。
任何需要使用 n8n 實作具備資料庫後援的韌性自動化解決方案的人。
這個穩健的自動化方案解決了建立可靠、多通訊管道任務通知系統的挑戰。透過利用 n8n 工作流,任務會透過專用的 Webhook 接收並安全地儲存在 PostgreSQL 資料庫中。此系統的關鍵部分是排程的 n8n 觸發器,它會定期檢查是否有到期的任務。其主要價值在於動態路由能力,允許使用者在建立任務時指定偏好的通訊管道——Email、Slack 或 Telegram。這種先進的 n8n 工作流架構確保關鍵任務提醒能可靠地送達最可能被看到的管道,使其成為任何 n8n 自動化集合中極具價值的補充。此範本展示了如何將 PostgreSQL n8n 節點用於資料管理和在 n8n 工作流中進行流程控制的最佳實踐。
n8n 工作流結構上分為兩個主要元件:任務接收 (Task Ingestion) 和提醒派送 (Reminder Distribution)。
Webhook - Receive Task n8n 觸發器並提交包含任務詳細資訊的 JSON 資料包時,流程開始。Validate Input n8n 節點強制執行約束條件,確保提供了 userId、taskName 和 reminderTime。此處失敗將立即導致 Error Response。Save Task to Database n8n 節點,並以 'pending' (待處理) 狀態儲存到 PostgreSQL 中。成功的操作會回傳 Success Response。Schedule Trigger - Every 5 Minutes n8n 觸發器啟動,它依據 cron 排程 (/5 *) 運行。Fetch Due Tasks n8n 節點會查詢 PostgreSQL,找出 reminder_time 即將到期或已過期的待處理任務。Check Tasks Exist n8n 節點確保只有在檢索到記錄時流程才會繼續。接著流程會使用 Split Into Items n8n 節點分割記錄,以便獨立處理每個任務。Route by Channel n8n 節點會根據 channel 欄位的值(email、slack 或 telegram)動態路由任務。Send Email Reminder、Send Slack Reminder 或 Send Telegram Reminder)會傳送客製化的通知訊息。Update Task Status n8n 節點會將 PostgreSQL 中的任務狀態更新為 'sent' (已傳送),從而在未來執行此強大 n8n 工作流時防止重複發送通知。若要部署此完整的 n8n 工作流,請遵循以下步驟:
Save Task to Database、Fetch Due Tasks 和 Update Task Status n8n 節點所使用的 PostgreSQL 憑證。請確保您的資料庫包含黏性提示 (sticky note) 中提供的 tasks 資料表結構。Send Email Reminder n8n 節點設定您的 SMTP 憑證。Send Slack Reminder n8n 節點設定您的 Slack API 憑證。Send Telegram Reminder n8n 節點設定您的 Telegram API 憑證。Webhook - Receive Task n8n 觸發器複製 Webhook URL,並將其整合到您的任務建立系統中。此 n8n 工作流使用數個關鍵的 n8n 節點來實現穩健的功能:
Webhook - Receive Task (n8n 觸發器): 主要進入點。它監聽特定路徑 (task-YOUROPENAIKEYHERE-webhook) 以接收新的任務建立請求。
Postgres 節點 (Save Task to Database): 儲存已驗證的任務資料。關鍵設定包括將操作設定為 'Insert' (插入) 並指定目標資料表(暗示為 tasks 資料表)。
Schedule Trigger - Every 5 Minutes (n8n 觸發器): 使用 cron 表達式 /5 定期啟動提醒檢查程序。
Postgres 節點 (Fetch Due Tasks): 執行自訂 SQL 查詢(SELECT FROM tasks WHERE status = 'pending' AND remindertime <= NOW() + INTERVAL '5 minutes' AND remindertime > NOW())以檢索相關記錄。
If 節點 (Validate Input & Check Tasks Exist): 對於流程控制至關重要。驗證節點檢查關鍵輸入是否為空。存在性檢查則驗證資料庫是否返回了任何項目。
Switch 節點 (Route by Channel): 根據任務的 channel 欄位決定提醒傳送路徑,將 n8n 流程連接到 Email (輸出 0)、Slack (輸出 1) 或 Telegram (輸出 2)。
Email Send 節點 (Send Email Reminder): 設定為向 userid 發送個人化的主旨行(⏰ Task Reminder: {{ $json.taskname }})和內文。
Slack 節點 (Send Slack Reminder): 發送格式化的 Markdown 訊息,透過從資料庫項目檢索到的 userid 向使用者動態尋址。
Telegram 節點 (Send Telegram Reminder): 使用 Markdown 格式向目標 chatId({{ $json.userid }})發送訊息。
Postgres 節點 (Update Task Status): 執行 UPDATE 查詢,將 status 設定為 'sent',sentat 設定為 NOW(),從而完成此強大 n8n 節點實作的整個流程。
使用 n8n 工作流自動化收集產品回饋。整合來自 Telegram、Gmail 和 Google 表單的資料,透過 AI 進行評分(RICE 模型),自動建立 Jira Issue,並產出 Notion 報告。

使用此進階的 n8n 工作流程,自動化處理來自電子郵件和表單的客戶支援案件。具備自動分類、智慧優先級排序、樣板化自動回覆及 Slack 通知等功能,以實現高效率處理。

集中化管理您自動化的錯誤。此強固的 n8n 工作流使用專門的 n8n 觸發器來捕捉失敗,並將詳細的警報路由至 Telegram、Gmail 及其他通道。下載此 n8n 範本以實現可靠的監控。

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.







































