Error handling on Logic App with SendGrid connector

Kour, Amandeep 0 Reputation points
2024-09-24T15:31:04.66+00:00

We have a logic app to send emails using SendGrid connector. We have set-up alerts for any failure. We want to understand the retry mechanism of logic app in case SendGrid Server is down. Is there any queue mechanism to handle such error, or it will keep failing the logic app?

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

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 15,071 Reputation points Microsoft Employee
    2024-09-25T22:31:31.1066667+00:00

    Hi @Kour, Amandeep Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here.

    Some of the Logic App triggers and actions have an option to enable the Retry mechanism. For example, an HTTP action has the following option which can be found under the action settings

    User's image

    You can try and find a similar setting in either the trigger or the actions in your workflow and can try to configure this setting. You can refer the section Retry policy types for different options available.

    Is there any queue mechanism to handle such error

    There is no out of the box mechanism available other than the above-mentioned option to facilitate the retry mechanism.

    However, you can consider designing an alternate workflow which gets triggered when an action such as SendEmail fails and perhaps queue the events to a different end point such as Service Bus queue and process them later. Refer the article Change "run after" behavior which provides more steps on how to implement this parallel work flow. You can consume the events of the Service Bus queue later from the branch when the SendEmail succeeds.

    Alternatively, if you connector supports Batch messaging, you can consider adding the failed messages to a Batch and send them as a Batch. Please refer the article Process Batch messages in Azure Logic Apps for your reference

    Hope this answers your question! Please let us know if you need any additional clarification on this.


    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    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.