Forum Discussion

AhmadRiaz's avatar
AhmadRiaz
Copper Contributor
Jun 16, 2025

How to store full user–agent conversation in a custom Dataverse field?

Hi everyone, I'm working with Microsoft Copilot Studio and using a generative AI knowledge source in my agent.
I want to store the entire conversation between the user and the agent into a custom Dataverse table.
Specifically: Table: Lead Field: Conversation (multiline text)
Has anyone implemented a way to log or store the full dialogue (user + bot responses) into such a field automatically?

4 Replies

  • Gentlemen22's avatar
    Gentlemen22
    Copper Contributor

    <!-- 
    Using Power Automate might help here. Trigger on conversation updates and append each message to the Lead.Conversation field in Dataverse.
    -->

  • Lalit Mohan's avatar
    Lalit Mohan
    Iron Contributor

    Hi, AhmadRiaz​  to store full user–agent conversations in a Dataverse field, use Power Automate triggered by the agent’s conversation events. Capture both user inputs and bot responses, then append them to a multiline text field in your custom table (e.g., Lead → Conversation). Ensure the flow handles session tracking and text formatting for clarity.

  • You can use Power Automate to capture and log the conversation. In your Copilot Studio bot, add a Power Automate flow at the end of the conversation. Pass the full conversation as a string (using system variables or context tracking) to the flow, and then use the Dataverse connector to update the Lead table and write to the Conversation field (multiline text). This way, every time a conversation ends, it’s stored automatically in Dataverse.

    • AhmadRiaz's avatar
      AhmadRiaz
      Copper Contributor

      Thanks so much for your response! That approach works well for structured conversations, but in my scenario, the agent responses are generated dynamically through generative AI, and the conversation doesn't have a clearly defined end or fixed path. Because of that, I'm not currently able to pass the full dialogue into a variable at a single point.

      I’m exploring ways to continuously capture the user and bot messages during the conversation and store them incrementally or aggregate them into a global variable. If you or anyone else has suggestions for handling dynamic, open-ended conversations like this, I’d really appreciate it!

Resources