You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

基于Azure与.NET实现事件触发的工作日延迟邮件通知方案咨询

Solution for Scheduled Working-Day Email Notifications

The best trigger to connect your .NET event to Logic Apps is the HTTP Trigger. Here's a step-by-step workflow that meets your requirements:

Workflow Breakdown

  1. Initiate from .NET:
    When your .NET app generates the event, send a POST request to the Logic Apps HTTP trigger endpoint. Include critical data in the request body:

    • The event's exact timestamp (EventDateTime)
    • Recipient info
    • Any content needed for the email notifications
  2. Immediate Notification:
    Right after the trigger fires, add an HTTP action to call your .NET email API—this sends the first immediate email.

  3. 5-Working-Day Delay & Notification:

    • Use Logic Apps' addWorkdays function to compute the target time 5 business days post-event:
      addWorkdays(triggerBody()?['EventDateTime'], 5)
      
    • Add a Delay Until action set to this calculated time. Once the delay elapses, call your .NET email API again for the second notification.
  4. 15-Working-Day Delay & Notification:

    • Repeat the calculation for 15 working days:
      addWorkdays(triggerBody()?['EventDateTime'], 15)
      
    • Add another Delay Until action, then call your email API a third time to send the final notification.

Critical Details

  • Working Day Logic: The addWorkdays function automatically skips weekends. If you need to exclude public holidays, extend the workflow with a custom holiday list (e.g., stored in Azure Table Storage) and use the isHoliday function to adjust the target dates.
  • Reliability: Logic Apps handles delays durably—even if the workflow is interrupted, it will pick up where it left off at the scheduled time.
  • Error Handling: Wrap email API calls in a Scope action with retry policies to handle transient failures (like network issues) and ensure notifications are sent.

Alternative Optimized Approach

If you want to simplify things, you can skip calling your .NET email API entirely:

  • Use Logic Apps' native email actions (e.g., Office 365 Outlook, Gmail) to send notifications directly from the workflow.
  • Store event data in Azure Storage or SQL DB if you need to track notification statuses or reprocess events later.

内容的提问来源于stack exchange,提问作者Manognya

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.29 15:35:16