Recently the Run a generative action was added to Power Automate. To make this action work is not as easy as you might hope.

Run a generative action

After my earlier post about the Run a prompt in this post I’m looking at the other AI action available in Power Automate

The Run a generative action can be added in both the new and classic cloud flow designer. But in this post I will use the new UI (how long will I still call this new and old?) as it is a bit easier in this case.

Add a Run a generative action
Add a Run a generative action

When we add the action to a flow we are adding a whole Child flow that does whatever we need it to do. One of the limitations however is that the generative action will only take text parameters as input and there is no output possible. Event though the action will offer the output parameters to us. We will have a look at this later in this post.

To get to the following flow is now our aim!

A successful Run a generative action
A successful Run a generative action

To get a successful action can be a real challenge with the limitation of this action. Even with the official documentation, it was quite a challenge to get this one to work.

Adding the Run a generative action

Add the action and then click on the New generative action.

Interface displaying options for running a generative action in a software application, showcasing parameters and action names related to SharePoint document management.
Run a generative action in Power Automate 1

This will get us to the next step where we can enter our instructions:

A preview window for creating a generative action in an application, including instructions for creating a SharePoint list item for documents in a Document library.
Run a generative action in Power Automate 2

My example will use the following instructions:

Create an item in a SharePoint list for each document in a Document library. Set the Title of the item to the Title of the documentsMy example 

Noticed that I’m going to use SharePoint. This action however does support other data sources as well. The following data sources are supported and potentially that makes this action suitable for integrations between these applications.

  • SharePoint
  • Office 365 Outlook
  • OneDrive for work or school
  • Planner
  • Microsoft Teams
  • Notifications
  • Office 365 Users
  • Approvals
  • Excel online for Business

Now we get the suggestions of the input and output properties. Noticed that you have to confirm each of the properties. Any suggested properties that appear in the Output will need to be removed.

In my example I should have now something that looks like this:

User interface for creating SharePoint list items from a document library, featuring instructions and input/output fields.
Run a generative action in Power Automate 3

Then click the add and we can use the action.

Configuring the Run a generative action

The action will now offer the 4 parameters that we accepted in our flow designer.

Form interface for running a generative action in SharePoint, featuring fields for action name, target list details, and document library information.
Run a generative action in Power Automate 4

And when we run our flow our list is updated.

Screenshot of a digital count list with two entries: 'Document' and 'Book1', along with an 'Add column' option.
Run a generative action in Power Automate 5

Warning!

The action described in this flow is in preview. That means do not use it in production yet!

Debugging the action

So what is happening inside that action? To find out what is happening in the Run a generative action we need to look at the See full run details that appears in the Run results.

Screenshot of a software interface showing the results of a flow run, including input fields for host and parameters, and a visual workflow representation.
Run a generative action in Power Automate 6

This is not the easiest to review, but we can now see how our initial prompt was received within the Thought process and as we scroll down we can find the rest of the flow.

Screenshot of a SharePoint interface displaying the process of creating list items from a document library, including details such as target list name, site URL, and document library name.
Run a generative action in Power Automate 7

We can now for example find that there are some create item actions in our generative action. And we have the opportunity to clean up the flow by selecting the actions that we want or don’t want.

Screenshot of a user interface for creating an item in a dataset, featuring input fields for dataset information, table selection, view options, and output details.
Run a generative action in Power Automate 8


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Related Posts

Leave a Reply

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