Hope everyone is doing good
Quick Intro, I have a decent amount of experience with front-end development, however, not as much with backend development. Although, I can figure out how to get what I have in mind to work in a couple of hours, I am looking for the most optimal Database architecture and backend logic for this flow.
Context:
When a user signs up part of the information we store from the user is what educational courses they are taking. This is a critical piece of information because we use this data to build out a daily lesson for each relevant course that they are taking. The lesson content is mainly text but can contain mathematical expression which I parse using MathJax. The lessons’ knowledge bases are GPTs that I have created on OpenAI and connected to my Bubble app using a great plugin called LLM with Streaming by Paul G.
Problem
There are 2 lists in play for this recursive workflow I am lookin to create. The list of courses that the user selected while signing up and the list of topics inside of the knowledge base for each associated lesson GPT which I manually extract each time i add a new GPT.
In summary:
I am looking to create a daily recursive workflow for each selected course by a user and each daily lessons content is determined by the current days topic extracted from the associated GPTs knowledge base. So just to emphasise that’s a recursive workflow on 2 lists.
The kind of responses I am looking for ( please feel free to not answer every category but if you specialize in at least one of them, your recommendation would be appreciated):
Recommended Database architecture
Recommended backend logic
Important parameters to pass through assuming we use API workflows
Potential pitfalls to avoid infinite loops
Hey, based on what you have said, I think a good start point would be something like:
each user has several courses
each course has several topics
each daily lesson is associated with a course and has several lesson content that is associated with each topic
workflow
a- for each user - sched b on a list | sched to run itself tomorrow
b- for each course - create daily lesson to the user | sched C
c- recursive workflow - for each topic - generate a lesson content and attach to daily lesson
Let me know if you need further help
I have a data type ’ Course’ with fields assistant_id (text) , current topic (number), topic list (list of text) and current topic text (text). I have an API workflow called ‘change_topic’ with parameters course_index (number), Course (list of Courses) and topic_index (number). I am looking to build a flow where for every course in the database we create daily lessons using the current set up. So what I have done up to this point is the first action of the API workflow change_topic is to make changes to Course action where I modify the field current topic to be topic index value (therefore a number), i then modify current topic text to be the item# in the list ‘topic list’ correspeonding with the topic index . I then schedule the API workflow againi to create a loop that updates every 24 hoursand ensures tha we do this for every course in the database. Would you like to suggest a better setup because as it stands i can’t seem to set the current topic text to being a single value rather it just becomes the entire topic list for that course.
Here is what a single loop outputs in my database
This is what my API workflow looks like
This is the action that’s not saving properly (please database screenshot struggling
and this is how i increment to the next course and topic inside of the topic list