Add attachments using “Send E-mail with Word Document as a Body” SharePoint workflow action

5
(2)

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 email 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:

New parameter in SharePoint workflow action

You can see whole process of creating such a workflow in this video:

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:

Create string array

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 emails.

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 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

(Visited 3,277 times, 1 visits today)
Share

Leave a Reply

Your email address will not be published. Required fields are marked *