As part of a POC to post a message to a Copilot Studio agent hosted in Microsoft Teams from a Power Automate cloud flow, I hit this error on the very first run:

We couldn’t find your bot

The Teams action returned BadRequest and the message never made it to the chat. Here is what caused it in my case, and how I fixed it.

The setup

  • The cloud flow used the Teams action Post message in a chat or channel with Post as: Microsoft Copilot Studio agent.
SettingValue
Post asMicrosoft Copilot Studio agent
Post inChat with agent
AgentPOC Transcription from Flow
RecipientMy email
MessageHello World from Cloud Flow
  • Running the flow returned BadRequest, body contained "We couldn't find your bot".

What I checked first

I went through the usual suspects before finding the real issue:

  • The flow and the agent were in the same environment.
  • The Teams connector in the flow was signed in with the same account that owns the agent
  • The agent was published, and I could chat with it in Teams normally
  • The recipient (me) had the agent installed as a personal app in Teams

All good, but the flow still failed with the same error.

The real cause: environment type

  • The agent was hosted in a Developer type Dataverse environment.
  • In my testing, the Post as: Microsoft Copilot Studio agent action does not work against an agent in a Developer environment.
  • I moved the agent and the flow to a Production type Dataverse environment.

What the Microsoft docs actually say

If you hit We couldn't find your bot when posting to a Copilot Studio agent from a cloud flow, check your environment type first. Move the agent and the flow to a Production or Sandbox environment

🙂

Leave a Reply

Discover more from Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI

Subscribe now to keep reading and get access to the full archive.

Continue reading