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 / How to store Copilot S...
Copilot Studio
Suggested Answer

How to store Copilot Studio Custom Agent's chat response in a variable?

(1) ShareShare
ReportReport
Posted on by 6
Hi Team,
 
I am building a custom copilot agent in Copilot Studio and I wanted to use the Agent's response as a input to trigger the Power Automate Flow.
 
Is there any way I can store the agent's entire response to use as input for the flow?
I have the same question (0)
  • Arild Aarnes Profile Picture
    565 Super User 2026 Season 1 on at
    Hi,
     
    Yes there is.
    The approach will be different depending on if generative orchestration is enabled or not in your agent.
     
    If it's on Classic you can find the agent response in a variable called Answer after the Create generative answer node in the Conversational boosting topic or after a Generative answers node in our custom topic. You can use that as input for your flow.
     
     
    If Generative orchestration is enabled the approach is different.
     
     
    You would have to create a new topic and change the trigger type to AI response generated.
     
     
    Within that new topic you will find a system variable called Response.FormattedText, that will be the response from AI and you can send that to your flow from this topic.
     
     
     
    Hope that helps.
     
    Arild
  • tcmsadmin Profile Picture
    6 on at
     Hello  
     
    Thanks for your prompt response.
     
     
    In my case, we were using Classic orchestration.
     
    I could see Answer Variable in  Conversational boosting topic.
     
    I can't see find variable in my Custom Topic.
     
     
    Kindly help.
     
    Thanks
  • Suggested answer
    Arild Aarnes Profile Picture
    565 Super User 2026 Season 1 on at
    If you go to properties on your "Generativ answers" nodes, scroll all the way to the bottom and open advanced you can set a new variable under "Save bot response as"
     
     
    Regards
    Arild
  • HeihoSilver Profile Picture
    87 on at
    Hi @Arild Aarnes
    Thank for your suggestion.
    I experienced that using AI generated response and Response.FormattedText seems to capture every response from the agent.
    Even if I have made several topics and instructed to run on specific occasion and variables, the AI generated response will still trigger the Topic. 
    Is there a way to setup specific AI response to be captured?
    Thanks
  • Suggested answer
    Arild Aarnes Profile Picture
    565 Super User 2026 Season 1 on at
    Hi @HeihoSilver,

    If you click on the three dots on the Topic trigger you can set conditions for when the AI response generated topic should trigger.



    You can use set some global variable in your other topics and used that to only conditionally trigger the AI response generated topic.
    You can also use Power Fx formulas to support even more complex conditional scenarios.

    Hope this is what you where looking for.

    Regards,
    Arild

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 594

#2
chiaraalina Profile Picture

chiaraalina 170 Super User 2026 Season 1

#3
deepakmehta13a Profile Picture

deepakmehta13a 118

Last 30 days Overall leaderboard