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 / Start an approval from...
Power Automate
Answered

Start an approval from a selected file from a document library

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
I am new to Flow, I see a lot of tutorial of approval using Lists.

My question is, how can I start a approval workflow from a sharepoint document library from a selected file?

In my sharepoint document library, i have a lot of folders, each folder has a pdf named “<employeename>_Summary.pdf”

If i upload that certain file in a folder, it should start an approval. How can I do that in a document library?
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,039 Most Valuable Professional on at

    There is a trigger in Flow for "When a file is created in a folder".  Use that as your trigger and you can then add an approval action to the flow.  This will start an approval flow every time a file is uploaded to that folder. There are other triggers that you can use if you want to have the approval start whenever a file is uploaded to the library in general also.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Thanks I found it!

    So how can I add to the flow, if the file name contains “Summary”? Whenever I upload a file with file name <employeename>_Summary.pdf it should start the approval.
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey!

     

    Using that connector, you should initialise a variable to point to the filename and if that meets te requirement, then start an approval. Please have a look at the screenshot below. 

     

     

    flows.png

     

     

    Thanks, 

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @yashag2255 

    I'm getting this error:

     

    The variable action 'Initialize_variable' of type 'InitializeVariable' cannot be nested in an action of type 'Apply_to_each'

     

    here's the full screenshot of my flow.

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi, 

     

    You cannot initialise a variable inside a loop. So you initialise the variable outside with null value. Inside the loop, create an action Set variable/ Append to Array variable and then set the value over there. 

     

     

    Hope this Helps 

     

    Thanks. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @yashag2255 I'm sorry I did not get your advise. I'm new to Flow and this is my first Flow project. Apologies.

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Anonymous , 

     

    You could also just skip the variable part (I put the variable to check the file names coming through)

     

    Please refer to the screenshot below:

    kjhkjhkj.png

     

    Thanks, 

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @yashag2255 finally solved! Thanks for being patient.

     

    I have another concern with the same flow but different issue - its on the approval flow. Will try to look for answers on the forum or will post a new thread. Thanks!

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous , Glad that it worked for you. Please feel free to post any concerns/ help you need in flows on the forum. 

     

    Thanks, 

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
Haque Profile Picture

Haque 308

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 226 Most Valuable Professional

Last 30 days Overall leaderboard