Tip #1446: Empty array in Power Automate


To create an empty array in a Power Automate formula, use the formula `json('[]')`. This can be useful when working with a third-party service that returns an array of objects, but sometimes returns `null` instead of an empty array. Instead of using an `if` action, you can use the `coalesce` function with the formula `json('[]')` as a fallback. This ensures that if the output is `null`, it will be replaced with an empty array, preventing the loop from being executed.


Article 10m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time