Microsoft Word - Create document action ​

The Create document action creates a new Word document or copies an existing template. The action supports blank documents, XML content, binary uploads, or template-based creation.

Input ​

Input fieldDescription
File destinationSelect where the document is saved. Options are OneDrive and SharePoint.
Creation modeChoose to create an empty document, provide content, or copy an existing template. Options are Blank or with content and From template. Defaults to Blank or with content.
Template locationSelect where the template document is stored. Options are OneDrive and SharePoint. The Template location field is only available when Creation mode is From template. Defaults to OneDrive.
File nameEnter a name for the new document. The File name field is only available when Creation mode is Blank or with content.
New document nameOptional. Enter a name for the copied document. The New document name field is only available when Creation mode is From template. Defaults to Copy of <template file name> if left blank.
Destination folderOptional. Select the folder where the action creates the document. Defaults to the root folder if left blank.
Content typeOptional. Choose how you provide content. Options are Document body XML and Raw binary (.docx).
ContentOptional. Enter the document content that matches the selected content type.

Output ​

The following are a representative set of output fields. Refer to the Microsoft Graph driveItem documentation for more information on available output fields.

Output fieldDescription
Document IDThe document's unique identifier.
ETagThe ID representing the current version of the document metadata. Use this value for revision safety when updating the document.
File nameThe document file name, including its extension.
Created dateThe date and time the document was created.
Created byThe application and user that created the document.
Last modified dateThe date and time the document was last modified.
Download URLA pre-authenticated URL you can use to download the document.
Web URLThe URL to view the document in the browser.
Parent referenceDetails about the document's parent folder, including drive type, drive ID, folder name, and path.
Size (bytes)The document size in bytes.

Last updated: