Tutorials/Copilot Studio/Build a Custom Tool to Inspect Copilot Studio Chat Histories
Copilot Studiointermediate

Build a Custom Tool to Inspect Copilot Studio Chat Histories

Create a Power Apps canvas app that connects to Dataverse to search, display, and export Copilot Studio conversation transcripts for audit and troubleshooting.

NA
Narmer Abader
@narmer · Published June 3, 2026

Copilot Studio automatically records every user interaction in the Dataverse conversationtranscript table. The built‑in analytics show aggregates, but when you need to drill into the raw flow of a specific conversation—whether for quality assurance, troubleshooting, or compliance—you need direct access to the full transcript. A custom Power Apps canvas app is the easiest way to search, display, and even import transcripts from other environments.

Why Build a Custom Transcript Viewer?

The standard Copilot Studio interface doesn’t expose the complete JSON payload of a conversation. A lightweight Power Apps tool can:

  • Search across all agents (bots) by conversation ID, bot ID, or datetime range.
  • Display the entire transcript in a readable, scrollable form.
  • Let you copy the raw JSON to your clipboard.
  • Accept a pasted transcript block from environments where direct Dataverse access is not available.

All of this requires only a Power Apps Premium license and the correct read permissions on two Dataverse tables.

Meet Contoso’s Scenario

Contoso Corp runs five Copilot Studio agents for different product lines. The quality assurance manager needs to pull random samples of conversations each week. Previously they had to request extracts from IT. Now they use a “Conversation Inspector” canvas app that lets them filter by date, pick an agent, and view the full conversation flow, including hidden context variables and topic transitions.

Step 1: Verify Prerequisites

Before building, ensure you have:

  • Power Apps Premium license assigned to the users who will run the app.
  • Security role with at least organisational read access to the bot and conversationtranscript tables. The built‑in “Environment Reader” role is sufficient, or you can create a custom role.
Cross‑environment note

To paste transcripts from another environment, you don’t need extra permissions in the source environment – you only need to copy the JSON from Copilot Studio’s own analytics page and paste it into this app.

Step 2: Create the Canvas App and Add Data Sources

  1. In Power Apps, create a new Canvas app (phone layout) inside a solution.

  2. Add the Microsoft Dataverse connector and select two tables:

    • Bot (for agent names)
    • Conversation Transcript (the conversation log)
  3. Rename the data sources to something friendly, e.g. Agents and Transcripts.

Step 3: Build the Search Screen

The main screen contains a search box, a date range filter, and a gallery.

Add a Text input named SearchText, and two Date pickers named DateFrom and DateTo. Set the gallery’s Items property to a filtered query:

powerfxGallery Items property
Filter(
  Transcripts,
  StartsWith(ConversationId, SearchText.Text) ||
  StartsWith(BotId, SearchText.Text) ||
  StartsWith('Conversation Name', SearchText.Text),
  CreatedOn >= DateFrom.SelectedDate,
  CreatedOn <= DateTo.SelectedDate + 1
)
Delegation

StartsWith delegates on most text columns. Avoid using in or Search() for the main filter; otherwise Power Apps returns only the first 500 rows. If you need a broader search, consider adding a Power Automate flow to run a Dataverse query.

In the gallery, display four fields: Agent name (looked up via LookUp(Agents, BotId = GalleryItem.BotId).Name), Conversation ID, Start time (CreatedOn), and a truncated preview of the topic path.

Step 4: Display Full Transcript Details

Add a detail screen that appears when a gallery item is selected. On the gallery’s OnSelect use:

powerfxNavigate to detail screen
Navigate(DetailScreen, ScreenTransition.Cover, { SelectedTranscript: ThisItem })

On the detail screen, place labels to show:

  • Agent: LookUp(Agents, BotId = SelectedTranscript.BotId).Name
  • Conversation ID: SelectedTranscript.ConversationId
  • Created: Text(SelectedTranscript.CreatedOn, "dd/mm/yyyy hh:mm")
  • Transcript JSON: a multiline label or a text input with SelectedTranscript.'Transcript Content' (or whatever column stores the JSON body).
powerfxFormatting the JSON label
// Add a label with AutoHeight = true
// Text = SelectedTranscript.'Transcript Content'

To quickly copy the full JSON, add a button with:

powerfxCopy button formula
CopyText(SelectedTranscript.'Transcript Content')

Step 5: Support for Cross‑Environment Transcripts

Sometimes you need to inspect a conversation from a Copilot Studio environment that you don’t have Dataverse access to. In those cases you can copy a transcript block from the Copilot Studio analytics page and paste it into the app.

Add a third screen with a large Text input (multiline) named PasteArea and a button. When the button is pressed, store the pasted JSON in a global variable:

powerfxStore pasted JSON
Set(PastedJSON, PasteArea.Text)

You can then navigate to a display screen that shows the JSON in a read‑only label. For more advanced parsing, send the JSON to a Power Automate flow that returns a collection of conversation events.

Pro Tip

If you frequently need cross‑environment inspection, consider building a Flow that retrieves transcripts via the Copilot Studio API and returns them to your app, avoiding manual copy‑paste entirely.

Common Pitfalls and How to Avoid Them

  • Missing security permissions. The conversationtranscript table is often read‑only. Make sure users have the prvReadConversationTranscript privilege assigned at the organisation level.
  • Delegation warnings. Using Filter(Transcripts, Text in ColumnName) instead of StartsWith will silently limit results to 500 records. Always prefer delegable operators.
  • Large transcripts. A single conversation can contain hundreds of turns. Use a label with AutoHeight and a scrollable container to avoid truncation.
  • Trying to update records. The conversationtranscript table is not meant to be modified. Write your app as read‑only only.

Final Thoughts

A custom canvas app turns Copilot Studio’s hidden transcript data into an actionable asset. Start with the steps above, then enrich the tool with features like:

  • Export to Excel (using Collect with ForAll and Patch).
  • A topic‑level summary derived from the JSON.
  • Integration with Azure OpenAI for sentiment scoring.

The result is a transparent view of your conversational AI that helps you improve both the agent’s performance and the end‑user experience.

References