I want to build a bot that allows a user to ask questions about a project. The project management system has a REST API with an endpoint for Projects and an endpoint for Time Entries. I can get the relevant data without any problems but I'm struggling to understand how, in Copilot Studio, how to summarize the result.
For example, I want to ask something like: "How much time was spent writing emails on project ID 100?" The reason I don't just do this in Power BI is because we need to look in the free-text notes field for this info. There isn't a pick-listed category for writing emails in the PM software - it may have been coded as Project Admin, but the operator would write in the notes that they were responding to an email or something like that.
Anyway within the Conversational Boosting topic, I can query the API in a flow to get all the time entries and return them to the bot and get data into a table variable, but for the generative AI to work the table must be in a certain schema with properties Content and ContentLocation. So.. I made that by concatenating all the properties of the time entries endpoint into a a string like this:
ForAll(
Topic.aTimeEntries,
{
Content: $"Date: {'Date Logged'}, Employee: {Employee}, Project Task: {'Project Task'}, Note: {Note}, Duration (Hours): {'Duration (hours)'}, Billable: {Billable}, Productive: {Productive}, Employee Team: {'Employee Team'}",
ContentLoaction: "https://something"
}
)
..but all I get are non-specific error messages like this:

It's really not obvious how you would do this in Copilot Studio. I have done the same in Azure OpenAI by simply passing the tabular data in text format like that and adding a natural language question like to it. Is Copilot studio even the right tool for the job? If so, how would you approach it?