Posts

Showing posts from September, 2022

Back to Basics - Manage Connections in PowerApps

Image
Power automate flows uses connections to access the data. SharePoint, SQL, OneDrive for Business, Salesforce, Titter are some of the connectors in flows. So when we create a connection PowerApps, it will share in flows. It will be shared vice versa. We can add a connection using the steps below. Click on Data -> Connections Select New Connection Select the Connector and click on “+” icon to add new connection We can have two type of Connection On-Premise Gate way Cloud services Here Cloud Services can be used directly by authenticating the account. But the user should have proper permissions to use the cloud services. For On-Premise gateway, we need to configure the authentication type, username, password and gateway as below. Sometimes there will be expiry in the authentication. For that we need to re-authenticate the connection by clicking on Fix connection as below

Power Automate - Error While Converting String to Number

Image
While working with flow, i had a requirement to convert string to Integer. Here i have two items, on is Direct Integer and another on i am getting from SharePoint List. I have created an action to set the variable directly, but it was not worked by setting the value to a variable. I got an error by setting the the variable. For that i have created a compose action and converted the value to integer as shown the steps below. in the compose action i have added the formulae as int(string Value). After that i have set the value to a variable as shown below. Hope this helps. 

Power Automate - PowerApps for Admin

Image
PowerApps for Admin will help as  Power Apps Management Connector for Administrators. We will have multiple options with the action in the Power Automate as URL below. https://docs.microsoft.com/en-us/connectors/powerappsforadmins/ I have used Power Automate for Admin and Used Get App Role as admin to get all the users to get the details we need to pass the App ID from the Power Apps and return the details from the action. We need to pass following parameters to the action.  Environment Name -  Name field of the Environment. Power App Name -  Name field of the Power App. We will get following results from the action. value - Array of the Permisions Name -  PowerApp Role Assignment name  id - PowerApp Role Assignment ID type - PowerApp Role Assignment typ roleName - PowerApp Role Assignment roleName. id -PowerApp Role Assignment principal object ID. displayName - PowerApp Role Assignment principal displayName. email - PowerApp...

Update SharePoint Folder name using Power Automate

Image
We can rename the SharePoint folder using Power automate. We can update the SharePoint document library folder using the steps below. On Power Automate, add new Action, Send HTTP request, In the Send HTTP request, we can pass details as below, Site Address:  <<SharePoint Site Address>> Method:  "POST" Uri:  "_api/web/GetFolderByServerRelativeUrl('Shared Documents/ <<OLD Folder Name>> ')/ListItemAllFields" Headers :  If-Match: * X-HTTP-Method: MERGE Accept: Application/json;odata-verbose Body : {               "Title": " <<NEW FOLDER NAME TO BE UPDATED>> ",               "FileLeafRef": " <<NEW FOLDER NAME TO BE UPDATED>> "             }  

Error message: Unknown error. Server response: Exception in Scrub sensitive database.

Image
While working on SharePoint integration with PowerApps, I got this error message for one of the user. After investigating the error following are few reasons for the errors, User might not have the read access to the data (i.e when we try to load the collections from SharePoint List to a collection on App Load or Screen Visible function). User may lost access or user not having access to the site/list/item that they are trying to update. There might be document locked on other users (while updating the document properties.). There might be issues with the data connections. We need to make sure user have the access to all the connection specially Load data or patch data connection. I have added a custom message using Notify function. I have got the issue as user access got removed for the list. After updating user permission issue got resolved.

Restore deleted flow using PowerShell

Image
 Sometimes we may delete flows accidentally/intentionally and later realize the need of the flow. For that cases, we can We can restore deleted flow using PowerShell commands. We can restore the deleted flows using the commands below. Open Windows PowerShell Install latest PowerShell commands on the link below. - https://www.powershellgallery.com/packages/Microsoft.PowerApps.Administration.PowerShell/2.0.147 Sign-in to PowerApps using the command below and enter credentials Get admin flows using the command below. Here -IncludeDeleted $true will allows to get the latest flows. Get-AdminFlow -EnvironmentName Default-687f51c3-0c5d-4905-84f8-97c683a5b9d1 -IncludeDeleted $true Here Default-XXXXX is the environment ID We can filter the flows with name as well using the Get-AdminFlow Testing -EnvironmentName Default-687f51c3-0c5d-4905-84f8-97c683a5b9d1 -IncludeDeleted $true Restore the selected flow using the Restore commands as below. Restore-Admi...

Back to Basics – Trigger flows on a schedule

Image
We can create flows to trigger on a specific time in a day or hour or time we can specify using Schedule trigger option. We can create scheduled flow using the steps below, We can have the option to create the time and recurrence while creating the flow Once we create the flow we can have the trigger option in the flow. In the recurrence, we can mention recurrence the recurrence and time zone and Start time by selecting the Advanced Options In the frequency we can have the options Second, Min, Hour, Day , Week   and Month as below We can choose the Time Zone. Based on the location to trigger based on the location.  Based on the selection types (Seconds, Mins, Hours, Days, Week, Months) we can have the options as below.

Power Automate – Secret value to save passwords

Image
To store confidential values in Power Automate, we can use Sensitive Text inputs. We can configure the sensitive content using the steps below. Got top right three dots Click on Settings Turn On Sensitive Input and Sensitive Output an clock on Done. We can use this in the Secret in the next action as below. This will enable the flow not to show the secret value in logs.

Check Property Exits or not in Power Automate with different types

To check the value exists in different types we can use Expression in Power Automate. Following are different types of validations. If the type is string, array or object we can use expression below, if(empty(triggerOutputs()?['body/ DataField ']),null,triggerOutputs()?['body/ DataField ']) If the type is different type than string, array, if(empty(string(triggerOutputs()?['body/ DataField '])),null,triggerOutputs()?['body/ DataField ']) If the type is string, array or object we can use expression below, if(empty(triggerOutputs()?['body/ DataField _value']),null,concat(' DataField (',triggerOutputs()?['body/ DataField _value'],')'))

Power Automate - Manfully Trigger multiple flows

Image
 I had a requirement to run multiple failed flow as there was some issue with one of the action. I have corrected the action and client wanted to run the failed ones to get the results as expected with them. There is an option to run the failed flows and run them again in the bulk. We can re-trigger the flow in bulk by navigating to the flow and clicking on All Flows. Select the Failed flows and Click on On Resubmit the Flows as below.   This will run all the selected flow(s).