Search techniques

  • Black belt
  • Premium
  • Tip 170

One flow as a router for agent tools

Quiz question

What does the action parameter control in the router flow?

Solution

  1. A) Whether the flow needs a premium licenseWrong. action only selects the operation. The license depends on whether the flow is billed as an agent flow or as a cloud flow.
  2. B) The language the agent answers inWrong. action has nothing to do with the language of the agent. The parameter selects the operation in the flow.
  3. C) The Switch to get, create or updateCorrect. The Switch on action routes to the get, create or update branch. The input parameter carries an OData filter or a JSON body for it.

What it is about

A Copilot Studio agent should read, create and update data. You don't need your own MCP server with an HTTP trigger and custom connector. A flow with the trigger "When an agent calls the flow" that you give to the agent as a tool is enough. The trigger gets two inputs: action with the values get, create or update, and input as text. A Switch on action routes to the right branch. For get, input is an OData filter and goes into the Filter Query. For create and update, input is a JSON body that Parse JSON breaks down. Each branch sets the variable result, initialized before the Switch. At the end, "Respond to the agent" returns a fixed JSON, within 100 seconds and with Asynchronous response set to Off. License: as an agent flow it uses Copilot Studio capacity; as a cloud flow, Dataverse is Premium and SharePoint Standard.

The expression from the tip

triggerBody()?['text']

When to use it, when not

Use it

When an internal agent needs several related operations on the same table or list and you want to maintain only one flow.

Better not

When the agent often mixes up the operations. It often picks separate flows with their own description more reliably.

Most common mistake

Referencing the Parse JSON of the create branch in the update branch. That branch did not run, and the expression fails.

License

Premium Premium connectors or features require suitable usage rights, for example from Power Automate Premium, Process, Power Apps or Dynamics 365. Check existing licenses in the license check. Source on Microsoft Learn: FAQ for agent flows. For your whole flow: License check.

Full tip on powerplatformtip.comPowerPlatformTip #170, with screenshots

Share

Short link: powerautomate.ninja/en/170

Source: PowerPlatformTip #170, Microsoft Learn: Add an agent flow as a tool to an agent.

Prefer to continue with guidance? The Power Automate live course (in German) at the Power Platform Academy runs over four weeks. The next dates are not set yet, you can join the waiting list on the course page.