When working with Power Automate, it’s crucial to handle JSON data correctly to avoid common pitfalls. One such issue arises when adding JSON within another JSON. Without proper handling, Power Automate tends to add extra quotation marks, encoding the inner JSON and leading to errors.

Above is picture how does JSON end up showing without json function. Below is picture how does it end up when using json function.

To circumvent this, use the json function. It’s essential, especially when dealing with multiple child items. Remember to enclose your child items within [] brackets within the json-function for accurate parsing. Above is picture, how it will look if you don’t add concat function with [] bracets and below is how it looks when you have them.

Here’s a pro tip: leverage the concat function for seamless integration. The correct syntax for embedding JSON within another JSON is:

json(concat('[', join(variables('array'),','),']'))

This approach ensures your data remains intact and your workflows run smoothly.

Above picture is from solution where we populate data into Word document and then transform it into a PDF file.’