Drafts Action Directory

Split at Delimiter

Posted by @nahumck, Last update about 1 month ago

Simple script to split a draft at a specified delimiter.

Install

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

Comments

Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.