January 2019 update:
Out-of-the-box Microsoft Flows are now available in OneDrive! Microsoft has integrated two new flows into the OneDrive interface–Copy as a PDF and Request sign-off. The Copy as a PDF flow replaces the custom flow solution outlined in my blog post below. Saving documents as PDF files in OneDrive is now easier than ever before. Simply select the file and start the Copy as a PDF flow. That’s it!
Original post:
In November 2017, Microsoft released its integration between Flow and OneDrive. Users can now create flows in OneDrive that will perform actions on OneDrive documents or folders. There are a wide variety of flows you can create, including:
- Saving a copy of email attachments to a specified OneDrive folder
- Routing OneDrive file(s) for approval
- Sending OneDrive file(s) to other users
- Sending links to OneDrive file(s)
- Requesting feedback on OneDrive file(s)
- Sending OneDrive file(s) to Microsoft Teams
- Setting up alerts when new document(s) are uploaded
- Searching for files in a given OneDrive folder
- Copying OneDrive files
- Converting OneDrive files to PDF
- And more….
Because I present at multiple conferences/events per year, I wanted to test the capability of using Flow to convert my PowerPoint files to PDFs for easy sharing with conference attendees. I set up a flow in OneDrive to perform a PDF conversion on whichever files I select. I was able to use one of Microsoft’s standardized templates for the flow, with only a couple of minor tweaks.
Here are the steps to re-create this PDF conversion flow:
- Open OneDrive.
- Click on the Flow link in the OneDrive ribbon and select Create a flow.
- When the window of flow templates appears, select the Convert selected file to PDF option.
If this is your first time using Flow, you’ll be asked to choose your country and click on the Get started button.
- You’ll be taken to a detail page that has information on the Convert selected file to PDF template. If this is your first time using Flow, you may be prompted to sign in and authenticate to OneDrive so the flow can be built. Simply click the Sign in button to log in. Once you’re logged in successfully, the Sign in button will be replaced with a Continue button. Click Continue to start working on your flow.
- The template will populate, showing you all the preconfigured options for your flow. The flow is designed to save the selected file in PDF format and upload it to the root of your OneDrive folder structure. These default options are good, but I opted to make two changes to my flow:
- I clicked into the Flow name field and re-named my flow to PDF converter flow. This is the name that will show up in my menu of flows to run in OneDrive.
- I wanted all my converted PDF files to be stored in my OneDrive Presentations folder. To configure this option, I opened the Create file step and specified the creation folder path of /Presentations. (Note: If you choose to use a custom folder to store your PDFs, you must create the folder in OneDrive before you can specify the folder name in your flow.)
- Once these changes were made, I clicked on the Create flow option to create my new flow:
- Once my flow is created, I’m taken to the complete screen. All I need to do is click Done to exit.
- Now I’m taken to the overview page for my new flow. I can see that this flow is turned on and is set up to run on my OneDrive account. I also see a run history box. An audit record for each run of this flow will be recorded in the run history.
- Now I’m ready to return to OneDrive and test my new flow. To do this, I navigated back to OneDrive, selected the file I wanted to convert to PDF, clicked on the Flow dropdown menu and selected my new PDF converter flow.
- After waiting 5-10 seconds, I refreshed my page and there’s my new PDF!
A few lessons I learned during the process of setting up this new flow:
- Neither the free version of Flow nor the E1 tenant license supports PDF document conversions. While the free version of Flow and my E1 tenant could be used to create other flows, the PDF converter required at least an E3 Flow license.
- The PDF conversion flow can’t be run against multiple files at once. I had to start the PDF converter flow for each file individually.
- PDF conversion speeds are variable based on file size. A 51MB PowerPoint file took almost a minute to convert. Small PowerPoint files converted in under 8 seconds.
If you’d like more information on the integration between Flow and OneDrive, read the blog post announcement from the Flow team.