web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / To send a specific mes...
Copilot Studio
Suggested Answer

To send a specific message from Power Automate back to a CopilotAgent within a conditional branch?

(1) ShareShare
ReportReport
Posted on by 17

Hi everyone,

I’m building an automation using Copilot Studio and Power Automate, and I’m running into an issue with handling validation responses back to the agent.

Scenario

  • A user uploads a PDF to a Copilot Studio agent

  • This triggers a Power Automate flow

  • The flow:

    1. Extracts the report date using AI Builder

    2. Checks a SharePoint list to see if a report for that date already exists

Requirement

If the report date already exists in SharePoint, the flow should stop immediately and the agent should respond with:
"This report has already been processed."

Challenges I’m Facing

  • Multiple “Respond to agent” actions
    I tried placing a Respond to agent action inside the “Duplicate Found” branch, but I get schema errors because there is already a Respond action at the end of the main (success) path.

  • Using Terminate action
    When I use a Terminate action, the agent often returns a generic system error instead of my custom message.

Questions

  1. What is the recommended pattern for sending a validation or short-circuit response from Power Automate back to a Copilot Studio agent?

  2. Should I use a variable (e.g., StatusMessage) and return it in a single Respond action at the end?

  3. How can I ensure the agent displays a custom message (like "duplicate report") instead of a system error when the flow stops early?

Any guidance, best practices, or sample patterns would be greatly appreciated!

Thanks in advance!

I have the same question (0)
  • Suggested answer
    Arild Aarnes Profile Picture
    565 Super User 2026 Season 1 on at
     
    I would go with your option 2.
    And if you run the flow from within a Topic in your agent you should have full control over how to handle the output from the flow.  E.G. use conditions or whatever you need in the Topic to control what happens depending on the message you get back from the flow.
     
    Regards,
    Arild
  • Suggested answer
    Admin.Nick2 Profile Picture
    43 on at
     
    1. To handle attachment you have to use a topic. It's the only place you can read System.Activity.Attachments
    2. From the topic, you can add a condition to fork to a end the conversation topic.
    3. However, if you can, include as much logic as you can in the flow. I found out the less I use the agent, the better the results. It reduces the context size and improves reliability.
     
    So option #2 seems the best.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard