Select values from an array using Select action in a Power Automate Flow

In case want to pick a value from the attribute from an array or array of objects, here’s how you can do it.

Scenario

Let’s look at the below array of objects –

  1. Here’s sample data in a variable where there are 2 objects in an array.
    And we want to retrieve the value of the attributes called as “LogicalName


Select action in Data Operations

In order to fulfil this, let’s look at the Select action in Power Automate –

  1. In Data Operations, you’ll find Select operator

  2. When you choose Select, it’ll ask for the source of data, in this example – it’ll be the variable where we have Array of Objects.

  3. Now, you can choose what the resultant attribute should be called. You can enter custom name here.
    In this example, I want to call it “Name of Entity

  4. Now, in the Enter Value part, you must select the Logical Name attribute. So, you can use item() function to pick the value. Here’s how you use it –

  5. Once completed, your Select action will look something like this and you are ready to test.

  6. And when you run this test, here’s the result you’ll get –
    You’ll pick all the values in each of the “Name of the Entity” attribute in this array.

Array vs Object

  1. In case you have just a single Object and not an array, you still need to use an Array.
    Let’s say you choose Object type. The Flow will let you save.

  2. But, at runtime, it’ll throw the below error –
    “The ‘from’ property value in the ‘select’ action inputs is of type ‘Object’. The value must be an array.”


    So, the workaround is to store this in an Array itself and keep the type to Array.


Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Access elements from Array variable in Power Automate

In case you are looking on how to access a particular value based on the index, here’s how you do it.

Array

Here’s an example Array –

  1. Let’s say you have an Array variable declared which has 3 values –

  2. And if you want to access the second element, ‘B’.
    Then, here’s how you read the same in another variable (or any other place for that matter)
    variables(‘nameOfTheVariable’)[index]

  3. Since at Index 1, letter “B” is present, the result will be as below –

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Users cannot create Flows in Power Automate | Environment Maker permissions

