Agent flow not working in Copilot Studio? Eight causes and their fixes

Agent flow not working in Copilot Studio? Eight causes and their fixes

An agent flow that a Copilot Studio agent calls as a tool can fail at three points: when you add it, when it runs, and when the agent words the answer. In the chat, the last two look alike: an error code, or a wrong figure. Below are eight symptoms, each with its cause and fix. The setup assumed here: an agent flow does all the math and returns one finished text, named Result. The agent only picks the tool, fills its inputs and words the answer. It runs on the standard harness, with generative orchestration turned on. The example is invented: a price-quote agent whose tool is named Quote. Standard costs 12.50 EUR and Premium 24.85 EUR per unit, orders of 100 units or more get 10% off, and VAT is 20%. For "How much for 240 units of Standard?" the flow returns this Result: 240 x Standard at 12.50 EUR = 3,000.00 EUR. Volume discount 10%: 300.00 EUR. Net total: 2,700.00 EUR. VAT 20%: 540.00 EUR. Gross total: 3,240.00 EUR. Enter fullscreen mode Exit fullscreen mode First, find the step that failed Send the failing message again in the Test your agent panel. Then make three checks, in this order: Was the tool called, and with which inputs? The activity map shows the tool the agent selected, its inputs and outputs, and how long each step took. To open the map with every test message, select the three dots (…) in the panel and turn on Show activity map when testing. Did the flow run, and is Result right? Open the flow's run history. If the run failed, find the action that failed. Is Result right, but the answer wrong? Check the After running setting in the tool's Completion section, and the agent's instructions. The option Send specific response, with a message that holds only Result, shows the flow's text unchanged. With the default option, or with Write the response with generative AI, AI words the answer, so the instructions must tell it to copy every figure. When a call fails outright, the panel gives you an error code and some context. Three of those codes appear below: FlowActionTimedOut, FlowActionBadRequest and BindingKeyNotFoundError. 1. The flow is missing from the tool list On the agent's Tools page, select Add a tool, then Flow or Workflows (the one not under Create new) to list the flows you can add. A flow appears there only when all of this is true: It has the trigger When an agent calls the flow and a Respond to the agent action. Asynchronous response is off. The toggle is under Networking in the settings of the Respond to the agent action. It is published. It is in a solution, and its plan is Copilot Studio. If the flow was built as a Power Automate cloud flow, convert it. Before you do: the environment needs available Copilot Studio capacity, and the conversion is one-way, because the flow's billing moves to that capacity. Then open the flow's detail page in Power Automate, make sure it is in a solution, select Edit, change its plan to Copilot Studio, select Save and confirm. 2. FlowActionTimedOut Cause: the flow took more than 100 seconds to respond to the agent. Fix: Simplify the flow's queries and return less data. Precompute heavy data on a schedule, and let the flow read the stored result. Move steps that can wait to after the Respond to the agent action. Keep the slowest run you see in testing well under 100 seconds. 3. An input or output is rejected Cause: only Text, Number and Boolean values cross between agent and flow. One of the FlowActionBadRequest messages names exactly these three types. A file is a separate case: it needs a File input that is filled with a formula. Fix: return one formatted Text, like the Result above, and pass a date as ISO 8601 text, such as 2026-11-14. 4. FlowActionBadRequest after a flow change Cause: you changed the flow's inputs or outputs, and the tool still holds the old ones. Changed inputs can also show as BindingKeyNotFoundError. Fix: For a tool added at agent level, remove the tool and add it again. Then repeat its setup: the name, the description, the input settings and the Completion section. For a flow called from a topic, open the … menu on the Action node and select Refresh. Then save and republish the agent. If the error persists, check for empty inputs and start a new conversation. 5. A figure is a cent off Cause: the rounding broke. In this setup the flow keeps every amount in whole cents, in Integer variables. div() of two integers drops the remainder, so adding 50 before dividing by 100 rounds half up. The VAT step sets VatCents like this (VatPct holds the rate, 20): VatCents div(add(mul(variables('NetCents'), variables('VatPct')), 50), 100) Enter fullscreen mode Exit fullscreen mode Two mistakes break this: the +50 is missing, or one operand is a decimal. With a decimal operand, div() returns a decimal and nothing is dropped. To see which one it is, ask for two quotes and check the VAT: Quote for Correct VAT Wrong VAT What the wrong figure means 103 units of Premium 460.72 EUR 460.71 EUR The +50 is missing from the VAT step 101 units of Premium 451.77 EUR 451.78 EUR The VAT step ran in decimals Fix: restore the +50 if it is missing, and keep every amount in an Integer variable. 6. Quotes fail for some users, or after a colleague leaves Cause: two separate settings, one per symptom. By default, a tool uses each user's credentials (End user). In that mode, users only reach data they are authorized to see. The flow's connections can belong to one person. Fix: For a price list that everyone shares, set the tool's credentials to Maker-provided. Microsoft Learn says to use that mode for shared resources. In the flow, use connections owned by a service account, through connection references. Your own tests may not show the first problem, because when you test, the user is you. Before launch, have a colleague without access to the price list ask for a quote. 7. A figure appears with no tool call The activity map shows no call to the Quote tool for that message. Cause: the agent answered from a knowledge source, such as an old price list, or from conversation memory. The setting Allow ungrounded responses permits the second of these. Fix: remove price lists and old quotes from the agent's knowledge, and add these two rules to the agent's instructions: - Never state a figure the Quote tool did not return for this message. If the tool fails, say the quote cannot be calculated right now; do not estimate. - After the answer, offer only what the Quote tool can calculate. Enter fullscreen mode Exit fullscreen mode Then: Test follow-up questions such as "And for 300 units?". Consider turning Allow ungrounded responses off (in the Knowledge section of the agent's Generative AI settings). The agent then blocks every response from a turn in which it used no tool and no knowledge source, and the fallback topic runs instead. That applies to every turn, so rerun all your tests after the change. 8. Answers change after a model switch Cause: models treat tool output differently. Some repeat it, some rephrase it. Fix: keep a test set and rerun all of it after every model change, and after each change to the flow, the instructions or a description. A set is 10 to 20 questions with known-correct figures: a typical case, both sides of the discount tier (99 and 100 units), a rounding case, a missing input. Before you go live The flow is published and in a solution, with Asynchronous response off. Every amount in the flow is an Integer in cents. No price list or old quote sits in the agent's knowledge sources. The tool's credentials are set on purpose, and the flow's connections do not depend on one person. Which of these eight has cost you the most time? The price list and all figures in this article are invented. The article was generated with AI under my direction. The interface labels and limits were checked against Microsoft Learn on 15 November 2026, and the figures were verified by calculation; the example as a whole has not been run end to end in a tenant, so test it before you rely on it. References (Microsoft Learn) Review agent activity Resolve Microsoft Copilot Studio agent error codes Add an agent flow as a tool to an agent Agent flows overview FlowActionBadRequest agent error in channels Add tools to custom agents Knowledge sources summary

Original Source

Read the full article at Dev →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.