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.
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
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.
Thanks. So using the plug-in preview of Postgres directly within Copilot is not supported?
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.
Romain The Low-Code...
25
Pablo Roldan
25
stampcoin
10