Append in Drafts 5

Hi - I think I just forgot how to do this Action - I want to append a Draft to an existing drafts but forgot how to do so…please remind me:)

Try modifying this with the UUID of your desired draft, and the text for your desired separator.

//Set this to be the UUID of the draft you wish to append to.
let specificDraftUUID = "B04EDD28-9ABE-42F6-92A9-317F54663CF3";

//Set this to be the separator between appends
let separator = "\n\n---\n\n";

//Find the draft to append to
let specificDraft = Draft.find(specificDraftUUID);

//Append the separator followed by the current draft contents to the draft to be updated
specificDraft.content = specificDraft.content + separator + draft.content;

Hope that helps.

1 Like