How to convert one big JSON into multiple smaller JSON files?

I’m pulling conversations from a SLACK channel, and I’m running into several problems trying to break it down into multiple JSON files to work them out individually because it’s too much text.

  1. First, for some reason, the Slack API brings duplicated messages in the output of the conversation, so I need to later clean this, but this causes difficulty in grouping this data, because I don’t know if a lot of the duplicated data is from my mistakes in the scenario or from the source.

  1. I only need the “user”, “ts” and “text” from the [Messages] array, all else I can discard.

I added this to the text aggregator, but then I’m not sure how to build the JSON after the repeater.

  1. The Create JSON module has the 3 input boxes mapped: user, ts, and messages but I don’t know how to map the variables.

I tried adding from the HTTP module, but it’s just duplicated output

I attached the JSON output that I’m trying to break down.

test-output-slack.json (90.7 KB)

You can map the messages array in the Iterator, then use an Array Aggregator (not Text Aggregator) to select the fields you want.


Thanks, what do I need to add to the Repeater & Set Variable so it breaks down the array?

I tried just adding the array variable, but a lot of text goes missing in the final JSONs

Added the Array Aggregator

Selected the 3 variables

< No idea how to break down this array into chunks >

Added the array variables to the JSON creator module.

Any other ideas? :grinning: