Tag split files

I assume you are using this split action. If so, you can just add a single line to assign the tag you want…like:

// Split at specified delimiter

var delim = “|”;

var text = draft.content;
var chunks = text.split(delim);
for (var chunk of chunks) {
  var d = Draft.create();
  d.content = chunk;
  d.addTag("MY-TAG"); // NEW LINE!
  d.update();
}

Naturally, you would need to change "MY-TAG" to the value you want for the tag (still in quotes).