web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : i8tNV0oEQxaKb4f9gnWWqv
Copilot Studio - General
Unanswered

Extracting list of items from database

Like (0) ShareShare
ReportReport
Posted on 24 Nov 2023 18:57:33 by 4

I want to create a topic that gives users the ability to get a list of rows from a database (in our case, postgres).

 

I am able to use the connector and it does the select on the database and returns something (either record or table).

 

I want to parse the results and display one of the fields in a list return to the user (name column).  I've tried all sorts of things like ParseJSON but that wants a string but the source is a table.

 

Has anybody done this type of selection from a database?  Would be great if our users could ask for the list of items from the DB from Copilot.

Categories:
I have the same question (0)
  • fernandosilva Profile Picture
    Super User 2024 Season 1 on 27 Nov 2023 at 15:29:12
    Re: Extracting list of items from database

    Yes, you can use the HTTP connector. Make sure you  have a body and place in it.

    use, Compose and ParseJson and then send the response you want back to PVA.

    That doesn't require Postgres or any other library for the outer world.

    Simply using the connectors available, you can get all the data and pass it with a form, table, list, etc.

     

    Cheers,


    Fernando

     

  • Pstork1 Profile Picture
    67,987 Most Valuable Professional on 24 Nov 2023 at 19:35:03
    Re: Extracting list of items from database

    I misunderstood your question. I thought you were trying to access information in a DB for a bot.  That is the process I described.  I don't have any experience at this point using Postgres.

  • pasccout Profile Picture
    4 on 24 Nov 2023 at 19:09:59
    Re: Extracting list of items from database

    Thanks.  So using the plug-in preview of Postgres directly within Copilot is not supported?

  • Pstork1 Profile Picture
    67,987 Most Valuable Professional on 24 Nov 2023 at 19:06:20
    Re: Extracting list of items from database

    Yes, I've done it. Basically you use a Flow to retrieve the filtered set of records and then use an Apply to each loop on the results to built out a table as a string using the Markdown language. You return that string and display it as a message in the bot.  Here's an article on the markdown syntax you use. Use Markdown language to format Power Automate approvals - Power Automate | Microsoft Learn 

    There is no way to return a data set as a data set to the bot.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 416 Super User 2025 Season 2

#2
trice602 Profile Picture

trice602 141 Super User 2025 Season 2

#3
Jerry-IN Profile Picture

Jerry-IN 68

Last 30 days Overall leaderboard
Loading started