Introduction
This tutorial will guide you
through creating an automated workflow using Microsoft Power Automate to
convert Excel files (.xlsx) uploaded to OneDrive for Business into PDF format.
This workflow will monitor a specific folder in OneDrive for Business, convert
any newly uploaded Excel files to PDFs, and save the converted files back into
a designated folder.Create
a New Flow
Now, let's create a workflow that converts Excel files to
PDFs.
1. Start with a Blank Flow:
- Click on "Create" from the left sidebar and choose
"Automated cloud flow".
- Give your flow a name, such as "Excel to PDF Converter", and
select "When a file is created (OneDrive for Business)" as the
trigger.
2. Set Up the Trigger:
· Choose the OneDrive for Business account and specify the folder where you want to monitor for new Excel files.
· Select "When a file is created" as the trigger condition. This ensures the flow starts when ever a new file is uploaded to the specified folder.
Step 3: Define Actions
Next, define the actions that will convert the Excel file to PDF and save it back to OneDrive for Business.
1. Get File Content:
- Add an action to retrieve the content of the newly created file
- Choose "Get file content" from the list of actions.
- Configure it to use the same OneDrive for Business connection and specify the file ID from the trigger output.
2. Create file:
·
Add an action to Create File.
·
Select the folder path
· Select "Create file" and specify the
file Name and File content retrieved in the previous step.
2. Convert File to PDF:
- Add an action to convert the Excel file content to PDF.
- Select "Convert file" and specify the file content retrieved in the previous step.
- Set the file type to PDF.
3. Create File Copy:
- Finally, add an action to create a copy of the converted PDF file.
- Choose "Create file" and specify the folder where you want to save the PDF.
- Use dynamic content to name the PDF file (e.g., use the original file name with ".pdf" extension).
Step 4: Save and Test the Flow
1. Save and Enable:
- Click on "Save" to save your flow.
- Once saved, click on "Enable" to activate the flow. This allows it to start monitoring the specified OneDrive for Business folder.
2. Test the Flow:
- Upload an Excel file (.xlsx) to the monitored folder in OneDrive for Business.
- Check the flow run history to ensure it triggers correctly and completes all actions (retrieve file content, convert to PDF, create file copy).
Conclusion
In this tutorial, you've learned how to create a Microsoft Power Automate workflow to automatically convert Excel files to PDF format using OneDrive for Business. By setting up triggers and actions, you can streamline document conversion processes and improve efficiency in handling file formats across your organization.
Comments
Post a Comment