Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Avoid flow failing using a condition check for HTTP Header value


I have a flow that runs and does a HTTP call to an API endpoint and retrieves log files from it.  This works fine when there is data in the endpoint logs.

However, on occasion there may be no data in the logs since the last run and I will end up an error and "data is not present" message.

I am trying to build in an error condition to cover this failure.  What I have noticed is that when there is no data it always has the same "Content-Length" in the headers.  So I have adjusted the flow to try and identify when the Content-Length equals a value and then terminate, but it is not running quite right yet.  Any suggestions please?





In Check Headers I am using "outputs('Get_alerts_API')['headers']?['Content-Length']" which correctly identifies the Content-Length as 52.  This is the value which means there is no data present in the logs.


The Check Content Length condition is not working 






Could anyone help me understand what I am missing? 

Many thanks in advance.


Frequent Visitor

I think it is solved now by using string(value) in the condition

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,060)