I’m going crazy, I’ve been working on an agent that in one workflow writes long form text divided into chapters. The main workflow contains a block that runs another workflow to write all chapters. The chapters are written by the sub-workflow without errors, but the collected chapters seem to be saved into {{book}} as one very long json string instead of a proper array. So using the data therein has been a nightmare for me. I want to avoid having an LLM parsing the output of the sub-workflow into a proper array (it can be huge) - it should already be a proper array, right? Tried javascript functions, but not really getting the desired results (mostly failing execution due to format validation). I mean, I only want to assemble each chapter after another in the sequence they are in the variable, exactly as they are with three new lines after each chapter. (So I can have the sub-workflow output in the format I want (HTML or markdown))
Can someone please elucidate me?
Run workflow config:
Launch and output parameters:
Sub-workflow end block:
Looking at the output variable inside IDE:
If I open in new tab: