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 do I get the conve...
Copilot Studio
Answered

How do I get the conversation history of the chatbot?

(3) ShareShare
ReportReport
Posted on by 8

I realize that the copilot chatbot has a default system variable for retrieving the last message sent through System.Activity.LastMessage, but I am looking for all previous messages from both the user and bot. On Topic Escalation, I would like to send the chatbot's entire conversation history with the user to Zendesk API to create a support ticket. How would I accomplish this?Screenshot 2024-02-20 123025.png

Categories:
I have the same question (2)
  • Verified answer
    adilei Profile Picture
    Microsoft Employee on at

    There are two documented patterns that would allow you to do that:

     

    Manage a global variable: Solved: Re: Integrate a PVA chatbot with Azure OpenAI Chat... - Power Platform Community (microsoft....

     

    Access the transcript using Directline: Solved: I want to retrieve user bot conversations using di... - Power Platform Community (microsoft....

  • AlderM Profile Picture
    8 on at

    im using the second option. i see in the last step he mentions using a PowerFX function to isolate the messages. What would this function look like? First time hearing of this language and havent had much luck getting it to work. I wan to create a string similar to how is adaptive card looks. but i want it to be a string that id be sending as a body in my zendesk api call

  • FrankBiondo Profile Picture
    4 on at
    Two dead links in the accepted answer. Does anyone have an updated set of links? I'm facing this challenge. Need to capture the bot response within the session into a global variable along with the System.LastMessage.Text... how is there not a System.BotLastMessage.Text.

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!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 612

#2
chiaraalina Profile Picture

chiaraalina 161 Super User 2026 Season 1

#3
deepakmehta13a Profile Picture

deepakmehta13a 116

Last 30 days Overall leaderboard