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 / Is there a way to stor...
Copilot Studio
Unanswered

Is there a way to store the bot's last response in a variable for use in Power Automate flow?

(0) ShareShare
ReportReport
Posted on by
Hi everyone,

I am building an agent in Copilot Studio that generates a 
professional scope memo using instructions (not a topic). After 
the memo is generated, I want to send it as an email draft in 
Outlook using a Power Automate flow.

The problem:
- The scope memo is generated by the agent via instructions 
  (generative AI response)
- I need to pass this generated text to a Power Automate flow 
  as an input
- But I cannot find a way to store the bot's last AI-generated 
  response in a variable

What I have explored:
- System.LastMessage.Text — this captures the USER's last message 
  (e.g., "yes"), not the bot's response
- System.Activity.Text — same issue, captures user input only
- There does not appear to be a System.LastBotMessage.Text or 
  equivalent variable
- Global variables cannot be set from within instructions 
  (instructions do not support variable assignment)
- Using a Generative Answer node inside a topic to "extract" the 
  memo from conversation history — this returned undefined/empty 
  values

My questions:
1. Is there any system variable or method to capture the bot's 
   last generated response (the AI output) into a variable?
2. Is there a recommended pattern for passing AI-generated content 
   from the instruction layer to a topic or Power Automate flow?
3. Has anyone successfully implemented a "generate content via 
   instructions → send via email" workflow without asking the 
   user to copy-paste the content?

My current workaround is to generate the scope memo inside a topic 
(using Generative Answer node + Adaptive Card for inputs), which 
allows me to save the output to a variable. However, the Generative 
Answer node is unreliable (see my other post about "no information 
found" errors).

Any guidance on best practices for this pattern would be very 
helpful. Thank you!
Categories:
I have the same question (0)

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Vish WR Profile Picture

Vish WR 238

#1
Valantis Profile Picture

Valantis 238

#3
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 212 Super User 2026 Season 1

Last 30 days Overall leaderboard