Posts

Showing posts with the label Power Platform Power Automate Flows

Send emails to a SharePoint group using Power Automate.

Image
 The limitation of Power Automate is that it can't send emails to a SharePoint Group. Now if you ask t why, as even SharePoint Designer based workflow could do that? The answer is simple MS doesn't send it as SharePoint Group aren't associated with an email address.  However, the community and great minds have come up with various solutions from hardcoding the emails in variable to using GetItems actions to store the users emails in a SharePoint action. But when I was stuck at this problem, I wanted to read users from SharePoint Groups. Another problem with Power Automate is that MS keeps updating it. So you may find a blogpost related to the problem you are at but now there may be an easier way to fix it as MS may have added a new feature or functionality. So the solution below is also a hybrid of multiple solutions that i looked into. Step 1: What we are doing in here is initializing a string variable, we have named it as SharePointGroup. Step 2: Use the Send an HTTP requ...

Nesting Level limit in Power Automate.

Image
         In one of my Projects in which I was automating a SharePoint 2013 Stage workflow, I ran into a very interesting scenario, Flow starts to throw an exception that you have actually reached a limit for your nested structure and you can't create actions beyond it. This is really weird as in 2013 I never experienced this, but that may be because in 2013 we had a stage structure. To replicate the stage workflow we use a stage template. I have written another blog on how this is done. Please check it here for more info. So in our case we have 2 switch statements one for Phase and another for Status. Each having multiple options. But when you come down to these detail actions inside these status you sometime further need condition on a field. Like in my case i had my first level where in I check if the Threshold (Internal column) has value 199, then  But my third level comes in when i compare if my threshold has value 200 Each of yes and No state...

Replicating a SharePoint2013 Stage workflow in Power Automate.

Image
 This is an interesting scenario. Now after MS has deprecated SP 2010 workflows, i got a request for creating a SP 2010 workflow in Power Automate. However, on my analysis I found out that the 2010 workflow was triggered by a SharePoint 2013 workflow. This made it very interesting as now I had to not only replicate the 2010 workflow, but also its parent  2013 workflow.  Now to make matters worse 2013 workflow was a long workflow with multiple stages and each stage having separate switch statement for comparing the values of Status. Power automate has no feature in itself to implement Stage workflows. But it has a prebuilt template of State machine process. We can use this to achieve State machine workflow. What we have in this template is a Do Until loop having a Switch condition . What this means is status is evaluated till it becomes equal to Completed. So it goes from one Switch condition to another and loops out when it becomes equal to Completed. Caution : Be very pa...

The Switch Control issue : Power Automate

Image
 Today I ran into a unique scenario. I had to trigger emails on dropdown change of a field in my Power App.  Power Automate was the obvious choice but since i had 4-5 options in choice field i decided to use Switch control rather than the condition control. Switch control is an interesting control, it not only makes your flow short, but also more efficient. But there is a bug in the Power automate Switch control. Lets get into it. All you need to do is replace your column Name choice with the below Coalesce Function. coalesce(triggerBody()?['Stage']?['Value'],'Unknown') This will help you remove the bug in Switch control which otherwise will throw an exception like below. The execution of template action ‘Switch’ failed: The result of the evaluation of ‘scope’ action expression ‘@triggerBody()?[‘Choice’]?[‘Value’]’ is not valid. It is of type ‘Null’ but is expected to be a value of type ‘String, Integer’