cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jordon14
Frequent Visitor

Conditional Trigger

Hi guys,

I'm new to Power Automate but I've built a nice simple approval flow for my Purchasing / Finance department.  We use a 3 way matching system at work to verify what we bought / received / and will pay for.  I would like to automate / simply this process.

 

My thought of the flow: 

Buyer issues new PO and uploads to SharePoint list using PO number.  Once receiving receives that PO from the supplier, they will upload the packing list (what we received) under that same PO number as an attachment.  Once the supplier sends an invoice, finance will upload the invoice under that same PO number as an attachment.

 

My problem is how do I create a trigger from Sharepoint once the invoice (the 3rd & last attachment) has been uploaded?

 

Thanks for the help!

1 ACCEPTED SOLUTION

Accepted Solutions
Jordon14
Frequent Visitor

I've have solved by going in a different direction.  Instead of relying on 3 documents inside of a folder, I've used 'Choice' columns to specify 'Yes/No' parameters.  

Therefore, when receiving modifies/uploads a packing list the default 'Choice' column is set to 'No', and a condition is ran against that modification that specifies it must be a modification from a certain department and the 'Choice' column must be 'No'.  If the flow meets these conditions it will send an email and update the 'Choice' column to 'Yes' so that the flow does not perform an infinite loop.

Same goes for the finance department.

So instead of 1 flow, there will be 3 (3 different triggers).

View solution in original post

3 REPLIES 3
abm
Super User
Super User

Hi @Jordon14 

 

You could use try using 'when a file is created in a folder' trigger for users upload a file in your list.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Jordon14
Frequent Visitor

That would create a trigger 3 times for that specific SharePoint List item since 3 different files will be uploaded in the item at 3 different times......which is what I don't want to happen.

It would work if you could set the trigger to run when a specific person uploads the invoice (the 3rd and last attachment).  All 3 attachments will be uploaded by 3 different people so if I could relate that specific person's email that attaches the invoice to my trigger that you suggested ('when a file is created in a folder') that could potentially work.

Do you know if this is possible?

Jordon14
Frequent Visitor

I've have solved by going in a different direction.  Instead of relying on 3 documents inside of a folder, I've used 'Choice' columns to specify 'Yes/No' parameters.  

Therefore, when receiving modifies/uploads a packing list the default 'Choice' column is set to 'No', and a condition is ran against that modification that specifies it must be a modification from a certain department and the 'Choice' column must be 'No'.  If the flow meets these conditions it will send an email and update the 'Choice' column to 'Yes' so that the flow does not perform an infinite loop.

Same goes for the finance department.

So instead of 1 flow, there will be 3 (3 different triggers).

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,613)