cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Start an approval from a selected file from a document library

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?
1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

9 REPLIES 9
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

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.

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!

Anonymous
Not applicable

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

 

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. 

Anonymous
Not applicable

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

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

View solution in original post

Anonymous
Not applicable

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!

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

 

Thanks, 

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (3,942)