Flow Error – It hasn’t been triggered successfully in the last 28 days (Power Automate / Dataverse)


For one of our flows while testing we realized it was not getting triggered.

We could see it giving below error –

There’s a problem that needs to be fixed to trigger this flow – It hasn’t been triggered successfully in the last 28 days.

A screenshot of a computer

Description automatically generated

We tried a couple of things and I think either switching it on and off and/or updating the trigger condition and saving it temporarily seems to have fixed the issue. Either of these would have created the correct corresponding Callback registration records.

Also check – https://nishantrana.me/2023/08/08/fixed-power-automate-flow-not-getting-triggered/

https://powerusers.microsoft.com/t5/General-Power-Automate/There-s-a-problem-that-needs-to-be-fixed-to-trigger-this-flow-It/td-p/1128820

Hope it helps..

Advertisements

Use Filter Array action to remove values from an array variable – Power Automate


Suppose we have below array variable – varTestVariable having a list of GUIDs in it.

A screenshot of a computer

Description automatically generated

And we have another array variable varWorkOrderGuidToBeRemoved which has the list of GUIDs we want to remove from our first variable varTestVariable

A screenshot of a computer

Description automatically generated

For this, we can make use of the Filter array action

A screenshot of a computer

Description automatically generated

In From, first we have specified the array variable from which we want to remove the values, followed by the variable that holds the values to be removed. Next, we have specified the “does not contain” operator and finally specified the item()

We can also click on Edit in advanced mode to see or edit the expression.

We can use the Body of the Filter array action that will hold the result in subsequent actions.

A screenshot of a computer

Description automatically generated

On running the flow, we can see that the values that existed in the second array variable were removed from the first array variable.

A screenshot of a computer

Description automatically generated

Get more details – https://www.damobird365.com/efficien-union-except-and-intersect-great-method/

Hope it helps..

Advertisements

Versioning and Drafts for Solution-based Cloud Flows – Power Automate


We now have the version support for Cloud Flows in Power Automate.

This feature is only available in the new editor.

Let us start by creating a simple flow, the creation part will happen in the existing editor.

A screenshot of a computer

Description automatically generated

Let us save the flow, and select Edit >> Details in a new tab to open it in the new designer inside Power Automate Maker Portal

A screenshot of a computer
Description automatically generated
We can see the below different commands in the new designer

  • Version History
  • Save Draft
  • Publish

Below we have made changes to the flow and clicked on Save Draft.

Clicking on Save Draft changes the flow to Draft and shows the message “We saved your draft flow. You can test and run it after you publish

From the Version History, we can see the Latest Version, Published Version, and the Past Published version, with the option to Restore it.

A screenshot of a computer

Description automatically generated

We can save a draft of a flow even with errors now.

A screenshot of a computer

Description automatically generated

Check for more details – Draft and Versioning for Cloud Flows

Hope it helps..

Advertisements

What will happen on changing the password of the user account used as the Owner of Cloud Flow and for Connection – Power Automate


Recently we had to change the password of the user account being used as an owner of the cloud flows as well as the used for connection/connection reference.

So we tried it on a trial environment first, below is our flow that runs every 5 minutes and creates a contact record (Dataverse), sends an email (Office 365 Outlook), and creates a file (SharePoint) owned by the same account along with the connection reference.

Below is our cloud flow

We can see the details around Connection References and Owner. We can also see it running successfully getting triggered after every 5 minutes.

A screenshot of a computer

Description automatically generated

Now let us update the password of the account that is being used in the flow.

Interestingly after password change our Flow kept running successfully without any errors.

A screenshot of a computer

Description automatically generated

Contact records are created in the Dataverse.

Mail sent using the Send an email action.

A screenshot of a computer

Description automatically generated

Files getting uploaded using the Create file action of SharePoint.

A screenshot of a computer

Description automatically generated

Also, we see the status of the connections showing as Connected.

It could be because Power Automate might be using cached credentials for a certain period after the password change, and/or the connections that use the refresh tokens to maintain authentication, have their tokens still valid.

https://www.itaintboring.com/powerapps/why-is-that-flow-still-working-after-i-have-changed-my-password/

Here what we can do immediately after changing the password is open the connections and click on Switch Account, sign in again using that account. That will referesh the connection.

That is exactly what we did for our Prod and other environments after we updated the password and we didn’t face connection failed issues or any other error for all our exiting flows.

A screenshot of a phone

Description automatically generated

Also, check – https://sharepoint.stackexchange.com/questions/290700/what-will-happen-to-the-ms-flow-connectors-if-their-usernames-password-got-reset

Using Service Principal in Power Automate – https://benediktbergmann.eu/2022/01/04/setup-a-service-principal-in-power-automate/

https://www.dynamicpeople.nl/en/news/service-principals-power-automate/

Hope it helps..

Advertisements

Using Union function to remove duplicates – Power Automate / Dataverse


We recently got the below error in one of our cloud flows, the requirement was to fetch the distinct work orders that have notes with attachments associated with them.

A resource of type ‘Microsoft.Dynamics.CRM.annotation’ was found in a resource set that otherwise has entries of type Microsoft.Dynamics.CRM.msdyn_workorder’. In OData, all entries in a resource set must have a common base type.

This occurs if we try using the aggeration in the Fetch XML queries in the List rows action.

The solution was to rewrite the fetch xml query without using aggregation.

And then next if we want to get the distinct values, we can use the Union function for that.

Here,

we are first adding the GUIDs to the varLstWorkOrderGUID array variable using Append to array variable action

And then applying the Union function – to remove the duplicate from the array.

union(variables(‘varLstWorkOrderGUID’), variables(‘varLstWorkOrderGUID’))

The result –

More on Fetch XML Query

Hope it helps..

Advertisements

Fixed- The XRM workflow table row could not be found error (Power Automate)


Recently while trying to open one of our cloud flows we got the below error.

Error: The XRM workflow table row could not be found.

Inside the Power Automate maker portal for the new designer, we got the below error

We could see our flows were in the OFF status.

We switched ON the flows, and this fixed the issue for us.

We were able to edit our flow then.

As we recently restored the environment (was deleted), because of which the corresponding ‘Callback Registration’ records might be incorrect or missing. So enabling the flows would have created new entries in the Callback registration records for our flows, which fixed the error.

Please refer- https://rajeevpentyala.com/2021/01/30/callback-registration-expander-system-jobs-waiting-for-resources/

Hope it helps..

Advertisements