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: 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 ...
    • 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 ...
    • Action Builder Introduction

      The Teamsware Studio Action Builder is a tool that allows you to specify actions which are executed in consecutive order. You can build powerful workflows triggered from a form button, on form load, from a list view, scheduled or event triggered on a ...
    • How to handle the lookup columns threshold in a Document Generator template for a single item

      f your Document Generator Template contains more than 12 lookups that exceeds the SharePoint lookup column threshold, you may face the situation that the generated document may not include all lookup values. To overcome this problem we propose the ...
    • Action: Get image data

      Get image data action allows you to retrieve the image data information such as geolocation and the size of the image. Example of Get image data action configuration on the current site For more information about Action Builder read Action Builder ...