I have an array of different texts that I need to pass separately through the ToneAnalyzer. I have to be able to access all of the analysis values afterwards.
Is there a way to do this without setting up a separate instance of the ToneAnalyzer for each text?
as you've discovered, you shouldn't assume users in this forum automatically know you're referring to any particular technology, or that you're running in any particular environment.
As far as I know, the ToneAnalyzer can only do one text at a time (@chughts may be able to correct me....)
If you have msg.payload set as an array of multiple texts, you can pass that to a Split node that will then turn that into one message per text. You can then pass each of those to a single ToneAnalyzer node, use a Change node to move the result to msg.payload and then a Join node to recombine all of those messages back into one. That approach assumes the ToneAnalyzer node doesn't modify message properties it isn't using - for the Join node to be able to automatically join messages from the Split node, it requires the msg.parts property to survive through the flow.