Biggest pains in Power Automate development and solutions that solve them

Biggest pains in Power Automate development and solutions that solve them

Power Automate is a powerful platform that allows you to create workflows and automate tasks without writing code. However, as with any technology, it also comes with some challenges and pitfalls that can make your development experience frustrating or inefficient. In this article, we will explore some of the biggest pains in Power Automate development and suggest some solutions that can help you overcome them.

?

Pain 1: The service you connect to runs slowly

One of the main benefits of Power Automate is that it can connect to various services and applications, such as SharePoint, Outlook, Dynamics 365, and more. However, sometimes these services can run slowly or have performance issues, which can affect your flow execution time and reliability. For example, if you have a flow that triggers when a new item is added to a SharePoint list, but the SharePoint site is slow or down, your flow might not run at all or run with a delay.


Solution 1: Use parallel branches and timeouts

One way to deal with slow services is to use parallel branches and timeouts in your flow. Parallel branches allow you to run multiple actions at the same time, instead of waiting for one action to finish before starting the next one. This can improve your flow performance and reduce the impact of slow services. For example, if you have a flow that sends an email and updates a SharePoint item, you can use parallel branches to run these actions simultaneously, instead of sequentially.

?

Timeouts allow you to specify how long your flow should wait for an action to complete before moving on to the next one. This can prevent your flow from getting stuck or running for too long if a service is unresponsive or slow. For example, if you have a flow that calls an HTTP request to an external API, you can use a timeout to limit how long your flow should wait for a response, and handle the error accordingly.


To use parallel branches and timeouts, you can follow these steps:

  • In your flow, add a Control action and select Scope. This will create a container for your actions.
  • Rename the scope to something meaningful, such as "Send email and update SharePoint item".
  • Inside the scope, add the actions that you want to run in parallel, such as Send an email (V2) and Update item.
  • Click on the ellipsis (...) icon on the scope and select Configure run after.
  • In the Configure run after panel, select is successful and has timed out. This will ensure that your flow will continue to run even if one of the actions inside the scope fails or times out.
  • Click on the ellipsis (...) icon on the scope again and select Settings.
  • In the Settings panel, under Timeout, enter the duration that you want your flow to wait for the actions inside the scope to complete. You can use the format hh:mm:ss or dd.hh:mm:ss. For example, if you want your flow to wait for 5 minutes, you can enter 00:05:00.
  • Click Done to save your settings.

?

Pain 2: The connector you use slows down your flow as a service protection mechanism

Another pain point in Power Automate development is that some connectors can slow down your flow as a service protection mechanism. This means that the connector will limit the number or frequency of requests that your flow can make to the service, to prevent overloading or abusing the service. For example, the SharePoint connector has a limit of 600 requests per minute per connection. If your flow exceeds this limit, the connector will throttle your requests and cause your flow to run slower or fail.

?

Solution 2: Use pagination and batching

One way to deal with connector throttling is to use pagination and batching in your flow. Pagination allows you to retrieve data from a service in smaller chunks, instead of getting all the data at once. This can reduce the number of requests that your flow makes to the service and avoid hitting the limit. Batching allows you to send data to a service in larger chunks, instead of sending each item individually. This can increase the efficiency of your requests and reduce the number of requests that your flow makes to the service.


To use pagination and batching, you can follow these steps:

  • In your flow, add a Get items action to retrieve data from a SharePoint list.
  • Click on the ellipsis (...) icon on the action and select Settings.
  • In the Settings panel, under Pagination, turn on the Enable pagination toggle.
  • Enter the Threshold value that you want your flow to use for pagination. This is the maximum number of items that your flow will retrieve in each request. For example, if you enter 100, your flow will retrieve 100 items at a time from the SharePoint list, until it gets all the items or reaches the limit of 5000 items.
  • Click Done to save your settings.
  • Add a Create CSV table action to convert the data from the SharePoint list into a CSV format.
  • Add a Create file action to create a CSV file in OneDrive with the data from the SharePoint list.
  • Add a Delete file action to delete the CSV file from OneDrive after you are done with it.
  • Add a Send an email (V2) action to send the CSV file as an attachment to someone.
  • Click on the ellipsis (...) icon on the action and select Settings.
  • In the Settings panel, under Attachments, turn on the Enable batching toggle.
  • Enter the Batch size value that you want your flow to use for batching. This is the maximum number of attachments that your flow will send in each email. For example, if you enter 10, your flow will send 10 attachments at a time in each email, until it sends all the attachments or reaches the limit of 150 attachments.
  • - Click Done to save your settings.

?

Pain 3: Your flow executes more actions than the daily limits for your plan

The last pain point that we will discuss is that your flow might execute more actions than the daily limits for your plan. Power Automate has different plans and pricing tiers, each with different limits on the number of actions that your flow can execute per day. For example, the free plan has a limit of 750 actions per day, while the per user plan has a limit of 5000 actions per day?. If your flow exceeds the limit, it will stop running and you will get an error message.

?

Solution 3: Optimize your flow design and logic?

One way to deal with action limits is to optimize your flow design and logic, so that your flow can run more efficiently and use fewer actions. Here are some tips and tricks that you can use to optimize your flow:


  • Use filters and conditions to limit the number of items or records that your flow processes. For example, if you have a flow that triggers when a new item is added to a SharePoint list, but you only want to process the items that meet certain criteria, you can use a Filter array action to filter out the items that do not match the criteria, and then use a Apply to each loop to process the filtered items. This way, you can reduce the number of actions that your flow executes for each item.
  • Use expressions and variables to perform calculations or transformations on your data, instead of using actions. For example, if you have a flow that gets the current date and time, and then formats it in a specific way, you can use an expression to do both steps in one action, instead of using two actions. For example, you can use the expression formatDateTime(utcNow(),'yyyy-MM-dd HH:mm:ss') to get the current date and time in UTC and format it in the yyyy-MM-dd HH:mm:ss format. You can also use variables to store and reuse your data, instead of using actions to get or set the data multiple times.
  • Use scopes and run after settings to group and control your actions. For example, if you have a flow that has multiple branches or paths, you can use scopes to group the actions that belong to each branch or path, and then use run after settings to specify when each scope should run. This way, you can avoid running unnecessary actions or handle errors gracefully. For example, if you have a flow that sends an email and updates a SharePoint item, you can use scopes to group these actions, and then use run after settings to make sure that the update action only runs if the email action is successful, and vice versa.

?

Summary

Power Automate is a great tool for automating your tasks and workflows, but it also has some challenges and limitations that you need to be aware of and deal with. In this article, we discussed some of the biggest pains in Power Automate development and suggested some solutions that can help you overcome them. We hope that these tips and tricks will help you improve your Power Automate development experience and create more efficient and reliable flows.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了