Power Automate VS Logic Apps. Power Automate Cases

Good day to all! In a previous article on learning Power Automate and Logic Apps, we've covered the main differences between Power Automate and Logic Apps. Today I would like to go further and show interesting possibilities that can be realized with the help of these products. In this article, we will look at several use cases that can be implemented using Power Automate.

Microsoft PowerAutomate

This product provides a wide range of connectors to various services, as well as triggers for automatic and instant launch of flows, due to the occurrence of a specific event. It also supports running threads on a schedule or on a button.

1. Automatic registration of requests

One of the cases may be the implementation of automatic registration of hits. The flow trigger, in this case, will be the receipt of a mail notification to a specific mailbox, after which further logic is processed:
Power Automate VS Logic Apps. Power Automate Cases


When setting up a "When a new email arrives" trigger, you can use various filters to determine the required event for the trigger to start:

Power Automate VS Logic Apps. Power Automate Cases

For example, you can run the flow only on emails with attachments or on emails that have the highest importance. It is also possible to launch a flow if the letter has arrived in a certain folder of the mailbox. In addition, it is possible to filter messages by the desired substring in the subject line.
After the necessary calculations have been made and all the necessary information has been obtained, you can create an item in the SharePoint list using substitutions from other actions:

Power Automate VS Logic Apps. Power Automate Cases

Using such a flow, you can easily pick up the necessary mail notifications, parse them into components and create records in other systems.

2. Starting the approval flow on a button from PowerApps

One of the standard scenarios is to send the object for approval to the approving persons. To implement a similar scenario, you can make a button in PowerApps and, when you click on it, start a Power Automate flow:

Power Automate VS Logic Apps. Power Automate Cases

As you can see, in this thread, the starting trigger is PowerApps. A distinctive feature of this trigger is that you can request information from PowerApps while inside the Power Automate flow:

Power Automate VS Logic Apps. Power Automate Cases

It works like this: when you need to get some information from PowerApps, you click on the “Ask in PowerApps” item. After that, a variable is created that can be used in all activities of this Power Automate flow. It remains only when starting the flow from PowerApps to pass the value for this variable inside the flow.

3. Starting a stream using an HTTP request

The third case I would like to talk about is launching a Power Automate stream using an HTTP request. In some cases, especially for various integration stories, it is necessary to launch a Power Automate flow via an HTTP request, passing various parameters inside the flow. This is done quite simply. As a trigger, the action "On receipt of an HTTP request" HTTP is used:

Power Automate VS Logic Apps. Power Automate Cases

The HTTP POST URL is generated automatically the first time the stream is saved. It is to this address that you need to send a POST request to start this stream. Various information can be passed as parameters at startup, for example, in this case, the SharePointID attribute is passed from outside. In order to create such an input scheme, you need to click on the item “Use an example payload to create a scheme”, and then insert an example of JSON which will be sent to the stream:

Power Automate VS Logic Apps. Power Automate Cases

After clicking on "Finish", a JSON schema of the request text for this action is generated. The SharePointID attribute can now be used as a placeholder in all actions in this flow:

Power Automate VS Logic Apps. Power Automate Cases

It is worth noting that the “When receiving an HTTP request” trigger is included in the Premium connectors section and is available only when purchasing a separate plan for this product.

In the next article, we will talk about various use cases that can be implemented using Logic Apps.

Source: habr.com

Add a comment