Skip to main content
create_document Create a new document (file) or folder in a project. Set type to “FOLDER” for folders, “FILE” for documents. Before writing content into a new document, know the project’s tables and documents: the Project outline has them (in your context, or from get_project_outline), else list_project_tables and list_project_documents. A project with tables expects its documents to read from them through prepare_placeholder_references rather than repeating the data as text; a static document in a project built to be data-driven looks fine and quietly isn’t. When the user names a document to follow, read it first.

Parameters

string
required
Document or folder name. Title Case words as a reader would say them: “Employment Contract”, “John Doe”. Never a filename with underscores or an extension; the party goes in a folder named after them, the numbering in reference.
string, enum: 'FILE' | 'FOLDER'
default:"FILE"
Node type: “FILE” or “FOLDER”.
string
Parent folder ID. Omit for project root level.
string
string
Optional document description.
string
Short tag shown beside the name in the tree, for the numbering or kind the name must not carry: “Appendix 1”, “Schedule A”, “Exhibit B”. Omit when there is nothing to number.