Power Automate – The 5 Power Actions


There are over a 1000 different connectors available in Power Automate, and each of them have multiple actions (SharePoint has over 50 actions!). But when we have so many we quickly realise that not a all connectors/actions are made equal, so which are the real Power actions.

Sorry Chuck Norris connector, you didn’t make the cut 😎

chuck norris action

You may know some of these, but hopefully there are one or two you didn’t know.



1. ‘HTTP with Microsoft Entra ID (preauthorized)

http entra

This is probably the most Powerful of all actions, it’s even got its own blog if you want to read.

But the top level is that this action can call any endpoint within the graph api that has an approved scope within the power platform. So in most cases if you have a connector with a missing action and no HTTP action, you can use the Http Entra action to call it (the above example shows additional MS Form action).
It also has the added benefit of being able to use a Power Platform Gateway, so anything on premise should also be able to be called (bypassing the Custom Connector requirement for Gateway owner issue).

Its an incredibly useful action and I strongly recommend checking out the detailed blog:



2. Office 365 User Send an HTTP request

This actions real power is that it’s more then it says on the tin. What does this mean, well we can call additional graph api endpoints through this action, in particular Excel.

As you know there are no OneDrive or Excel (Business) Http actions, but it turns out you can use the Office 365 User Http action instead.

http user update excel cell

The above example shows how we can update a specific cell value (not possible in normal Excel connector).

https://graph.microsoft.com/v1.0/me/drive/root:/book.xlsx:/workbook/worksheets/Sheet1/range(address="A1")

PATCH

{
  "values": [
    [
      "Hello dave"
    ]
  ]
}
Enter fullscreen mode

Exit fullscreen mode

You can do much more, including formatting, bulk upload, hiding rows/columns, adding rows/columns, merging/unmerging, last cell and even insert images.

update cell format

Check out more here: MS Learn Update range

And its not just Excel, as its using the /me/ endpoint (https://graph.microsoft.com/v1.0/me/), it can work on:

  • OneDrive (that’s how we edit Excel)
  • Planner Tasks
  • Insights
  • Groups
  • Mail/Calendar

and more.



3. Run Script from SharePoint library

Another one you might of used but had to be on the list. Like the Office 365 User Http action its real power is using it for something its not directly designed for. In this case its the script that we want to use, not the Excel part.

csv to josn

In the above example we are not using the Excel workbook at all, we are passing a csv file, converting it in the Office Script, and then returning it to the flow.

As Office scripts are based on TypeScript, which is a subset of JavaScript, you have the flexibility to use a wide range of built in functions, all done quicker and without burning Power Platform API calls.

If you want to know the full detail on how to create Office Scripts, I’ve done a blog for you, also if you want to see the convert csv to json script, there is a blog for that too 😎



4. Perform an unbound action in selected environment

For some reason I haven’t done a blog on this yet, but I really should as its very cool. The Dataverse Unbound action (and to a lesser extend bound action) allow you to call a Dataverse plugin. What does that mean, well 3 things:

  1. You can call all of Microsoft’s prebuilt plug-ins
  2. You can create your own plug-ins and call them
  3. You can create your own low-code plug-ins/functions (Power FX) and call them.

Let’s start with the prebuilt plug-ins, pretty much any action within the Power platform that requires multiple chained api calls is actually a plugin built in C#. A few of examples are:

  • Export Solution- Creates solution zip (and import,uninstall)
    export solutionn
  • BulkDelete – deletes Dataverse rows based on queries
  • AddSolutionComponent – adds component like a flow to a solution
  • GrantAccess – share a Dataverse record (and revoke access)

All here: MS Learn Web API Action Reference

Next if you know C# you can create your own plug-ins, unfortunately I don’t, so I have kind of, well, avoided them. They look cool and I’m sure Copilot could do the hard work but I never got around to them. If you want to know more MS learn has lots of cool docs like: MS Learn write a plug-in

Then we have Functions in Datavere (aka Low-Code Plug-ins in Dataverse or whatever new name Microsoft has given it), this is more my cup of tea, I can write PowerFX (well maybe ish 🤞). Just like the other plug-in’s, these are really a internal API, the unbound action just calls them.

Guess what, I’ve already done a blog on them (wow this blog is feeling like a sitcom flashback episode), intro and more info on Instant (these are called by unbound).

So in theory unbound is like Run Script, it allows pro-code capability within Power Automate, pretty powerful 😎



5. Prompt

We couldn’t do a blog with a little bit of AI (maybe I should add it to the title for bit of click bait 🤔 ), and of all the cool AI builder actions, the old-school prompt is still the best.

Why, well it is similar to the last 2, it adds pro-code like functionality.

prompt

The above example creates a regex extractor (good old regex, the goto functionality Power Automate really should have). What’s really cool is you can give it a simple prompt and get Copilot to make a proper prompt/instruction (yep prompting to create a prompt, inception alert).

But again like the script and plug-ins, you can do so much more. Converting data like from csv to json (again), creating templates, complex classification (no more super switches), just to name a few.

But with one obvious drawback, it uses AI Builder tokens Copilot Credits😢, so if you don’t have the dollar it might not be as powerful as I said it is.


And that’s my Power 5, yes some are niche, some repetitive, and I probably missed some even better ones, but what you going to do 😎

 
😎 Subscribe to David Wyatt



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *