Action: Generate document

Action: Generate document

Generate document action allows you to generate documents based on a standard Microsoft Word file filled with SharePoint list data. 

For more information about Action Builder read Action Builder Introduction article.

For more information about Document generator and examples read Document Generator Introduction article. 

To configure the action Generate document additional properties should be specified.

Configuration

PropertyRequiredTypeDescription

Template

yes.docx Document
- Static path. Provide a new word template that contains placeholders or select existing template from library on the current site
- Dynamic path. Allows to specify expression based path to template
DatayesChoiceSelect available option: 'For single items'/'For multiple items'
List or libraryyes 
A list or library from current site

For single item:

Item Id

yesInteger or stringThe item id of the element to get the data into the generated document

For multiple items:

Query

noStringA valid CAML query string to filter the items in the list/library to generate a document for

For multiple items:

View

noChoiceSelect a view configured on the list/library to filter the items. This can be used instead of a Query or in combination, where it will merge the Query and the View.
TargetyesChoice

Select available option: "Save to library" / "Open in browser".

File nameyesStringFixed file name for generated document or dynamically calculated using an expression. 
Overwrite filenoToggleIt will overwrite the document if the file with the same name already exists

 

Availability

Modern FormsList ActionsScheduled/Triggered Actions

 

Example of Generate document action configuration for single item

Template.png

Outputs

Output ParameterTypeDescription
ItemID*NumberReturns the Id of the generated document in a library 
FileNameStringReturns the file name of document
Url*StringAbsolute Url to the file. Starts with 'https://'
ServerRelativeUrl*StringServer relative path to the file. Starts with '/'
LibraryRelativeUrl*StringLibrary relative path to the filer. Starts with folder name

*Output parameter value is available in a case of using option "Save to library"


    • Related Articles

    • Action: Start Power Automate / Azure Function

      Start Power Automate / Azure Function action allows you to trigger existing Power Automate flow using "When an HTTP request is received" trigger or configured Azure Function. Example of Start Power Automate / Azure Function action configuration on ...
    • Action: Generate QR Code

      Generate QR Code action allows to generate QR code for specified text or the URL. The generated QR code can used in different ways, like can be saved to the specified library as .PNG image or inserted directly into the .pdf file using Insert image to ...
    • Action: Clone team

      Clone team action allows to create a copy of an existing Microsoft team with the specified configuration options. You can select what to include in the copy: apps, channels, members and tabs. Example of Clone team action configuration on the current ...
    • Starting a Microsoft Flow from Teamsware Actions

      Microsoft Flow provides many features and integration options not available when using basic Teamsware actions. But you can start a Microsoft Flow / Power Automate from Teamsware action quite easily by using the Start Power Automate / Azure Function ...
    • Introduction to Document Generator

      What is the document generator? The "Document Generator" allows you to generate documents based on a standard Microsoft Word file filled with SharePoint list data. This can be triggered in actions used in list actions, modern forms or background ...