logo
Documents & Forms
Microsoft 365 & SharePoint Tools
Classic SharePoint Tools
Documents
Oct 18

How to convert an array of images to PDF in Power Automate

Internet Marketer

The Plumsail Documents connector in Power Automate introduces a new Convert Images to PDF action, allowing you to easily convert an array of images into a single PDF. This feature is perfect for organizing receipts, managing travel documents, or securely archiving physical paperwork into PDFs. In this article, we'll show you how to set up a process where employees capture images of receipts with their phones, and Power Automate compiles them into a single PDF.

In this article:

Use case: Expense reimbursement

Employees on business trips incur various expenses. After their trips, they take photos of their receipts and upload them to a SharePoint folder. The goal is to use Power Automate to convert these images into a PDF and send it to the accounting department. The Images to PDF action simplifies this process, ensuring that receipts are compiled into a single PDF and sent for reimbursement.

Folder  

Images and PDF file  

Convert images to PDF in Power Automate: step-by-step guide

In this section, we'll guide you through creating a Power Automate flow that converts an array of images into a single PDF and emails it to the accounting department for expense reimbursement. Follow these steps to automate the process and reduce manual work.

Power Automate Flow  

Step 1: Create and trigger the flow to convert an array of images to PDF

First, log into your Power Automate account and create a new flow. For demonstration purposes, we use the Manually trigger a flow action, but in real-life scenarios, it can be triggered by events such as uploading files to a SharePoint folder, receiving an email, or submitting a form.

Create trigger  

Step 2: List files in SharePoint

Next, set up the List folder action in SharePoint. This action retrieves all the files stored in the specified folder, allowing you to process them later in the flow. Fill in the site address and specify the path to the folder where your receipt and invoice images are stored. This ensures that all images uploaded by employees are collected for further processing.

List Folder action  

Step 3: Create an array variable for images

In this step, we create an ImageArray variable of the Array type to store the image data. This variable will contain all the images retrieved from the SharePoint folder, preparing them for the conversion of the array of images to PDF.

Initialize variable  

Step 4: Get file content and append to array

Extract the contents from the List files action in SharePoint using the Get file content action. Enter the SharePoint site address and use the dynamic Id from the File Identifier field. Append each file content to the ImageArray variable using the Append to array variable action inside a For each control loop.

Get files  

Step 5: Convert images to PDF

Now we have our array of images and are ready to convert them to PDF. To do this, we'll use the Plumsail Documents connector and the Convert Images to PDF action.

If you're using the Plumsail Documents connector for the first time, you'll need to set up an API key. To do this, sign up for a Plumsail account, navigate to the Documents, and generate an API key.

Plumsail Documents API  

Once you have the key, you can add it to your Power Automate flow by selecting Plumsail Documents as a connector and entering the key in the required field.

Now, add the Convert Images to PDF action to your flow. In the Image Content field, specify the ImageArray variable created in the previous steps. This action will take all the images stored in the array and combine them into a single PDF document.

Convert images in PDF with Plumsail Documents action  

Step 6: Create PDF file

Save the generated PDF to your SharePoint folder using the Create file action for SharePoint. Specify the folder, assign a name to the file, and include the .pdf extension.

Create file  

PDF with images  

Step 7: Share by email

Finally, send the PDF file via email to the accounting department using the Microsoft Office 365 action, Send an email. Enter the accountant's email address, write a message, and attach the PDF file using the advanced options. In the Attachments Name field, enter the name of your file, and don't forget to specify the .pdf format, otherwise, the file won't open. In the Attachments Content field, insert the output from the Plumsail Documents action, Convert Images to PDF.

Send file  

Conclusion: automate image to PDF conversion in Power Automate

By using Power Automate to convert arrays of images to PDF, organizations can significantly streamline their document management tasks. This capability streamlines the expense reimbursement process and enhances various document management tasks. By automating these processes, companies not only expedite the conversion of images to PDF in Power Automate but also support broader digital transformation strategies, boosting overall efficiency and productivity.

Convert images to PDF in Power Automate with Plumsail Documents

Register an account to start your 30-day free trial and explore the full capabilities of Plumsail Documents in Power Automate.

Need help with setup? Book a free Intro call with Plumsail team and we'll work with you to solve your automation challenges. Let's start simplifying your processes today!