Drafts Script Reference

Draft

The Draft object represents a single draft. When an action is run, the current draft is available as the global variable “draft”. Scripts can also create new drafts, access and set values, and update the draft to persist changes.

Instance Properties

Instance Functions

Class Functions

Examples

// create a new draft, assign content and save it

var d = Draft.create();
d.content = "My new draft";
d.update();