I may have to stop watching your videos! Every time I watch one I want to go back and change so many of my flows because you show better ways of doing things. I’ve used approvals and switches before, I’ve used variables and queried AD groups, but never in a thousand years would I have thought about using the process you just demonstrated. Truly a masterclass.
Thank you Rob. I try to show different things in each video. My next video will showcase the same approval process but the pattern will allow the flow to run beyond 30 days (current process will timeout after 30 days).
Reza, I was waiting for this detailed and brilliant video for many months. None can beat you in explaining the complex concepts in such as simple terms so well. Thank you so much for sharing!!
"Need more info" is the vivid real live state (plus Withdrawn also) - hilarious one with the state wise logging mechanism! This piece is just awesome!!
Shukran Reza! Finally much awaited full proof workaround of State Machine scenario, indeed content was very informative and up to topic without any jargon.
Fantastic as always Reza. Thank you very much for this video. I already have some flows that I can use this state machine pattern to make them more simple.
Thank you João. Please note that this pattern will work as long as the entire process ends within 30 days (flow run duration limit). For longer running flows, my next video will cover that :)
Woww!!! Another master piece. Getting values from arrays and joining using join one should not miss. Is your next video on long running flows uses the state machine flow?
Thank you for this video. Before building a huge mult-state workflow in Power Automate, I want to ensure I build it correctly. I am wondering if 1 workflow for 6 different states is acceptable and within limitations, or if I should build smaller / child workflows. I will watch your other videos now in case you answer that. Thanks!
Hope it lives up to expectations. This is great when your workflow process will complete in 30 days. For workflows greater than 30 days - It is a lot more complex. I am working on another video for that. Challenge is to explain it in a simple manner.
Thank you, the video is incredible. Almost any process, no matter how complicated, can be replicated via state machines. You can use a CDS or any datasource to get the approvers or groups, and even the following state... it's simple yet scalable. Thanks a lot.
Awesome Reza! Is it possible to not use variables and instead use the Sharepoint 'status value' field by updating the 'status value' of the item in the cases? What function are the 'status' variables providing that the Sharepoint field Status value is not? Pardon my question, I'm not understanding it's role. Thank you again.
The Status variable change is what helps the flow move from one state to another. If you use the Status column value in switch case, the status value will always be the original value of status when the flow started even though we update it later. This is because the reference for the status value will come from the flow trigger.
Hi Reza, Thank you for your awesome video's! I have build this state machine with 8 reviewers and would like to complete it with a feature to check which reviewer has submitted his comments/approval and which is pending. I would like to update the approval history every time someone reacted. Do you have a video or tip about this topic?
Hi Reza, Thanks for the detailed, well-described, and comprehensive videos. I have a query, DO we need to change the limit under DO UNTIL connector because my flow is timeout after an hour?
Thank you Gustavo. I have adaptive cards in my list. In fact I did a session on adaptive cards a while back. It is on YT - ruclips.net/video/fdTAUVwONGA/видео.html
Hi Reza. Great video. I'm learning heaps from all your videos, thank you. One thing I came up against was a 256 character li it on the multi line text field where you keep the approval history. Is there a way of overcoming this limit?
Thanks much for the video. I do have a requirement where the user should have option to approve from powerapps as well as lazy approval. The user can choose either of it. How can I handle this situation
Only way possible would be to connect to Dataverse (CDS) to get the approval info and then build the approval card in Power Apps. You would then have to replicate the exact same updates to the Dataverse tables as the approval action once a decision is taken. This is not a recommended technique as per MSFT docs.
Reza Excellent Video !!! Very useful and very well explained!!! I have a question. Many times the approver requests the submission of files. How you can attach files in approvals. In my flow the trigger is microsoft forms and the follow-up of the request is done in excel online. Could you give me some advice? Thank you so much!!
Flow approval forms only have the buttons (Decision) & an optional comments field. Currently, they cannot be customized. You would have to define some process for approvers to submit files. May be give them a link to some repo where they can upload the files.
Great video as always Reza, Quick question : How would it possible to lock the Sharepoint history column or Status column in order to block End users to change Statuses or history manually from Sp List? Thanks
Both columns can be hidden from the SP form using the new Show/Hide column feature when customizing forms. You could also leverage Power Apps to customize the form and hide those fields.
Hi Reza, This video is just awesome. Please let me know what happens to the flow run of a specific document/request when the requester just deletes the document from the library (because of any reason)? and also what to do when it is required for the requester to re-upload the modified document, i mean how to incorporate re-upload on document library?
If requester deletes the document, the flow would error when updating properties.This would need to be handled in flow by doing exception handling. Also, when approver would click on link to review document, the document link would be broken. For scenario wherein the user re-uploads a document, there could be 2 scenarios here. Scenario 1 - workflow is already running. Scenario 2 - workflow was completed and now needs to restart. There would have to be some sort of mechanism for user to restart the workflow. Either by user updating the hidden flag column or by some calculated column technique. Ideally you would want to ensure the document under review is never modified/deleted. You can do that by setting permissions for the dcoument in the flow.
hi reza Wonderful video!! I have a question about how a sharepoint column can be made to prevent the user from returning to a previous state... Is that possible with sharepoint or power automate. Greetings!!
Dear Reza, thank you for your video, I did the same process but instead of Documents it is Microsoft List. I add "Get item" instead of "Get file properties". but my history isn't full, every time when I Resubmit for Review, all history starts over again. What can be my mistake?
Welcome! I have not come across the mentioned issue and hence not sure what the reason for your issue is. I recommend posting your issue with screenshots on the forums at powerusers.microsoft.com
Hi Reza, Great information. Thank you. Two questions. How to prevent the author from editing the custom fields other than uploading documents? In this demo, the author can edit the state and approval history which will break the workflow.
Also, how to make the latest approved version only visible. In this example, I assume the document is visible for readers when the workflow is in progress. Seems like the only option is to enable content approval and publish the document once approved. Thanks! Ravi
1 - For SharePoint you can customize the show/hide fields directly from the form. So the state and approval history can be hidden in form. One could also leverage Power Apps to show/hide fields. Once the approval begins, you can also break permissions on item to make it read only for users but can be modified by the WF run account. 2 - Content approval is the answer or lock the document using permissions.
Just one question Reza. This state machine doesn't lock the file from being modified by the requestor or someone else while the state machine is running, correct? How would you lock it so it is not tampered with or modified until a resubmission is initiated by the requestor? SharePoint list item permissions via HTTP requests?
@@RezaDorrani For that, we can use MS Form to generate approval request and record response to sharepoint list and give viewing permissions to approvers.
Reza, great video. The template you used, doesn't show up for. I am trying to build this from scratch. I have several cases (Division, Directorate, Front Office, DAC, AC, and Return). The Office 365 action will not work for me as personnel come on details and their department doesn't change to reflect their current department. What would I use in this case? I have a list of dynamic reviewers for the division and directorate cases and the remaining cases will be the same reviewers. How do I implement the dynamic reviewers list for those two cases? Also, I would like for the status "Returned for Edits" to move back to the creator and then upon resubmission, the creator would send it back to the case that returned it, how do I do that? I don't want to the review process to start from the beginning. Would I have to add another switch control and have the different outcomes as cases?
Here is the template link - us.flow.microsoft.com/en-us/galleries/public/templates/66638b0861a743b383bef9bb447d3977/state-machine-process-based-on-a-document-created-in-sharepoint/ You would need to modify it based on your scenario.
Hi Reza, That was very helpful video. Using this we can convert multiple OOTB wf templates to power automate. Had one query, please create a video tutorial for converting Disposition workflow to power automate. Thanks
Hi Darsh, I feel with all the videos as part of the approvals playlist, one can build any scenario. Here is the link to the playlist - bit.ly/learnflowapprovals. Give it a shot and see how it goes.
Reza thanks for the video, i used the same logic to make my workflow with items list, but my question is : If i need to complete the status manually from the sharepoint site, status never changes, i understand this is because the flow waits for the response from the reviewer by email , is that correct? How can i make the process work in both ways, manually and also as your explanation in this video?
Ideally you want one source of truth for a response from approver which is the approval action. -Approval action can be responded to from email or teams or mobile app or approvals center. For manual action in list, you would need to check latest status in flow every time and accordingly act. Not something I have tried.
Hello Reza, I become my info from external people over a fill-in-Form(Forms), store it in sp365-list and send a reply mail with flow 'on new item'. What would you do when the reply-mail to be send to the requestor fails because off a falls input-email-address? (correct email address in list and Manual trigger again the flow or ...?)
You would need to validate in flow using expressions if email is valid. I do not have a video on this. I would recommend you post your issue/query with screenshots on the forums at powerusers.microsoft.com
Awesome tutorial, glad to see MS has a template for this now. Did you have to do anything with the do while timeout settings? When I created this in the past I had to change the timeout settings to allow the do while loop to run for the full 30 days. Did MS set the timeout for their do while in this example to run the full 30?
Do while loop has a default limit of 60 that can be extended. This entire pattern works great when the entire approval process ends within 30 days since that is the timeout duration for a flow and cannot be changed. My next video focuses on how we can build long running flows.
Hello Reza, first I want to thank you for your content which has served me a lot, as it is very clear and didactic...;). I have a question where I hope you can guide me. In Power Automate, you can run a flow that "detects the files you select" in one sharepoint library and copies them to another. Again thank you and stay tuned for your genius...;)
For a selected item trigger only one flow can be called at a time. There is an idea in the forum for multiple selections. However, we can take help of Power Apps for this. Create an app that connects to the library. Users can selected multiple items and then we can pass the context of those items to flow to start the process. It would be a complex undertaking.
Hi Reza - How does this workflow look like when the approvers take more than 30 days? Will building another branch for each approver's timeout suffice as the loop get's shut off due to 30 day limit and on day 29 perhaps the timeout scope steps retriggers the workflow? I am curious to know if it would follow into the area it was last at.
Excellent Posting, and gives more ideas to custom to our own requirements. further, if I want to send do an attachment (Like a Supporting document or An Approval Document to the Specific Document) before submitting an approval response, is there is any possibility to do that? (Getting an attachment and sending to SharePoint document library list along with Approval response), Found on "Start and wait for approval" has the capability to show if any attachment on it, whereas I don't find an option to load attachment while the response, is there is any alternative way to get the result?
The approval forms do not support uploading attachments as the approver. You can provide a link to the main item and they can probably load their attachments directly there.
Hi Reza, I'm also one of great admirer of your work.. (though silently ;). recently I have build one State machine flow wherein in my last step, I'm trying to 'Set content approval status'. However, I'm getting error for the "ETag", saying that the "The ETag of this item does not match the one used for setting content approval status. The contents of the item may have changed before the action was completed." Can you pls. help..? Thanks in advance
I like silent admirers :) ETag issue typically relates to an issue with mismatched types. I will have to look at your flow in action to provide guidance. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Hi.. would this stop my issue with running a flow on a SharePoint library (new or modified item) and approve (wait till response)..creating duplicate flows (and thereby email for approval duplicate) when I send more than 20 new items at once.. I have a restriction on trigger to say it must be new but think flow is not updating the status before it reruns a flow on the new item as status hasn't changed yet ?? I tried turning off concurrent run option but this stops the flow runs until first flow has been completed as wait for approval stops flow but isn't complete ??? Thanks
Reza, Do you have any videos on how to delegate to admin credentials in Flow to access SharePoint instead of context user who started the flow? I have a requirement where in I am accessing resources in SharePoint which the context user do not have access to.
Hi, This depends upon the trigger of the flow. Automated flows run under the context of the flow account (Admin account). In this video, flow triggers when item is added/updated which is an automated trigger and hence flow runs under context of admin account.
Hi Reza, Thank you, great work as always. I am not able to use Azure Ad security group in SharePoint list people picker but I am able to use Office 365 groups.
Hi Gilbert, I have not tried it but it should work. learn.microsoft.com/en-us/answers/questions/179939/how-to-add-azure-ad-security-group-(-not-email-ena
If you look at my approval playlist, I have convered various scenarios and patterns and there are more coming - ruclips.net/p/PLTyFh-qDKAiFUGTtwSwFT79Y7_jq_Aipe Give the collect signature style workflow a shot in flow with these patterns and see how it goes.
Hi Reza, How are you? Happy New Year!!! I have created a state machine flow and then set the DO UNTIL limit [Count = 500 and Timeout = P30D]. After 30 days one task is penging, and count were only about 250+ (I have used the increament counter) and then flow sents the mutlple tasks becasue it not reach to 500. Is that okay that I will remove the count limit and keep only 30days timeout?
Count limit drives how many times loop will run. 250+ times is itself very high. An approval workflows changing state 250 times seems weird. After 30 days flow itself will time out. Tasks will continue to exist and users will be able to respond to it but the flow would have timed out and will not process.
@Reza Dorrani thank you so much for your reply and help, Yes, it's weird. May I share the screenshot? It should be timeout. Moreover, I have created a test flow and set count = 10 & Timeout = PT1M. In this test flow count is working, but Timeout is not working.
Can u pls help out to trigger the approval flow for External user/guest user when updating or creating something in dynamics 365. Is there any feasibility for guest user/external user approval flow to provide comments and to capture the approvers in the flow(without providing any license).
hi reza one question, when the status is need more information, the user will go and update the doc then upload it again, wont this be a confusion and the sharepoint will consider it as new doc and start the process from the beginning as a new doc and a new flow will start?
Yes it would be. If they just update the file within SharePoint, it will be fine. If they upload another document with same name, SharePoint replaces the file - delete then add. This would re-trigger the flow. You would have to add additional logic to handle those scenarios. (example: set flags, check version history etc.)
If all of the department approve-users (in the department list) have a 'out of office' for the preset time-period (f.e.2days) how would you resolve this to add/replace replacement-users of a 2nd column from that department? Is there a video from it?
You can check for out of office using Outlook connector and accordingly handle time outs or reassign. I do not have a video on this use case. I will recommend you check on the forums at powerusers.microsoft.com/
@@RezaDorrani Tanks for the tip ... Actually, can I make an endless 'do until' loop with OutOfofFice escalation and then Time-out escalation and add substitutes to a variable 'VarDeptApprovers' every escalation and update history, until someone approves (like state machine) and I don't have to repeat the approval/update steps?
@@RezaDorrani My OOF (mail tips) work for 1 user(concat VarDepUsers) but with multi users (concat to variable vardepusers) i get a ErrorInvalidUser (must be perhaps a check 'one at the time' (loop?) Where can i post pictures? flow community or flow groups?
Hi Reza, Good work. This is a good and simple alternative to what Jon Levesque had done earlier with #DoctorFlow (Which is another good approach). I was just wondering if we can implement state machine in business process flows. What will be the pros/cons of that approach vs this approach? thoughts? please share.
Both approaches have the same end result. My approach uses standard connectors and a single flow. All flow logic must be added to a single flow. Serge's approach uses premium connectors and multiple flows. Approach is modular as it has multiple flows and hence logic can be distributed.
Great question. As mentioned in the description of this video, this process will work as long as the entire process ends in 30 daysZ For scenarios related to long running processes (>30 days) - My next approval video will cover it :)
Hi Reza, I am recreating this flow but with only one approver and 3 custom responses: Approved, Rejected and Need more information. For the Do Until Switch case = Pending where Outcome = Approve, I'm setting the Status = Completed, but it seems it's not detected, so the loop doesn't stop. The Update action doesn't update anything in SP and I get a 2nd approval email (I'm both the requester and approver). Any idea what's happening?
@@RezaDorrani I'm sure they match, see screenshots. I checked for spaces and even tried copy/paste. Probably youtube is not the best channel to raise this, could I post this on the Houston user group? drive.google.com/file/d/1aU2mtN6gIVjMKPtEf6bUG5nMCicZSENv/view?usp=sharing drive.google.com/file/d/1NNN8bKkjwdilF96bfQWLuxqKrWJRJWp_/view?usp=sharing
@@RezaDorrani Hi Reza, here is the screenshot of the Status variable and Do Until loop. drive.google.com/file/d/1UOIm_RxNs-L9tktf8lHg3wqTcObKZIas/view?usp=sharing drive.google.com/file/d/1jaolZuMSZ29h8LGUinh0e_HDWx_iC3Ga/view?usp=sharing If I initialize the variable Status as Completed the Loop doesn't trigger, so it recognizes the value Completed. I'm not sure if the nested IF is the issue, I might try with a Switch instead.
I agree. Reason I prefer to use SharePoint is because it is a standard connector, and hence more users can try it out in their own tenants. CDS requires premium licensing. However, with the introduction of Oakdale, I will do more videos with CDS as the backend. bit.ly/learnprojectoakdale - Check out the Oakdale related videos here.
How sad is my life that I'm only on minute 2:00 yet I can't wait til midnight so I can replicate this on my own tenant? These work tools are more like awesome toys... and to think I once hated SharePoint
I’m feel the same, SharePoint was just that beast I couldn’t tame. I can’t say it out loud because of all the early hating, but I love it now!! And as for Rezza’s videos there is no better content on RUclips!
I may have to stop watching your videos! Every time I watch one I want to go back and change so many of my flows because you show better ways of doing things. I’ve used approvals and switches before, I’ve used variables and queried AD groups, but never in a thousand years would I have thought about using the process you just demonstrated. Truly a masterclass.
Thank you Rob.
I try to show different things in each video.
My next video will showcase the same approval process but the pattern will allow the flow to run beyond 30 days (current process will timeout after 30 days).
Reza, please don’t fall into the camp that calls me Rob instead of Dan (so many people do it so you’ll be in company!!) 😂😂
@@robofski Ok Dan 😊
This is great, and I was wondering if this is possible in dataverse model driven app, where the record state goes back and forth this way in bpf.
Reza, I was waiting for this detailed and brilliant video for many months. None can beat you in explaining the complex concepts in such as simple terms so well. Thank you so much for sharing!!
Thank you as always Aroh
"Need more info" is the vivid real live state (plus Withdrawn also) - hilarious one with the state wise logging mechanism! This piece is just awesome!!
These states are inspired from one of my customers who used them in their contract management process :)
Ditto Dan Robson, everytime I watch your videos I have to rethink everything. Definitely the most useful and instructive videos on the topic.
Wow, thanks!
I like how you handle so many different use cases. I work in a corporate and power automate can make a lot of things flow much better.
Glad to hear that!
Shukran Reza! Finally much awaited full proof workaround of State Machine scenario, indeed content was very informative and up to topic without any jargon.
Glad you liked it
Thank you so much reza
Was searching the same content for many days but couldn't find. Thank a ton.
Truly a master piece.
Glad it was helpful. Thanks for watching Paras.
Fantastic as always Reza. Thank you very much for this video. I already have some flows that I can use this state machine pattern to make them more simple.
Thank you João.
Please note that this pattern will work as long as the entire process ends within 30 days (flow run duration limit).
For longer running flows, my next video will cover that :)
Well put Reda! To the point as usual. I enjoy your content. Really! 🙏👍👍
Much appreciated
Woww!!! Another master piece. Getting values from arrays and joining using join one should not miss. Is your next video on long running flows uses the state machine flow?
Yes - state machine. I will rebuild the same flow and show how to extend the flow beyond 30 days.
Made my day! Very useful video!! Thank you!
Glad it helped!
Thank you for this video. Before building a huge mult-state workflow in Power Automate, I want to ensure I build it correctly. I am wondering if 1 workflow for 6 different states is acceptable and within limitations, or if I should build smaller / child workflows. I will watch your other videos now in case you answer that. Thanks!
It depends is the best answer :)
Awesome video first time watching state machine concepts, lot of easy steps to understand 🙂
Glad to hear that!
I've been waiting for this video. Thanks in advance!
Hope it lives up to expectations. This is great when your workflow process will complete in 30 days.
For workflows greater than 30 days - It is a lot more complex. I am working on another video for that. Challenge is to explain it in a simple manner.
Thank you, the video is incredible. Almost any process, no matter how complicated, can be replicated via state machines. You can use a CDS or any datasource to get the approvers or groups, and even the following state... it's simple yet scalable. Thanks a lot.
Amazing, thanks for the video. Waiting eagerly for your next video.
Thank you Viraj
very fantastic and detailed video. Thank you very much
You are most welcome
Awesome Reza! Is it possible to not use variables and instead use the Sharepoint 'status value' field by updating the 'status value' of the item in the cases? What function are the 'status' variables providing that the Sharepoint field Status value is not? Pardon my question, I'm not understanding it's role. Thank you again.
The Status variable change is what helps the flow move from one state to another.
If you use the Status column value in switch case, the status value will always be the original value of status when the flow started even though we update it later. This is because the reference for the status value will come from the flow trigger.
@@RezaDorrani Thank you for explaining! Understand now 🙏🙏🙏
Wow, some great ideas to try out in this video. Thanks!
Thank you. Let me know how it goes when you try it out.
Yes! Finally, can't wait :)
Hope this lives upto the expectations.
Hi Reza, Thank you for your awesome video's! I have build this state machine with 8 reviewers and would like to complete it with a feature to check which reviewer has submitted his comments/approval and which is pending. I would like to update the approval history every time someone reacted. Do you have a video or tip about this topic?
Thank You.
I do not have a specific video on this scenario though.
Hi Reza,
Thanks for the detailed, well-described, and comprehensive videos.
I have a query, DO we need to change the limit under DO UNTIL connector because my flow is timeout after an hour?
I believe Yes
Mind blowing Reza, Great tutorial. Thanks. Are you planning to do a series on Adaptive Cards by any chance?
Thank you Gustavo.
I have adaptive cards in my list. In fact I did a session on adaptive cards a while back. It is on YT - ruclips.net/video/fdTAUVwONGA/видео.html
Hi Reza. Great video. I'm learning heaps from all your videos, thank you. One thing I came up against was a 256 character li it on the multi line text field where you keep the approval history. Is there a way of overcoming this limit?
Approval history column is multi line in SharePoint which is greater than 256 characters. Make sure your column is not single line of text.
Thanks much for the video. I do have a requirement where the user should have option to approve from powerapps as well as lazy approval. The user can choose either of it. How can I handle this situation
Only way possible would be to connect to Dataverse (CDS) to get the approval info and then build the approval card in Power Apps. You would then have to replicate the exact same updates to the Dataverse tables as the approval action once a decision is taken. This is not a recommended technique as per MSFT docs.
Thanks a lot for this wonderful video, can you please let us know how to handle 30 days timeout drawback of power auto?
ruclips.net/video/h6Eb-F0P6Hs/видео.html
Great! Can this also be triggered by "When an item is created"?
Absolutely, just change the trigger to when an item is created.
Great video Reza, thanks for sharing 😁.
Glad you enjoyed it
Reza Excellent Video !!! Very useful and very well explained!!!
I have a question. Many times the approver requests the submission of files. How you can attach files in approvals. In my flow the trigger is microsoft forms and the follow-up of the request is done in excel online.
Could you give me some advice?
Thank you so much!!
Flow approval forms only have the buttons (Decision) & an optional comments field.
Currently, they cannot be customized.
You would have to define some process for approvers to submit files. May be give them a link to some repo where they can upload the files.
@@RezaDorrani Thank you so much!!
Very informative and needed one.... Thanks.
Glad you liked it
Super.....May not be able to log in during live session but its a must watch on my to do list.
Let me know your feedback once you watch it
@@RezaDorrani - You made my day, this is exactly what I was looking for and it came at just the right time. 😍
@@sachwaru1 Great
Amazing video Reza, thank you :)
Glad you liked it. Thanks for watching.
Most welcome
Great video as always Reza, Quick question : How would it possible to lock the Sharepoint history column or Status column in order to block End users to change Statuses or history manually from Sp List? Thanks
Both columns can be hidden from the SP form using the new Show/Hide column feature when customizing forms.
You could also leverage Power Apps to customize the form and hide those fields.
@@RezaDorrani Thank you
Great! I would thank you much for your instruction. it's very useful for me.
Glad to know it is useful. Thanks for watching.
Hi Reza, This video is just awesome. Please let me know what happens to the flow run of a specific document/request when the requester just deletes the document from the library (because of any reason)? and also what to do when it is required for the requester to re-upload the modified document, i mean how to incorporate re-upload on document library?
If requester deletes the document, the flow would error when updating properties.This would need to be handled in flow by doing exception handling. Also, when approver would click on link to review document, the document link would be broken.
For scenario wherein the user re-uploads a document, there could be 2 scenarios here.
Scenario 1 - workflow is already running.
Scenario 2 - workflow was completed and now needs to restart.
There would have to be some sort of mechanism for user to restart the workflow. Either by user updating the hidden flag column or by some calculated column technique.
Ideally you would want to ensure the document under review is never modified/deleted. You can do that by setting permissions for the dcoument in the flow.
Thanks Reza.. it's great process design !!! very helpful :-)
Thank you Boyet
hi reza
Wonderful video!!
I have a question about how a sharepoint column can be made to prevent the user from returning to a previous state... Is that possible with sharepoint or power automate.
Greetings!!
Thanks.
Possible by maintaining status (column value). Check value and accordingly branch user to respective approval.
Excellent video and explanation. Can the data source be SAP instead of excel?
Yes, absolutely
Dear Reza, thank you for your video,
I did the same process but instead of Documents it is Microsoft List. I add "Get item" instead of "Get file properties". but my history isn't full, every time when I Resubmit for Review, all history starts over again. What can be my mistake?
Welcome!
I have not come across the mentioned issue and hence not sure what the reason for your issue is. I recommend posting your issue with screenshots on the forums at powerusers.microsoft.com
@@RezaDorrani thank you 🙏🏻
Hi Reza,
Great information. Thank you.
Two questions.
How to prevent the author from editing the custom fields other than uploading documents? In this demo, the author can edit the state and approval history which will break the workflow.
Also, how to make the latest approved version only visible. In this example, I assume the document is visible for readers when the workflow is in progress. Seems like the only option is to enable content approval and publish the document once approved.
Thanks!
Ravi
1 - For SharePoint you can customize the show/hide fields directly from the form. So the state and approval history can be hidden in form.
One could also leverage Power Apps to show/hide fields.
Once the approval begins, you can also break permissions on item to make it read only for users but can be modified by the WF run account.
2 - Content approval is the answer or lock the document using permissions.
Thx. This will simplify things for me.
Very happy to know that. Thanks for watching.
Just one question Reza. This state machine doesn't lock the file from being modified by the requestor or someone else while the state machine is running, correct? How would you lock it so it is not tampered with or modified until a resubmission is initiated by the requestor? SharePoint list item permissions via HTTP requests?
Hi Gregory,
That would have to be done via permissions and yes http requests is your option.
@@RezaDorrani For that, we can use MS Form to generate approval request and record response to sharepoint list and give viewing permissions to approvers.
Reza, great video. The template you used, doesn't show up for. I am trying to build this from scratch. I have several cases (Division, Directorate, Front Office, DAC, AC, and Return). The Office 365 action will not work for me as personnel come on details and their department doesn't change to reflect their current department. What would I use in this case? I have a list of dynamic reviewers for the division and directorate cases and the remaining cases will be the same reviewers. How do I implement the dynamic reviewers list for those two cases? Also, I would like for the status "Returned for Edits" to move back to the creator and then upon resubmission, the creator would send it back to the case that returned it, how do I do that? I don't want to the review process to start from the beginning. Would I have to add another switch control and have the different outcomes as cases?
Here is the template link - us.flow.microsoft.com/en-us/galleries/public/templates/66638b0861a743b383bef9bb447d3977/state-machine-process-based-on-a-document-created-in-sharepoint/
You would need to modify it based on your scenario.
@@RezaDorrani Wonderful, appreciate you.
Hi Reza,
That was very helpful video. Using this we can convert multiple OOTB wf templates to power automate.
Had one query, please create a video tutorial for converting Disposition workflow to power automate.
Thanks
Hi Darsh, I feel with all the videos as part of the approvals playlist, one can build any scenario. Here is the link to the playlist - bit.ly/learnflowapprovals. Give it a shot and see how it goes.
Reza thanks for the video, i used the same logic to make my workflow with items list, but my question is :
If i need to complete the status manually from the sharepoint site, status never changes, i understand this is because the flow waits for the response from the reviewer by email , is that correct? How can i make the process work in both ways, manually and also as your explanation in this video?
Ideally you want one source of truth for a response from approver which is the approval action. -Approval action can be responded to from email or teams or mobile app or approvals center.
For manual action in list, you would need to check latest status in flow every time and accordingly act. Not something I have tried.
Hello Reza, I become my info from external people over a fill-in-Form(Forms), store it in sp365-list and send a reply mail with flow 'on new item'. What would you do when the reply-mail to be send to the requestor fails because off a falls input-email-address? (correct email address in list and Manual trigger again the flow or ...?)
You would need to validate in flow using expressions if email is valid.
I do not have a video on this.
I would recommend you post your issue/query with screenshots on the forums at powerusers.microsoft.com
Hi Reza, What is the source of beautiful icons that you used in Approval History column, are they free to use ?
Those are emojis.
Awesome tutorial, glad to see MS has a template for this now. Did you have to do anything with the do while timeout settings? When I created this in the past I had to change the timeout settings to allow the do while loop to run for the full 30 days. Did MS set the timeout for their do while in this example to run the full 30?
Do while loop has a default limit of 60 that can be extended.
This entire pattern works great when the entire approval process ends within 30 days since
that is the timeout duration for a flow and cannot be changed.
My next video focuses on how we can build long running flows.
Best video 🌞
Thank You!
Hello Reza, first I want to thank you for your content which has served me a lot, as it is very clear and didactic...;). I have a question where I hope you can guide me. In Power Automate, you can run a flow that "detects the files you select" in one sharepoint library and copies them to another. Again thank you and stay tuned for your genius...;)
For a selected item trigger only one flow can be called at a time. There is an idea in the forum for multiple selections.
However, we can take help of Power Apps for this. Create an app that connects to the library. Users can selected multiple items and then we can pass the context of those items to flow to start the process. It would be a complex undertaking.
Hi Reza - How does this workflow look like when the approvers take more than 30 days? Will building another branch for each approver's timeout suffice as the loop get's shut off due to 30 day limit and on day 29 perhaps the timeout scope steps retriggers the workflow? I am curious to know if it would follow into the area it was last at.
It will time out and close the flow and trigger the same flow again and the logic is such thah it will start another approval for that same user.
@@RezaDorrani Thanks Reza
Excellent Posting, and gives more ideas to custom to our own requirements. further, if I want to send do an attachment (Like a Supporting document or An Approval Document to the Specific Document) before submitting an approval response, is there is any possibility to do that? (Getting an attachment and sending to SharePoint document library list along with Approval response), Found on "Start and wait for approval" has the capability to show if any attachment on it, whereas I don't find an option to load attachment while the response, is there is any alternative way to get the result?
The approval forms do not support uploading attachments as the approver. You can provide a link to the main item and they can probably load their attachments directly there.
@@RezaDorraniMany thanks for your reply, and I'm having strong confidence in you, that you will respond. You are very Great Reza 👍👌
Amazing,, thanks alot
Most welcome
Hi Reza, I'm also one of great admirer of your work.. (though silently ;). recently I have build one State machine flow wherein in my last step, I'm trying to 'Set content approval status'. However, I'm getting error for the "ETag", saying that the "The ETag of this item does not match the one used for setting content approval status. The contents of the item may have changed before the action was completed." Can you pls. help..? Thanks in advance
I like silent admirers :)
ETag issue typically relates to an issue with mismatched types.
I will have to look at your flow in action to provide guidance. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Hi.. would this stop my issue with running a flow on a SharePoint library (new or modified item) and approve (wait till response)..creating duplicate flows (and thereby email for approval duplicate) when I send more than 20 new items at once.. I have a restriction on trigger to say it must be new but think flow is not updating the status before it reruns a flow on the new item as status hasn't changed yet ?? I tried turning off concurrent run option but this stops the flow runs until first flow has been completed as wait for approval stops flow but isn't complete ??? Thanks
I did not understand your scenario. Best to try it out and test.
Reza, Do you have any videos on how to delegate to admin credentials in Flow to access SharePoint instead of context user who started the flow? I have a requirement where in I am accessing resources in SharePoint which the context user do not have access to.
Hi,
This depends upon the trigger of the flow. Automated flows run under the context of the flow account (Admin account).
In this video, flow triggers when item is added/updated which is an automated trigger and hence flow runs under context of admin account.
Thanks Reza
Thanks for watching Sundra
Hi Reza, Thank you, great work as always. I am not able to use Azure Ad security group in SharePoint list people picker but I am able to use Office 365 groups.
Hi Gilbert, I have not tried it but it should work. learn.microsoft.com/en-us/answers/questions/179939/how-to-add-azure-ad-security-group-(-not-email-ena
@@RezaDorrani Thank you. Will check it out.
How can a finished 'new file flow' after been 'approved/rejected', (manually/button/...?) be restarted?
You would need to change your trigger and logic. Check ruclips.net/video/h6Eb-F0P6Hs/видео.html
Great video, thanks...also can you please help me in creating collect signature workflow SharePoint OOB workflows in power automate..
If you look at my approval playlist, I have convered various scenarios and patterns and there are more coming - ruclips.net/p/PLTyFh-qDKAiFUGTtwSwFT79Y7_jq_Aipe
Give the collect signature style workflow a shot in flow with these patterns and see how it goes.
@reza Can we use this template for list instead of document library
Sure. Replace the list actions with file actions.
Hi Reza, How are you? Happy New Year!!!
I have created a state machine flow and then set the DO UNTIL limit [Count = 500 and Timeout = P30D].
After 30 days one task is penging, and count were only about 250+ (I have used the increament counter) and then flow sents the mutlple tasks becasue it not reach to 500.
Is that okay that I will remove the count limit and keep only 30days timeout?
Count limit drives how many times loop will run. 250+ times is itself very high. An approval workflows changing state 250 times seems weird.
After 30 days flow itself will time out. Tasks will continue to exist and users will be able to respond to it but the flow would have timed out and will not process.
@Reza Dorrani thank you so much for your reply and help,
Yes, it's weird. May I share the screenshot? It should be timeout.
Moreover, I have created a test flow and set count = 10 & Timeout = PT1M.
In this test flow count is working, but Timeout is not working.
@@hamytube I recommend posting issue with screenshots on forums powerusers.microsoft.com
Can u pls help out to trigger the approval flow for External user/guest user when updating or creating something in dynamics 365.
Is there any feasibility for guest user/external user approval flow to provide comments and to capture the approvers in the flow(without providing any license).
Guest user can participate in the approval process. They will require a license.
hi reza one question, when the status is need more information, the user will go and update the doc then upload it again, wont this be a confusion and the sharepoint will consider it as new doc and start the process from the beginning as a new doc and a new flow will start?
Yes it would be. If they just update the file within SharePoint, it will be fine. If they upload another document with same name, SharePoint replaces the file - delete then add. This would re-trigger the flow. You would have to add additional logic to handle those scenarios. (example: set flags, check version history etc.)
@@RezaDorrani ok makes sense now, thanks reza :)
If all of the department approve-users (in the department list) have a 'out of office' for the preset time-period (f.e.2days) how would you resolve this to add/replace replacement-users of a 2nd column from that department? Is there a video from it?
You can check for out of office using Outlook connector and accordingly handle time outs or reassign.
I do not have a video on this use case.
I will recommend you check on the forums at powerusers.microsoft.com/
@@RezaDorrani Tanks for the tip ... Actually, can I make an endless 'do until' loop with OutOfofFice escalation and then Time-out escalation and add substitutes to a variable 'VarDeptApprovers' every escalation and update history, until someone approves (like state machine) and I don't have to repeat the approval/update steps?
@@videobewerker111 Not sure about this one.
@@RezaDorrani My OOF (mail tips) work for 1 user(concat VarDepUsers) but with multi users (concat to variable vardepusers) i get a ErrorInvalidUser (must be perhaps a check 'one at the time' (loop?)
Where can i post pictures? flow community or flow groups?
@@videobewerker111 Flow community - powerusers.microsoft.com/
Hi Reza, Good work. This is a good and simple alternative to what Jon Levesque had done earlier with #DoctorFlow (Which is another good approach). I was just wondering if we can implement state machine in business process flows. What will be the pros/cons of that approach vs this approach? thoughts? please share.
Both approaches have the same end result.
My approach uses standard connectors and a single flow. All flow logic must be added to a single flow.
Serge's approach uses premium connectors and multiple flows. Approach is modular as it has multiple flows and hence logic can be distributed.
Is there any way to have the approver comment mandatory? or at least to control the approval email and look and feel :(
Currently, there is no control of email look and feel. Approvals is an out of the box action.
What happens if the approvals go over 30 days?
Great question. As mentioned in the description of this video, this process will work as long as the entire process ends in 30 daysZ
For scenarios related to long running processes (>30 days) - My next approval video will cover it :)
Hi Reza, I am recreating this flow but with only one approver and 3 custom responses: Approved, Rejected and Need more information. For the Do Until Switch case = Pending where Outcome = Approve, I'm setting the Status = Completed, but it seems it's not detected, so the loop doesn't stop. The Update action doesn't update anything in SP and I get a 2nd approval email (I'm both the requester and approver). Any idea what's happening?
Hmmmn
Your custom response should exactly match your condition.
If you have used “Approved” then check for outcome = “Approved” (case sensitive)
@@RezaDorrani I'm sure they match, see screenshots. I checked for spaces and even tried copy/paste. Probably youtube is not the best channel to raise this, could I post this on the Houston user group?
drive.google.com/file/d/1aU2mtN6gIVjMKPtEf6bUG5nMCicZSENv/view?usp=sharing
drive.google.com/file/d/1NNN8bKkjwdilF96bfQWLuxqKrWJRJWp_/view?usp=sharing
How does you do until loop condition look like
@@RezaDorrani Hi Reza, here is the screenshot of the Status variable and Do Until loop.
drive.google.com/file/d/1UOIm_RxNs-L9tktf8lHg3wqTcObKZIas/view?usp=sharing
drive.google.com/file/d/1jaolZuMSZ29h8LGUinh0e_HDWx_iC3Ga/view?usp=sharing
If I initialize the variable Status as Completed the Loop doesn't trigger, so it recognizes the value Completed. I'm not sure if the nested IF is the issue, I might try with a Switch instead.
I exported a copy of the flow if it helps:
drive.google.com/file/d/1twtf_8yscOSRWgTtRJeUFVqJTD1QMxc8/view?usp=sharing
Why always Sharepoint as datasource/backend not CDS
I agree. Reason I prefer to use SharePoint is because it is a standard connector, and hence more users can try it out in their own tenants.
CDS requires premium licensing. However, with the introduction of Oakdale, I will do more videos with CDS as the backend.
bit.ly/learnprojectoakdale - Check out the Oakdale related videos here.
How sad is my life that I'm only on minute 2:00 yet I can't wait til midnight so I can replicate this on my own tenant? These work tools are more like awesome toys... and to think I once hated SharePoint
:)
There is always a new day and a new beginning.
These tools are cool and easy to use once we understand the nuances around using them.
@@RezaDorrani well Reza your videos have certainly helped me turn my job into something really exciting. Chores are now challenges 💪
@@greg2kdotcom Thank you for such wonderful feedback. So happy to know that my videos are useful 😊
I’m feel the same, SharePoint was just that beast I couldn’t tame. I can’t say it out loud because of all the early hating, but I love it now!! And as for Rezza’s videos there is no better content on RUclips!
@@robofski Thank you Dan