web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get all file names in ...
Power Automate
Unanswered

Get all file names in subfolder (Convert Word Document to PDF)

(1) ShareShare
ReportReport
Posted on by 2

Hi there,

I am using the "Convert word document to PDF" function in my work flow, with the steps below:

1. The flow populates a word template.

2. It creates a word document for each row in the supplied excel.

3. The created word documents are stored in a subfolder called "Pay_Slips" in the "Finance" document library.

 

The Problem:

I want to convert all the word docs in the "Pay_Slips" subfolder a shown in the snap below:

The problem am facing is that I have to specify a file name in the "*File" field. I would like to use dynamic content (the variable "Name") so that every word document in the subfolder is converted to PDF.

 

Convert word to pdfConvert word to pdf

 

Note: Using dynamic content ("Name") works if am saving the word docs at the root of the library.

Any help is much appreciated.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,970 Most Valuable Professional on at

    Hi @paulgonzaga,

     

    You could for example use a get files (properties only) action to list all the files in the pay_slips sub folder. With an apply to each loop you could loop through this collection of items and convert them one by one to a pdf.

     

    Below is an example of that approach.

     

    To get the correct file name I am using an expression which uses the FullPath property and removes the library name:

    replace(items('Apply_to_each')?['{FullPath}'], 'Finance/', '')

     

    convertworddocuments_inbulk.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 274 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 175

#3
Haque Profile Picture

Haque 166

Last 30 days Overall leaderboard