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 / List folder based on t...
Power Automate
Answered

List folder based on the parameter passed through power app

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

1st step - I am trying to create a flow where the flow gets the parameter(which would be partial folder name in SP library) from power apps. It then searches for the folder name in the SharePoint library using "Get Items" action and Filter OData query using substringof() formula to check folder name. Now i want this folder name to be stored in a variable which can be used to list the files in that particular folder and return the file names to power apps. 

2nd step - Every folder would have a .eml file which will again have attachments in them. The attachments should be extracted and converted and merged into a PDF file and sent to power app

3rd step - similarly the same folder will have other files of different format files which again needs to be converted to a PDF format and sent to power apps.

Since power apps supports only PDF view, i am trying to convert every file to a PDF and then view it in flow.

 

Any help on the above query will be appreciated

Categories:
I have the same question (0)
  • Verified answer
    rimatos Profile Picture
    Microsoft Employee on at

    HI @Anonymous ,

     

    1- What is your current configuration on the Flow in this step? Maybe I could help you in here if you show where you are blocked.

     

    2- I don't know of a way to extract files from .eml files. Looking into some community threads this does not seem to be supported as there are some feature requests such as this one: https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Export-Email-to-PDF-format-or-convert-eml-file-to-PDF-including/idc-p/463333


    Nevertheless, in this thread i found some attempts of possible solutions that may be helpful to you: https://powerusers.microsoft.com/t5/Building-Flows/Flow-to-Extract-PDF-from-EML-that-is-attached-to-an-email/td-p/484646 

    3- In terms of converting files to PDF this might be tricky depending on the type of file you have. It will most of the times use the "OneDrive" connector so you can use the action "Convert File" which can convert to PDF.

     

    I have find a few guides that maybe could help you in this part:

     

    Doc -> PDF
    http://johnliu.net/blog/2017/10/convert-sharepoint-files-to-pdf-via-flow  &
    https://natechamberlain.com/2017/10/03/convert-sharepoint-documents-to-pdf-automatically-using-microsoft-flow/ 

    HTML-> PDF

    https://www.youtube.com/watch?v=4OJDkBBEdhI 

     

    Hope this helps you in any way!


    Regards,

    Ricardo

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @rimatos  , 

    Thanks for the response and the useful links shared.

    On point 1, I was finally able to list the folder by using apply to each action on the output of Get items and then using compose and list folder. The output of list folder is now giving me the list of files inside them. But now how do I store these files in OneDrive so I can apply the next steps of converting to pdf and send the response to PowerApps.

    And regarding thread for extracting the files from .eml would not work for me. since I need to extract the .eml file stored on the SP folder. But anyways thanks for providing the work around of using One-drive. Let me try that out.

     

    flow.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 124 Super User 2026 Season 1

#2
Ellis Karim Profile Picture

Ellis Karim 52 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 50

Last 30 days Overall leaderboard