One of my subscribers reached out a few days ago with an interesting query. They were working on a Power Automate flow and needed to check if the Body of a response or action was empty before proceeding. This is a common scenario, especially when dealing with APIs and HTTP requests where data may or may not be returned.
In this tutorial, I will explain how to check if the Body is empty in Power Automate using simple conditions. Additionally, I will explain a situation where the Send an email (V2) action may seem empty but still allows the flow to save due to a hidden blank line.
Check If the Body is Empty in Power Automate
Imagine you have a Power Automate flow that uses the Send an HTTP Request to SharePoint action to retrieve data, such as item details from a SharePoint list. Sometimes, the response might return an empty body if no matching data exists.
For this example I have a SharePoint list called Employee Records with columns like:
- Employee ID (Single line of text) — Unique identifier
- Employee Name (Single line of text)
- Department (Choice)
- Date of Joining (Date and time)
- Employee Status (Choice)
- End of Contract (Date and time)

In this example, we will attempt to fetch employee details based on an Employee ID. If no matching data exists, the response body will be empty, and you will notify the user accordingly.
To do this, follow the below steps:
1. Create a new Instant Cloud Flow and choose Manually trigger a flow as the trigger. Then, expand the trigger action and add a Text input field where we can provide Employee ID.

2. Then add a Send an HTTP request to SharePoint action from sharePoint Connector with the below parameter:
- Site Address: Select the SharePoint Site Address
- Method: Select “GET” as the method
- URI: Provide the below URI:
_api/web/lists/getbytitle('Employee Records')/items?$filter=EmployeeID eq '@{triggerBody()['text']}'
- Header: Use the below headers to make REST API calls to SharePoint:
{
"Accept": "application/json;odata=verbose"
}

3. Add a Condition to Check if the Body is Empty and provide the below expression:
- In the left side, use this expression:
empty(body('Send_an_HTTP_request_to_SharePoint')?['value'])
- In the middle, select is equal to.
- In the right side, enter true.

4. In the true condition add a Send an email action with a message like to the person who added the user:
No employee record found for Employee ID: @{triggerBody()?['text']}

Now, click Save and run the flow manually. It will ask for the Employee ID, which you should provide (in my case, 123). After the flow runs successfully, click Run Flow. You can see the true section send an email action run, meaning the Employee ID is not in the Sharepoint list. Then, the person will receive the email.

With the help of the empty() function in Power Automate, you can quickly check if the Body is Empty in various scenarios. For example, you can use it to verify if a Select action returned no data, an HTML table is empty, a Filter Query found no matching records, or a Get items action didn’t retrieve any items. Once you confirm that the Body is Empty, you can add actions like sending a notification, creating a log entry, or handling the missing data appropriately.
Send an Email If Body is Empty in Power Automate
We recently encountered a situation where the “Flow can be saved” even though the Body content hadn’t been filled. One of my subscribers asked how this was possible since the Body is a required field in some actions like Send an email (V2).
In most cases, if the Body field is left empty in the Send an email (V2) action, the flow will fail because the Body is mandatory.

After checking their flow, I found they added a new line in the Body field. This made it seem empty, but since there was a blank line, Power Automate treated it as filled and allowed the flow to save.
I switched to the Classic designer and then changed the Body field to HTML format to check this.

Conclusion
In this tutorial, I covered two key scenarios related to checking if the Body is empty in Power Automate. First, I explained how to use the empty() function to check if the Body of a response, such as data from a SharePoint list, is empty and notify the user if no matching records are found.
Second, I explained a situation where the Send an email (V2) action allowed a flow to save even though the Body field appeared empty, this happened because a blank line was added, which Power Automate treated as filled content.
You may also like:
- Check If the Filename Contains in Power Automate
- Check IF SharePoint List is Empty in Power Automate
- Power Automate IF Length
- Check if SharePoint List Already Exists in Power Automate
- Send Email Reminders From a SharePoint List Using Power Automate
- Check if a file exists in the SharePoint document library in Power Automate
- Make a Text input As Hyperlink in Power Apps

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.