Brain fog here, sorry, but here is the scenario, I’ve created an AI chatbot that can interact with loaded database information through magic text.
So say the app has a teacher, that teacher has multiple students, in the magic text, how do I go load the teacher - Student names, emails, grades, and anything in their data.
I was successful in loading numerical staff related them, but not all their names for examples, anyway to do that ?
As one teacher has multiple students, you can access the records using a list (of students filtered by teacher).
If you’d like to combine information from multiple records in a collection, you need either to use a 3rd party tool like Make to get data from Adalo db and aggregate it, or use some kind of custom component which can do that, or use another backend like Xano and use functions there.
Hi Victor, sorry to bother again, would you do it this way? or would there be a better way ? I love simplicity so I m trying to create it that way:
My AI component Chatbot gets its magic text from :
A simple text ( hidden ) component, with an action to Make to get an Adalo list of records and update another Adalo record id ( a new Collection just for that called AI info )
Then another hidden text component loading that AI info records through magic text, which is than loaded into the AI component.
I’d do that as an explicit custom action call (say, on a button) and reply. As far as I understand, you need to select some records from the collection and have one combined string as a result. So custom action params should be a filter criteria, and return param is string.
Then, on Make side, you have a webhook + Adalo API call (filtered API call so that you don’t list all records and filter them later, there is a limit of 1000 records for GET ALL), then iterator + text aggregator (you iterate records and aggregate fields which you want).
As a result you’ll have an aggregated string, which you eventually can send back to Adalo in a webhook response.
Such Make scenario will consume only 5 Make operations per run and 1 Adalo action per execution. In your scenario, if we assume there are N records which correspond the criteria, it will consume 1 + N Make operations per run and 1+ N Adalo actions per execution.