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

    • 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 ...
    • Action: Convert to PDF

      Convert to PDF action allows you to convert the specified file to PDF. We support converting a wide variety of files: Microsoft Word documents (DOC, DOCX), Excel spreadsheets (XLS, XLSX) and PowerPoint files (PPT, PPTX). For more information about ...
    • 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 ...
    • How to use QR code image in the Document Generator template

      There are a lot of services that generate QR codes. In this article, we use this service to generate QR code image with Send HTTP request action and use this image in the Document Generator template: 1. Add Send HTTP request action with the API ...