How to Check If a Value Is Empty Using empty()

✅ The Use Case

Imagine you’re building a flow that processes incoming email messages. You only want to take action if the message is a reply to another email. To determine this, you check the replyToId field using the empty() function.

empty(outputs('Get_message_details')?['body/replyToId'])

🧠 Pro Tips

Always use the ? operator when accessing nested properties. It helps avoid flow failures.

• Combine empty() with other expressions like and(), or() for more complex logic.

• You can use coalesce() as a fallback to provide default values if needed.

📌 Conclusion

The empty() function is a simple but powerful tool when working with Power Automate. It lets you write safe, error-resistant flows that can gracefully handle missing data—especially in dynamic content like email fields.

By mastering empty() and the safe navigation operator, you’ll create more reliable and intelligent automations.