Define the Trigger
Our first task step is to select the folder that Word files will be saved that are destined for PDF conversion.
You can click the “Show advanced options” link to toggle trigger-specific features, like if you want the subfolders below the selected folder to be searched as well.
Define the Action(s)
We want to convert our Word files to PDF files, so a quick search for either the action or the app is in order.
Now we can tell the Action what files will qualify for conversion and to what they will be converted.
We can target files that meet a specific naming convention or file type. This is where we click the field labeled “The unique identifier of the file” then select “Dynamic Content”.
We will select “File Identifier” and “PDF” as our Target Type.
We don’t want to replace the Word document with a PDF file, so we will save the converted PDF to a folder on a SharePoint drive.
We click New Step and search for actions that work with SharePoint.
The “Create File (SharePoint)” action requires several parameters:
- Site Address (the URL of the SharePoint site)
- Folder Path (the folder on the selected site)
- File Name (this will be dynamically named based on the triggering file)
- File Content (this will be dynamically determined based on the triggering file)
Just for fun, let’s send a message to a Teams Channel once the files have been successfully converted.
We select New Step and search for actions that focus on Teams. We’ll use the action titled “Post a message”.
We need to provide the following information to the action:
- Team – add the Team ID
- Channel – select the appropriate Channel Name
- Message – compose the message that is to be sent to the team.
Click Save to commit the automation sequence.
We are informed that the flow is ready but are encouraged to test the logic. Click “Test” in the upper-right of the window.
We will take a more adventurous approach to testing by performing our test under real-world conditions by saving a Word document in the target folder.