One of the never ending challenges of using Dynamics 365 was how to generate and email PDF’s using data from Dynamics. While Word templates went some way towards solving the problem they have not been improved for a number of years. So generating PDF’s usually requires third party tools. With the release of the new Word Online (Business) connector for Flow and Logic Apps it looks like we have a potential solution. The new connector comes with two actions. The first populates a Word Template with values from a flow. The second action converts a document to a PDF.
I was able to use these actions in a Flow to populate a confidentiality agreement with a contact’s fullname and address and email it as a PDF to the contact.
To create a template in Word select the developer tab and click plain text content control which inserts a control thst acts as a merge placeholder. Now give your control a name which is used to identify and populate it from Flow. Once your template is created upload it to a SharePoint or OneDrive location where your flow can retrieve it. I could not find a way to load a template directly from Dynamics.
You can now use the template in your flow populating it with your Dynamics data.
The next action saves the result of the template population to a SharePoint drive so it can be converted to a PDF by the next action. The final action sends an email with the converted PDF as an attachment to the contact’s email address.
The Word Online Connector is currently in preview however I am suitably impressed with its potential and looking forward to seeing it expanded.