HarePoint has recently announced a new workflow action – Send E-mail with Word Document as a Body. There is related article about this action in our blog.
The idea was to easily create a document with complex formatting in Microsoft Word and then send an e-mail based on this document. This workflow action has become so popular, that our customers even requested a feature: to be able to add attachments to such e-mails. HarePoint has added such functionality in version v.2.12 of HarePoint Workflow Extensions.
Now, it can be done with the same workflow action – Send E-mail with Word Document as a Body, just a new (optional) parameter has been added – an array of URLs of documents to be attached:
Do not be confused with the fact that it needs an array, even if you intend to attach only a single document. There are several ways how an array with the URLs can be easily obtained or created:
- Find List Item at URL action from HarePoint Workflow Extensions pack – provides a very elegant way to obtain an array; you simply specify the criteria and it will automatically create an array with URLs of all documents matching that criteria. This array can be directly passed to Send E-mail with Word Document as a Body action.
- Get List Item Attachments – even if you have the needed files not as documents in a library, but as attachments to list items in SharePoint List, you can easily pull their URLs to an array using this action.
- Create String Array – when you need to attach just one few documents and you feel it’s just easier to put in their URLs manually, you can do it with this action. Use a semicolon (;) to delimit URLs and thus the array items:
At HarePoint, we always consider that a product upgrade needs to be as safe and smooth as possible. Installing a new version of HarePoint Workflow Extensions will not disrupt the functionality of workflows that use an older version of Send E-mail with Word Document as a Body. You don’t even need to remove this action and add it again to get the new functionality, neither you need to re-publish the workflows; it will be automatically updated with the product upgrade.
You can just keep the workflows as they are if you don’t need to attach files to e-mails.
On the other hand, if you need new functionality, the only thing you would need to do is to specify an array in the last parameter to add attachments, keeping all other parameters unchanged.
How useful was this post?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!