The integrations between Power Automate and Power Apps are exceptional, and you can trigger Flows from Power Apps easily. You can even provide information from and to Power Apps. All of this thanks for the “PowerApps” trigger.

It’s probably my OCD and I admit it but I really wished that Microsoft’s team would change to add a space in the title. The official name is “Power Apps” and not “PowerApps”. You can complain in the comments if you want 😀.

Let’s check how to use it.

Where to find it?

To find it, you can search for the “PowerApps” trigger.

Here’s what it looks like.

Pro Tip:
Power Automate tends to save the most common triggers in the main screen, so check there before going trough the full hierarchy. Also you can use the search to quickly find it.

The “PowerApps” trigger is so simple that there’s nothing necessary to configure.

Usage

Let’s check a real example to make things clear. I have a Power App to control the ideas and state of the articles that I publish here. I have a button on my Power App that creates the folder structure to edit the images and store the information related to the article.

Let’s break things into two parts:

  1. The Power App and how to call it.
  2. The Power Automate and what we get.

How to trigger it on Power Apps

To make things easier, I recommend creating a simple Flow that has the “PowerApps” trigger and any other action. Then, the idea is to save it and have a name to give it. In my case, I call it “Create folder structure”.

Now on Power Apps you can call the Flow like this:

A few things to keep in mind:

  1. The name of the Flow may contain spaces, but Power Apps will show it without spaces.
  2. You can provide parameters that you want to send to your Flow.
  3. You don’t need to define them before on your Flow. Notice that the “PowerApp” trigger doesn’t have configuration, so the Power Platform deals with all this complexity for you.
  4. Don’t forget to select the button. You’re editing the “OnSelect” action by setting it, so what happens when you click it.

If you get an error, don’t stress. It means that you need to tell Power Apps where is your Flow. To do that, select the button > “Action”> “Power Automate”.

Power App will show you a list of the available Flows.

After you pick the one you want, you’ll see Power App working its magic.

When all the pipes are connected, you’ll see:

How can you provide the parameters you need. To do that, let’s create a new “Compose” action called “New Parameter” and then select the “Ask in PowerApps.”

Here’s what the list looks like.

Here’s what the list looks after.

As you can see, Power Automate added the parameter, and it even inherited the name of the “Compose” action. It’s a great way to “declare” new input parameters and name them as you want. I’ve added a few before using the same strategy.

Now let’s look at the Power App. If the “Run” is still returning an error in the number of parameters, repeat the steps above to add the same Flow. After that, you’ll see something like this.

Simple right? I like the way Microsoft implemented this making all the complexities simple.

How to get the information in Power Automate

Now that we have our Power App configured, we need to get the information on your Flow. Again, Microsoft did a fantastic job removing the complexity, and all is automatic. If you add a “Compose” action after your trigger, you can see the parameters you defined in the previous step.

If we define more parameters in the previous step, you’ll see more here. All of it is automatic.

If you want, on your Flow, to get information back to your Power App you can use the “Respond to a PowerApp or flow ” action.

Outputs

The trigger returns a lot of information in a JSON format, although the conversion from JSON is done automatically for you. Here’s an example:

{
    "headers": {
        <redacted>
    },
    "body": {
        "Getitem_Id": 716
    }
}

I’m removing the headers part since it’s not very interesting to us. The body is simple and contains the information that we provide in the Power App.

Limitations

There aren’t any documented limitations for this trigger, but if you have one please let me know.

Recommendations

Here are some things to keep in mind.

Use solutions

Solutions made things a lot easier and organized, especially where you have integration between platforms. For example, suppose you keep all Flows on your “My Flows” section. In that case, things will become unmanageable quickly, so start organizing things earlier than later to avoid getting lost in the middle on test and productions Flows.

Name it correctly

The name is super important in this case since we can get the trigger from anywhere and with anything. Always build the word so that other people can understand what you are using without opening the action and checking the details.

Always add a comment.

Adding a comment will also help to avoid mistakes. Indicate what you’re expecting, why Power Automate should trigger the Flow, and the data used. It’s essential to enable faster debugging when something goes wrong.

Am I missing something? Leave a comment or interact on Twitter. Let’s work together to make this reference as complete as we can

Back to the Power Automate Trigger Reference.

Photo by Alora Griffiths on Unsplash

Manuel Gomes

I'm a Project Manager with experience in large projects and companies. I've worked in the past for companies like Bayer, Sybase (now SAP) and I'm currently working for Pestana Hotel Group.

View all posts by Manuel Gomes →

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: