Renders text or HTML template using data from dictionary variable. It uses Mustache templating engine to render text templates and supports tokens for single values as well as iterators to render collections of elements. You can play around with sample template on github. You can find more information about syntax in the documentation for Mustache.
You can receive dictionary data from various sources, such as web services, CAML queries or build dictionary manually. This article provides detailed explanation with use case for this workflow action.
Parameter |
Description |
Example |
---|---|---|
Result |
The result string generated by template. |
Dear John Smith, Thank you for your order. |
Parameter |
Description |
Example |
---|---|---|
Template data |
Input dictionary data that will be used for rendering. For example it can be result of Build Dictionary or Get Items by Query workflow actions. |
|
Text |
The input template string. You can find more information about syntax in the documentation for Mustache.Store your templates in the separate list and query it by name to simplify templates management. |
Dear |
ThrowError |
Detects whether workflow should be interrupted in case of error or not. |
Yes |
In this example we build dictionary manually using Build Dictionary workflow action. Then we render it using the workflow action.
This workflow action converts specified HTML to PDF file and uploads it to the document library.
Parameter |
Description |
Example |
---|---|---|
Result file URL |
In specific variable will be stored URL at file |
|
Parameter |
Description |
Example |
---|---|---|
Input HTML |
Input html for conversion |
[Variable:InputHtml]
<div>
<h1>
Hello!
</h1>
</div>
|
File name |
File name in document library, can contain path |
Invoice1.pdf or Folder1/Folder2/Invoice.pdf |
List |
Name, url or guid of the list |
Invoices/Invoices |
Paper Size |
Size of the page, it supports the following values: A0
A1
A2
A3
A4
A5
Folio
Ledger
Legal
Letter
...
|
A4 |
Is landscape |
Page orientation |
No |
AdminLogin |
The login of the user who has appropriate permissions to perform operation. This parameter doesn’t exist in the version for SharePoint 2013 on-premise. |
|
AdminPassword |
The password of the user who has appropriate permissions to perform operation. This parameter doesn’t exist in the version for SharePoint 2013 on-premise. |
admin’sP@ssw0rd$ |
SiteUrl |
The URL of the current SharePoint site. This property defines context of the workflow action. All actions performed by workflow action will be executed on specified SharePoint site. If this property is blank it will use current SharePoint site by default. |
|
ThrowError |
Detects whether workflow should be interrupted in case of error or not. |
Yes |
RunAsPublisher |
Detects whether the workflow action has to be ran under the user account who published the workflow (for SharePoint 2013 on-premise only). |
Yes |
This workflow action converts specified HTML to PDF file and save it as attachment in specified item.
Parameter |
Description |
Example |
---|---|---|
Result file URL |
In specific variable will be stored URL at file |
|
Parameter |
Description |
Example |
---|---|---|
Input HTML |
Input html for conversion |
[Variable:InputHtml]
<div>
<h1>
Hello!
</h1>
</div>
|
File name |
The Name of the result PDF file |
PdfFile.pdf |
Item ID |
The ID of the item |
18 |
List Url |
Name, url or guid of the list |
Employees |
Paper Size |
Size of the page, it supports the following values: A0
A1
A2
A3
A4
A5
Folio
Ledger
Legal
Letter
...
|
A4 |
Is landscape |
Page orientation |
No |
AdminLogin |
The login of the user who has appropriate permissions to perform operation. This parameter doesn’t exist in the version for SharePoint 2013 on-premise. |
|
AdminPassword |
The password of the user who has appropriate permissions to perform operation. This parameter doesn’t exist in the version for SharePoint 2013 on-premise. |
admin’sP@ssw0rd$ |
SiteUrl |
The URL of the current SharePoint site. This property defines context of the workflow action. All actions performed by workflow action will be executed on specified SharePoint site. If this property is blank it will use current SharePoint site by default. |
|
ThrowError |
Detects whether workflow should be interrupted in case of error or not. |
Yes |
RunAsPublisher |
Detects whether the workflow action has to be ran under the user account who published the workflow (for SharePoint 2013 on-premise only). |
Yes |
This workflow action converts specified HTML to PDF file and save it as attachment in current item.
Parameter |
Description |
Example |
---|---|---|
Result file URL |
In specific variable will be stored URL at file |
|
Parameter |
Description |
Example |
---|---|---|
Input HTML |
Input html for conversion |
[Variable:InputHtml]
<div>
<h1>
Hello!
</h1>
</div>
|
File name |
The Name of the result PDF file |
PdfFile.pdf |
Paper Size |
Size of the page, it supports the following values: A0
A1
A2
A3
A4
A5
Folio
Ledger
Legal
Letter
...
|
A4 |
Is landscape |
Page orientation |
No |
AdminLogin |
The login of the user who has appropriate permissions to perform operation. This parameter doesn’t exist in the version for SharePoint 2013 on-premise. |
|
AdminPassword |
The password of the user who has appropriate permissions to perform operation. This parameter doesn’t exist in the version for SharePoint 2013 on-premise. |
admin’sP@ssw0rd$ |
SiteUrl |
The URL of the current SharePoint site. This property defines context of the workflow action. All actions performed by workflow action will be executed on specified SharePoint site. If this property is blank it will use current SharePoint site by default. |
|
ThrowError |
Detects whether workflow should be interrupted in case of error or not. |
Yes |
RunAsPublisher |
Detects whether the workflow action has to be ran under the user account who published the workflow (for SharePoint 2013 on-premise only). |
Yes |
Searches an input string for all occurrences of a regular expression and returns all the matches. We would recommend you to use Regex Hero to test your expressions. It supports the same syntax as the workflow actions.
Parameter |
Description |
Example |
---|---|---|
Result |
Result dictionary contains list of match groups, each match group consists of self name and match result, if you didn’t define named group the name will be numeric. As you can see in the example it contains two matches with 3 groups inside each match.General structure of dictionary looks like this:- Collection of matches - (0)
- GroupName1
- Value
- GroupName2
- Value
- (1)
- GroupName1
- Value
- GroupName2
ValueYou can use the workflow action ‘Get an Item from a Dictionary’ to get values from matches.
Read the article to understand how to get values from a dictionary using this workflow action. For example you can extract value from the first match and from the named group ‘TaskId’ using such path: (0)/TaskId
|
[
{ "0": "Taks 43:Reject" },
{ "TaskId": "43" },
{ "Status": "Reject" }
],
[
{ "0": "Taks 52:Approve" },
{ "TaskId": "52" },
{ "Status": "Approve" }
]
|
Parameter |
Description |
Example |
---|---|---|
String |
String to search for matches |
Task 43:Reject Task 52:Approve |
Expression |
Regular expression pattern. This pattern can contain inline options to modify behavior of the regular expression. Such options have to be placed in the beginning of the expression inside brackets with question mark: x - allow whitespace and comments
s - single line mode
m - multi line mode
i - case insensitivity
n - only allow explicit capture
You can find additional information about inline options in the MSDN article. |
|
ThrowError |
Detects whether workflow should be interrupted in case of error or not. |
Yes |
In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string. We would recommend you to use Regex Hero to test your expressions. It supports the same syntax as the workflow actions.
Parameter |
Description |
Example |
---|---|---|
Result |
Result string |
|
Parameter |
Description |
Example |
---|---|---|
Expression |
Regular expression pattern. This pattern can contain inline options to modify behavior of the regular expression. Such options have to be placed in the beginning of the expression inside brackets with question mark: x - allow whitespace and comments
s - single line mode
m - multi line mode
i - case insensitivity
n - only allow explicit capture
You can find additional information about inline options in the MSDN article. |
|
String |
String to search for a match |
|
Replacement |
Replacement string |
|
ThrowError |
Detects whether workflow should be interrupted in case of error or not. |
Yes |
Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input string. We would recommend you to use Regex Hero to test your expressions. It supports the same syntax as the workflow actions.
Parameter |
Description |
Example |
---|---|---|
Result |
Result boolean |
True |
Parameter |
Description |
Example |
---|---|---|
String |
String to search for matches |
|
Expression |
Regular expression pattern. This pattern can contain inline options to modify behavior of the regular expression. Such options have to be placed in the beginning of the expression inside brackets with question mark: x - allow whitespace and comments
s - single line mode
m - multi line mode
i - case insensitivity
n - only allow explicit capture
You can find additional information about inline options in the MSDN article. |
|
ThrowError |
Detects whether workflow should be interrupted in case of error or not. |
Yes |