I’m running into an issue while building an agent in Copilot Studio that uses the “When an email gets flagged” trigger. The trigger correctly retrieves the email content (subject, bodyPreview, from, etc.), and I then call a tool to generate a draft reply.
Problem 1:
When I use the tool, it generates a response, but it does not seem to use the connected knowledge sources.
Interestingly, when I test the same tool in the chat environment, it does use the knowledge correctly. It seems like the tool behaves differently when triggered by an actual event versus testing.
What I tried:
I removed the tool and instead created a topic with an intent-based trigger. Inside the topic, I use “Generative answers” blocks to generate subject/body/recipient info and then pass those to a “Draft an email” action.
Problem 2:
The generated variables appear to be empty when triggered by the agent. Even when I use {{recognizertrigger.triggeringmessage.text}}
, it doesn’t seem to contain the actual email content.
So my main question is:
Does the “When an email gets flagged” trigger pass its output (like subject, body, from) into the topic context? And if not, how can I get that email content into my topic or into generative blocks and the draft email action?
Any guidance, examples, or confirmations on how to properly pass the trigger data into a topic or tool would be greatly appreciated.