If you are someone who has been asked to create Flows in Power Automate, and you go to Power Automate portal (https://make.powerautomate.com/) to make your first Flow in your environment, you may come across this if you are not an Administrator yet –

The error message would say -“You are not permitted to make flows in this ‘<EnvironmentName>’. Please switch to the default environment, or to one of your own environment(s), where you have maker permissions.

Now, let’s see what the issue is about.

Environment Maker Permissions

As a Power Platform Administrator yourself, you’ll need to provide Environment Maker privileges (Security Role) to the affected User in your environment –

  1. Navigate to the the Settings for the Environment in PPAC (https://admin.powerplatform.microsoft.com/)
    And look for Security Roles in Access area –

  2. Look for the Environment Maker role.

  3. When in Environment Maker role, look for the Add People button on the top.

  4. Now, search for the user who should have the Environment Maker permissions and click Add (which will be at the bottom of the pane).

  5. Now, you’ll see that this user is added.

  6. Now, when the User will refresh the Flow Editor, they’ll no longer see the error message and will be able to create/save Flows.

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Identify entities with same names in Dataverse Power Automate connector | [Quick Tip]

Often times, while using Power Automate with Dataverse, you may have come across scenarios where it was difficult to identify the entities with same names.

Scenario

When trying to pick entities with same names, like Attachments, so we don’t need to guess when you can confirm.

Peek Code

So, you can use Peek Code to take a look at the entity name i.e. the backend name of the entity which you have picked –

  1. Click on the 3 dots on the action, and select Peek Code.

  2. And as you can see, you can identify which entity is selected with the same name. You’ll need to know the correct backend name which you intend to select.
    activitymimeattachments

    attachments

I also suggest this is useful when picking other options elsewhere. Do let me know in the comments below as to where all you applied this. 😊

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Flows stuck in Waiting state | Concurrency control and Degree of Parallelism in a Power Automate

In case you are using Flows that triggers frequently and have steps in them your Flows to wait for a response, like Approvals.

Scenario

Let’s say you have Flows which use Approvals – These need to wait till the recipients respond to the Approval on their Emails

  1. The Flow which is waiting for an Approval response will be in Running state

  2. And if you open them, you’ll see this –

  3. And that makes the other Flow runs after that “Waiting” to even start.

  4. And that’s because the Flow trigger has something called as Concurrency turned on and has a certain Degree of Parallelism set which we’ll see in the section below.

Concurrency Control and Degree of Parallelism

The reason the other Flow runs were waiting because the Flow Trigger had the Concurrency control turned ON and the Degree of Parallelism set to a certain number between 1 to 100

  1. Open settings on the Flow trigger.

  2. You’ll find that the Concurrency is turn ON. And the Degree of Parallelism is set to a certain number.
    The number set is the count of Flow Runs that are allowed to Run at once and others will be waiting.
    In this case, only 1 Flow Run was allowed. Hence, the others were waiting.


  3. You can now try to turn this off.

  4. Now, when you try to turn this OFF and then save the Flow, you’ll see this error message –
    Flow save failed with code ‘CannotDisableTriggerConcurrency’ and message ‘The trigger ‘When_a_row_is_added,_modified_or_deleted’ of current version of workflow ‘fd33f44a-d6ad-4f06-bbf8-a693b316fa31′ has concurrency runtime configuration specified. Trigger concurrency runtime configuration cannot be removed once specified.’

  5. Hence, this has to be taken care at the beginning when you start designing your Flow. Or, you can use Undo to revert till the step when you turned this ON.

  6. When Concurrency control is turned off, Flow runs can continue to run in parallel without limitations or dependency on other Flow runs.

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Do Until action in Power Automate

Let’s look at what Do Until Action does in Control connector in Power Automate. In case you are a newbie or have used Power Automate till now to some extent, hopefully you find this post useful and easy to understand.

Explanation

Do Until will run iterations till the condition value is False. Once the value becomes True, it will break out of the loop.

Do Until

Here’s what the Do Until action will do –

  1. If you search for Control connector or the Do Until action itself, you’ll see this.

  2. Now, let’s see what the control parameters are and how we can use the condition to define how the Do Until will run.
    Explanation: We have a variable Text Input with value “A“.
    And, we want to run the Loop in Do Until till the value of Text Input becomes “A“.

    However, if the first iteration of the Do Until itself has Text Input = A, it will still run 1 iteration and then break out of the loop and not skip the loop right away.

  3. Now, in the body of the loop, I’m setting the value of the same variable “Text Input” = “B”.


    Here, the result will be the loop will outrun the maximum no. of iterations because the condition of Text Input = “A” was never true except for the first iteration as mentioned in #2 above.

    I’ll explain in the next section why it ran for 60 iterations.

  4. And, if we set the Text Input = “A” in the body of the loop, the first iteration will run and in the next iteration, it Text Input = “A” will be true and hence, break out of the loop and not execute any further.


    So as mentioned above, the 1st iteration will run and the next iteration will detect the true value and exit out of the loop since the loop was supposed to Run till the value of Text Input = “A


    Now, let’s look at why the iteration ran a certain number of times.

Change Limits

As you noticed by now, there’s a section called as Change Limits in the Do Until connector, let’s see what parameters can be set.

  1. Once you expand the Change limits section, you’ll see 2 parameters – Count and Timeout.

  2. Count will be the maximum count the iterations should run in case the value never becomes true.
  3. Timeout will take the time duration of how much time the loop should continue to run mentioned in https://en.wikipedia.org/wiki/ISO_8601 (ISO 8601 format).
  4. At least 1 property is mandatory for you to execute Do Until.

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Showing Sandbox or Non Production Apps in Power App mobile app
  2. Create a Power Apps Per User Plan Trial | Dataverse environment
  3. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  4. Co-presence in Power Automate | Multiple users working on a Flow
  5. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  6. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  7. Call a Flow from Canvas Power App and get back response | Power Platform\
  8. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  9. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  10. Asynchronous HTTP Response from a Flow | Power Automate
  11. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  12. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Enable Power Automate Pane in Canvas Apps Studio | Preview

Now, you can start creating Flows from within the Power Apps itself and add Power Automate as a Pane on the left hand navigation.

Let’s check out how –

Enable Power Automate Pane

In the App Studio, here’s how you can turn on the Power Automate pane –

  1. In the App Studio, you can see the Settings button, clicking on which will open up the Settings area.
    Go to Upcoming Features tab and look at the Preview section since this feature is still in Preview.

    You’ll find the Enable Power Automate pane option turned off by default.

  2. Before you turn it on, you’ll see the left hand menu doesn’t have a Power Automate icon/section added already.

  3. And when you Turn it On, you’ll see the Power Automate section added.

  4. Now, when you expand it, it appears like you can create a Flow from here.

  5. When you click on Create new Flow, you’ll get the option to start creating from a Template or create a new one like you usually do in Power Automate app itself.

  6. I clicked on Create from blank in the above step, you’ll then get the Flow editor right there and PowerApps as the trigger since this will be triggered from your Canvas Power Apps.

  7. Now, you can continue to build you Flow and once done, it’ll be available in the list to be used.

  8. And you can then use this Flow as per requirement.

Existing vs New Method

Let’s see the subtle difference between the existing and the new method -1

  1. Once you enable this, you’ll find 2 Power Automate buttons (Perhaps this will change in the near future)
    Once will open the new pane and the other existing one will open in the old way in context of the Screen being used.

  2. Additionally, the existing method will open the Power Automate portal itself in the new tab as opposed to opening the Flow in the Canvas Apps Studio itself.

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Showing Sandbox or Non Production Apps in Power App mobile app
  2. Create a Power Apps Per User Plan Trial | Dataverse environment
  3. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  4. Co-presence in Power Automate | Multiple users working on a Flow
  5. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  6. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  7. Call a Flow from Canvas Power App and get back response | Power Platform\
  8. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  9. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  10. Asynchronous HTTP Response from a Flow | Power Automate
  11. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  12. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Retrieve day number from a Week, Month and Year & day name in Power Automate

At times, while working in Power Automate, you might only want to retrieve the number of Day / Month / Year / Time etc from the DateTime. Or even just the name of the day, given the date.

Here’s a set of functions in Power Automate you can use already!

Day number functions in a Flow

Let’s look at a few examples on how you can retrieve parts of a DateTime –

  1. Let’s use a String variable to store all this content in an on-demand Flow.

  2. And in the Expressions section, look for the day functions.

    dayOfMonth()
    dayOfWeek()
    dayOfYear()


    All three functions take a DateTime timestamp


  3. Example, for simplicity, I’m only considering utcNow() function to refer to the current DateTime instead of using a DateTime variable.
    So, I’ll first use dayOfMonth() function

  4. And this gives me the day # of the Month which is equal to the Date itself.

  5. dayOfWeek will give me 0 for Sunday, 6 for Saturday.



    Since the day of writing this post is a Sunday, it will give me 0.

  6. And dayOfYear() will give me the day number of the year.


    And today is Day 72 of the year.


    First day of the Year starts with 1. You can use the below function to check the first day of the year in dayOfYear() and it will return 1.

  7. And the result is as below –




  8. I also have a previous version of this post as well which you can refer here – FormatDateTime function in a Flow | Power Automate

Name of the Day

If you want to simply retrieve the Name of the day, you can get it using FormatDateTime function –

  1. So, in other context, I simply used FormatDateTime() function.

  2. And got the below answer –


    You can find complete reference of the DateTime formats used in Power Automate in Microsoft’s official post here – https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings?WT.mc_id=DX-MVP-5003911

Hope this was useful!
Here are some more Power Automate posts you might want to check –

  1. Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center
  2. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  3. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  4. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  5. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  6. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  7. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  8. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  9. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  10. Call Azure Function from Dynamics 365 CRM using Webhooks
  11. Show Ribbon button only on record selection in Dynamics CRM
  12. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!

Analytics of a Flow in Power Automate

Let’s understand how you can look at a Flow and check the Analytics it generates as the Flow is being used.

The maximum Analytics generated for a Flow is 30 days and not beyond that at this point. This might change in the future.

Analytics on Flow

Open a Flow in Power Automate and let’s see how we can access the Analytics of a Flow –

  1. When inside a Flow, you’ll see and Analytics button in the menu.

  2. Or even if you are in the list to view all the Flows, you’ll see them like this –


  3. In the Analytics Page, you’ll find a first tab you’ll find is a Actions tab which loads a PowerBI Report load and show something which is called as AggregationDateMakerDailyActions and BillableActionsMakerDailyActions which show the total Actions being executed per Flow run on a daily basis.

    I know this might be a little overwhelming, hence, here’s a reference Document to understand the same –
    Introducing action analytics in Power Automate – https://powerautomate.microsoft.com/en-us/blog/introduction-action-usage-analytics-in-power-automate/?WT.mc_id=DX-MVP-5003911

    And here’s a Microsoft Doc on understanding Request Limits and allocations – https://docs.microsoft.com/en-us/power-platform/admin/api-request-limits-allocations?WT.mc_id=DX-MVP-5003911

    Please note that the maximum range you can go back to get this data is 30 Days!



    Let’s look at the other 2 tabs –

Usage

Under the Usage tab, you’ll see how many Flow Runs were Successful vs Failures [Example taken from another Flow since I had to capture some failures too 😊]

Errors

In the Errors tab, you’ll see which all Flow Runs failed on what types or Errors. This is helpful in understanding the different issues the Flow needs to be addressed for –

  1. Below is how you’ll see the different types of Errors all the Flow Runs are divided amongst.

  2. And if you see the list of Failures, you’ll see that there is a hyperlink to each of the Flow Run itself.

  3. Clicking on these, they take you to the actual Flow Run itself.

Hope this was useful!
Here are some more Power Automate posts you might want to check –

  1. Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center
  2. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  3. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  4. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  5. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  6. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  7. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  8. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  9. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  10. Call Azure Function from Dynamics 365 CRM using Webhooks
  11. Show Ribbon button only on record selection in Dynamics CRM
  12. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!

Toggle Experimental Features in Power Automate | Quick Tip

If you are working in Power Automate, you might want to check if you are already using the Experimental Features or not.

Here’s how you check and toggle between turned on and off.
Also, please note that it is not recommended to use Experimental Features on a Production instance. Please use Experimental Features only for Sandbox environments.

Experimental Features

Here’s how you can turn Experimental Features On or Off.

  1. While making Flows, you can click on the Gear Icon to go into Settings on the top right corner.

  2. When you click on it, you’ll see the dialog box where the Experimental Features could either be already turned on or off.

  3. And that’s it. You can just save and this dialog box will be closed.

Identify Experimental Feature Turned On/Off

In order to identify how the Experimental Features are turned on or now, here’s what you check –

  1. When turned OFF, the Dynamic Content will load on the right hand side as it always used to from the start.

  2. And when turned ON, the buttons to choose either the Dynamic Content or the Expressions will show when clicked on a field in a Step. And then you can choose either to show the menu.


    And the menu will look like this upon clicking –

Here’s official Microsoft Documentation on Experimental Features – https://docs.microsoft.com/en-us/power-automate/experimental-features?WT.mc_id=DX-MVP-5003911

Hope this was useful!
Here are some more Power Automate posts you might want to check –

  1. Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center
  2. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  3. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  4. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  5. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  6. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  7. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  8. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  9. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  10. Call Azure Function from Dynamics 365 CRM using Webhooks
  11. Show Ribbon button only on record selection in Dynamics CRM
  12. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!