Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Unanswered

Extracting list of items from database

(0) ShareShare
ReportReport
Posted on 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 at
    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
    66,285 Most Valuable Professional on at
    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 at
    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
    66,285 Most Valuable Professional on at
    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Copilot Studio - General

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 25

#1
Pablo Roldan Profile Picture

Pablo Roldan 25

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard