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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / how to capture file na...
Power Automate
Unanswered

how to capture file name from document library file upload using standard approval Flow

(0) ShareShare
ReportReport
Posted on by

Hi, I'm new to Flow and would love a bit of advice as I can't find a template for this.

 

We have a document library called Reporting (created a flow and found this library for my criteria) and a metadata field to say "Yes" or "No" to whether that file has been processed. 

 

What would be great is an email every two days listing documents in that library where Processed = No.

 

I've got a flow set for every 2 days, with Processed_x003f_ eq "No" but it doesn't seem to be working or if it is I can't see the results.

 

Then the next step is getting it to email those results to me, either in the email body or an attached file.

 

I would've thought this to be a fairly simple win but I'm struggling. Can anyone help?

Categories:
I have the same question (0)
  • PieterVeenstra Profile Picture
    13 on at

    Hi @Anonymous,

     

    You are looking for a flow with a trigger that is scheduled every 2 days ( I think that you got this sorted already)

     

    Then an action SharePoint - Get files (properties only)

     

    You could stick a filter in the above action to filter the Yes/No.

     

    Then you have an array which you you run with an Apply To Each

     

    Now Set a variable and expand it wihtin the Apply to each with some value that you want to put in your email.

     

    Then aftyer the Apply To each send out the email and use the variable content to spit out the html that you want to send by email using the dynamic content of the variable.

  • v-xida-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Could you please share a screenshot of your flow's configuration?

    Further, could you please show a bit more about the metadata field in your SharePoint library?

     

    I have created a SharePoint library (Reporting) on my side and the data structure of it as below:7.JPGNote: The Processed? column is a Yes/No type column in my SharePoint library.

     

    I have made a test on my side and please take a try with the following workaround:

    • Add a "Recurrence" trigger, Interval set to 2 and Frequency set to Day.
    • Add a "Get files (properties only)" action, specify Site Address and Library Name.
    • Add a "Filter array" action, From set to output of "Get files (properties only)" action, click "Edit in advanced mode", type the following formula:
    @equals(item()?['Processed_x003f_'], false)
    • Add a Variables-> "Initialize variable" action, Name set to AttachmentArray, Type set to array and Value set to empty.
    • Add a "Apply to each" action, input parameter set to output of "Filter array" action.
    • Within "Apply to each" action, add a "Get file metadata" action, specify Site Address and File Identifier field set to following formula:
    item()?['{Identifier}']

           Add a "Get file content" action, specify Site Address and File Identifier field set to following formula:

    item()?['{Identifier}']

         Add a "Append to array variable" action, Name choose AttachmentArray and Value set to following formula:8.JPG

    Note: Within Value field, type a json data which has two elements. The key of first element set to Name and corresponding value set to DisplayName dynamic content of "Get file metadata" action. The key of second element set to ContentBytes and corresponding value set to following formula:

    body('Get_file_content')?['$content']
    • Under "Apply to each" action, add a "Send an email" action, Attachments field set to AttachmentArray variable.

     

    Image reference:9.JPG

     

    10.JPG

     

    11.JPG

     

    The flow works successfully as below:12.JPG

     

    13.JPG

     

    Best regards,

    Kris

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard