Hello, I have a general question about making HTTP request action. I'm still fairly new to power automation. I have a scheduled flow that queries an api for any new items created. If no new items are created I get a 404 not found, which is expected.
The problem is the flow itself shows as failed in the history with the expected behavior. If 404, the flow should stop as it currently does, but show the whole run as successful.
Hi @mpatton, I have been having the exact same issue with the HTTP action, where 404 is essentially a valid answer, and I have a solution for you. I also discovered that if a flow fails enough times the Power Automate will disable it, so leaving my flow to "successfully fail" isn't an option. I came across your question while searching around for an answer, and while I didn't find one directly, what I did find pointed me in the right direction.
What I did was create a boolean variable that would be set true if the HTTP action failed. This would trigger further error checking later in the flow but if the error checking confirms it is an expected 404 error then the last actions are a Condition action, to check if the above checks have been passed, with a Terminate action set to Succeeded status. This forces the flow to end with the successful status.
Hope this helps. For me, I now don't need to worry about PA "helpfully" disabling my flows without my input.
Thanks @Kun - Even when I add this the flows themselves fail. See screenshot below. All the failed ones are the times I didn't see anything and went right on the branch (404). The success ones are the times the query found something and went left on the workflow. It would be great if all these said successful because I only care if the actions after the http call failed, and not include if it found something or not from the http call.
I'm thinking I might have to break this into two flows. The first checking to see if there are results and if so send it to the second flow to run the rest of the flow.
Another option I am thinking is extending this window to greater my chances of a success of finding something, but I may need to do some more logging to understand the frequency.
you can setup "Run after" condition for the action next to your HTTP action. By default only "is successful" is selected, you can also select "has failed" to let workflow continue with 404 error.
If you want different action for success and fail, you can also add parallel action like this, and set different “run after" for each.
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional