Receiving Multiple emails from Azure Logic apps.

Nemade, Pradnya 0 Reputation points
2025-01-10T09:54:20.2766667+00:00

Hi Team,

This is regarding the Azure logic apps.

We have set the email notification for our pipelines status. Issue is we are receiving 3-4 emails for each pipeline .

Could you please help us to undertsnd and solve this issue.

Thanks in advance.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,323 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shireesha Eeraboina (Quadrant Resource LLC) 830 Reputation points Microsoft Vendor
    2025-01-13T11:39:35.03+00:00

    Hi @Nemade, Pradnya,

    It sounds like you're experiencing an issue with receiving multiple email notifications from your Azure Logic Apps for each pipeline status. Here are some steps to help you troubleshoot and resolve this problem.

    Ensure that the trigger for your Logic App is set up correctly. Since you are using a manual HTTP request, verify that the HTTP request is only being sent once per pipeline execution. If the request is being sent multiple times, it will trigger the Logic App multiple times and inspect the pipeline configuration to ensure that the HTTP request to trigger the Logic App is not being called multiple times. If there are multiple activities or retries in the pipeline that could lead to multiple HTTP requests, consider adjusting the pipeline logic.

    Try modifying your Logic App to include a unique identifier (e.g., pipeline run ID) in the JSON payload. This will help you track whether an email has already been sent for a specific pipeline execution.

    Try the below:

    {

      "type": "Request",

      "kind": "Http",

      "inputs": {

        "method": "POST",

        "schema": {

          "properties": {

            "pipelinename": {

              "type": "string"

            },

            "runId": {

              "type": "string"

            }

          },

          "type": "object"

        }

      }

    }

    In your Logic App, add a condition to check if an email has already been sent for the given runId. You can use a storage solution like Azure Table Storage or Azure Blob Storage to keep track of sent notifications. If an email for that runId already exists, skip sending another email.

     

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.