Action

Split at Delimiter

Posted by @nahumck, Last update almost 2 years ago

Simple script to split a draft at a specified delimiter.

Steps

  • script

    // 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.update();
    }

Options

  • After Success Default
    Notification Info
    Log Level Error
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.