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?

(0) ShareShare
ReportReport
Posted on by 17
Hi everyone,

I am building an automation where a user uploads a PDF to a Copilot Studio Agent. This triggers a Power Automate flow that:

1. Extracts the report date using AI Builder.
2. Checks a SharePoint list to see if a report for that date has already been processed.

The Requirement:
If the report date already exists in SharePoint, I need the flow to stop immediately and the Agent to tell the user: "This report has already been processed."

The Challenge:
I am struggling with the best way to "Send a message" back to the chat from inside a specific branch of the flow.
1. Multiple Respond Actions: I tried adding a 'Respond to the agent' action inside the 'True' (Duplicate Found) branch, but I keep getting Schema Errors because I also have a 'Respond' action at the end of the success path.
2. Terminate Action: If I use a 'Terminate' action to stop the flow, the Agent often shows a generic system error instead of my custom "Duplicate Found" message. 

Overall, In chat user should get the message like the report has been proceed already, but they're not getting any message or i am not able to find any actions that can send a message to agent(in chat bot) ...

My Questions:
  1. What is the standard practice for sending a "Short-circuit" or "Validation Error" message from a Flow to a Copilot Agent?
  2. Do I need to use a specific Variable strategy to pass a Status Message back to the Agent?
  3. How can I ensure the Agent speaks the error message before the flow completes or terminates?
  4. Any guidance on how to properly map these validation messages back to the chatbot interface would be a huge help!
I have the same question (0)
  • Suggested answer
    deepakmehta13a Profile Picture
    369 on at

    Hi,

    1. Standard practice

    You should have only ONE “Respond to the agent” action in the flow.

    Instead of placing multiple Respond actions in different branches, the recommended approach is:

    • Use a Condition (duplicate check)

    • Set variables like:

      • Status (e.g., Success / Duplicate)

      • Message (e.g., “This report has already been processed.”)

    • Let the flow continue

    • Use a single Respond to the agent at the end

    This avoids schema conflicts and keeps the contract consistent.


    2. Variable strategy

    Yes, using variables is the cleanest approach.

    Example:

    • Initialize:

      • statusMessage (string)

      • isDuplicate (boolean)

    Then:

    • If duplicate:

      • Set statusMessage = "This report has already been processed."

      • Skip further processing (don’t terminate)

    • Else:

      • Continue processing

      • Set success message

    Finally:

    • Return both in Respond to the agent


    3. Why Terminate causes issues

    Using Terminate breaks the request/response contract.

    From Copilot’s perspective:

    • The flow did not return a valid response

    • So it shows a generic SystemError

    That’s why your custom message never appears.


    4. How to ensure the agent shows the message

    In your flow:

    • Always return a consistent response schema (e.g., statusMessage, status)

    In Copilot Studio:

    • Map the response output

    • Use it in the conversation like:

      • If status = Duplicate → show message

      • Else → show success response


    This pattern is the most stable and aligns with how Copilot Studio expects flows to behave.

    Hope this helps.

    If this helps resolve your issue, please consider marking the response as Verified so it can help others facing a similar scenario.

    If you found this helpful, you can also click “Yes” on “Was this reply helpful?” or give it a Like.

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