
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!