We’ve been waiting a lifetime (dramatic?) for this feature. And now it’s here! Sort of.
Currently, with a new “Preview” action release in Microsoft Flow, we’re able to convert documents to PDF in OneDrive for Business via workflow. While this isn’t ready for SharePoint yet, we can make it look that way for our end users. Basically:
- When a file is created or modified in SP
- Create document in OneDrive for Business
- Convert document
- Create document in SP
It’s roundabout but we get exactly the result often requested: convert SharePoint docs to PDF automatically. Here’s how to set this up. A video walkthrough is available at the bottom of this post.
My scenario: I want to “publish” meeting minutes to PDF after they’ve been approved and have them posted in a different site.
- In your SharePoint document library, create a sort of trigger field/column. I’ll use a checkbox named “Publish”.
- In Microsoft Flow, create your Flow as follows:
- Trigger: SharePoint – When a file is created or modified (properties only)
- Condition: Publish = true
Note: You’ll need to edit this condition in advanced mode to remove the single quotes from around the word true for it to work correctly. See this post for help.
- If yes:
SharePoint – get file content
- OneDrive for Business (ODB) – create file
Note: add document extension (such as .docx) after filename
- ODB – convert file
- SharePoint – create file (this can be in a different site or site collection)
Note: add document extension (.pdf) after filename
- SharePoint – update file properties (to copy any column data from original home to new home such as “meeting date”)
- SharePoint – update file properties (to uncheck box on source file so that future revisions won’t incidentally publish an additional copy)
Test your flow. As you can see here, it happens so quickly (~7 seconds). Your users are sure to thank you for this time-saver.