Skip to main content
Community site session details

Community site session details

Session Id : tvSypiSwG8mSCyvW9Lmj3P
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:
  • 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,228 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,228 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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 468 Super User 2025 Season 2

#2
stampcoin Profile Picture

stampcoin 52 Super User 2025 Season 2

#3
trice602 Profile Picture

trice602 46 Super User 2025 Season 2

Loading complete