Forum Discussion
Can my agent use flows as tools when I'm a licensed M365 Copilot user?
I tried to create an agent in Copilot Studio which drafts responses to emails I receive in Outlook.
There is no "draft a reply" tool, there is only "Send a reply" or "Draft a message". I don't want an AI agent to immediately send out email replies, I want to review them first, but I also would like to review them in the context of the original message (as opposed to having a bunch of messages in the drafts folder with no visible connection to the original email I received - like the "Draft a message" tool does).
So I "added a tool" (which would be a "Flow") to the agent which just does 2 HTTP calls to the outlook graph api (one creates the reply, the second adds the generated content to the body).
The flow checker tells me:
More Copilot Credits are needed for this flow to run. Runs from agents by M365 Copilot users and testing don't consume credits.
I am a "M365 Copilot user", so I'd expect this to work, and manually testing the flow works.
However, when the agent tries to run the flow, it's being blocked with the error:
The environment 'Default-<...>' does not have sufficient Copilot Credits to run workflows.
So, can an agent by a M365 Copilot user run flows?
Alternatively: is there a way to draft email responses which in Outlook end up visually connected to the original message?
1 Reply
- V_2ManibCopper Contributor
You need copilot credits for running the flows as credits are environment scoped (not user scoped). Additionally, the default environment has no credits assigned by default. Even as licensed user for copilot M365, this needs to be checked on your environment setup for availability of credits.
More about licensing info https://learn.microsoft.com/en-us/ai-builder/message-management : Hope this guides you in the right direction.