schedule api workflow

Schedule API: Turbocharge Workflow Efficiency for Success

Have you ever found yourself deep in the trenches of building a complex app, only to realize that your Scheduled API workflows are causing more headaches than you’d like to admit? Don’t worry; you’re not alone. 

In the app development world, especially when working on something as intricate as an onboarding and training app, optimizing Scheduled API workflows is like trying to solve a Rubik’s Cube blindfolded – challenging, time-consuming, and occasionally frustrating. But fear not because I will take you on a journey of discovery and optimization in this blog post. 

So, let’s tackle this problem head-on. I’ll share with you the strategies I’ve experimented with, the hurdles I’ve faced, and the solutions I’ve discovered. Whether you’re dealing with Schedule API Workflows on Lists or trying out recursive approaches, we’ll dive deep into the nitty-gritty details so you can optimize your workflows like a pro. 

Related Post: How to Setup an API in Bubble – a Step-by-Step Guide

Workflows in Need of Optimization 

When building our onboarding and training app, we realized that specific crucial workflows were in dire need of optimization. Let’s break down the core aspects that require our attention: 

Description of the App’s Core Functionalities 

In our app, two leading roles come into play: 

  • Product Specialist: This user creates and manages course content, modules, sections, quizzes, questions, and answers. They hold the key to delivering valuable educational material to registrants. 
  • Registrants: These users register for courses and take quizzes to gauge their understanding of the content. They’re the consumers of the educational experience. 

Detailed Explanation of the Problem 

  • Our app’s complexity arises from creating multiple data types, including Courses, Modules, Sections, Quizzes, Questions, and Answers. The workflow entails: 
  • Product Specialists make a Course that is the foundation for the entire educational journey. 
  • Product Specialists create Modules for each Course, breaking down topics into manageable units. 
  • Modules are then associated with Sections, forming the structure of the course. 
  • A single Quiz is created for each Section, with numerous Questions, each with multiple Answers, one of which is correct. 

Challenges Faced 

Scheduled API Workflows Dependency: Our app heavily relies on Scheduled API workflows to create the user-facing data for registered courses, causing performance bottlenecks. 

Complex Data Creation: The intricate relationships between data types result in a cumbersome data creation process, slowing down the app. 

When the Product Specialist is ready to launch their course, it becomes accessible to potential registrants. When a registrant clicks the “Register” button, it triggers a sequence of 4 Scheduled API workflows. Here’s what I’ve experimented with: 

Schedule API Workflows on Lists: 

So, imagine you’ve got this list of Sections, right? We’re discussing those course sections your Product Specialist has carefully crafted. What we do first is fire up the first Scheduled API workflow, and it goes through this list of Sections one by one. 

For each of these Sections, we create something called a “UserSection.” This UserSection isn’t a carbon copy; it’s more like a friendly pointer back to the “Master Section.” This way, we keep things efficient and avoid duplicating data. We’re all about saving space and time here! 

But we’re not done yet. After creating these UserSections, we’re not just calling it a day. Nope, we’re scheduling two more Scheduled API workflows to keep the flow going. 

Now, it’s time for the second act. Our second Scheduled API workflow kicks in, and it’s working with Modules this time. These Modules belong to the Sections we just processed in the previous workflow. Just like before, for each Module in the list, we create a “UserModule.” And yes, you guessed it right—it’s not a clone; it’s a neat pointer back to the “Master Module.” This allows us to display content smoothly through associations, keeping things tidy and organized. 

Now, let’s zoom in on the third act of this optimization saga. This one is strategically placed after the action that initiated the second Scheduled API workflow in our sequence. 

What’s It Up To? 

  • This workflow specializes in creating UserQuestions. It’s like building bridges between your app’s questions and the active Quiz within the current Section. 
  • Importantly, it’s not making copies of the questions; instead, it sets up clever pointers so you can effortlessly display the original content through associations. 

Once it’s done with its UserQuestion duties, it takes the initiative to schedule the fourth Scheduled API workflow. It’s like one efficient relay runner passing the baton to the next, ensuring your app’s workflow marathon keeps pace and stays optimized. 

3rd Sequential Scheduled API Workflow: 

The Fourth Scheduled API Workflow – Unpacking UserAnswers: 

Now, let’s unravel the fourth and final act of this workflow optimization masterpiece. This one zeroes in on a list of Answers, specifically those related to the current Question you processed in the third workflow. 

What’s Its Mission? 

  • This workflow is all about creating UserAnswers. 
  • For every Answer in the list, it crafts a UserAnswer, connecting it back to the “Master Answer” – and here’s the key: it’s not about duplication. Instead, it cleverly forms associations so you can effortlessly showcase the original content. 

So, imagine it like the finishing touch on your workflow canvas, making sure that your UserAnswers are perfectly aligned and primed for display, completing the cycle of optimization in your app. 

Going Recursive with Scheduled API Workflows – A Different Approach: 

Alright, let’s explore another avenue for optimizing our workflows – what we call “Recursive Scheduled API Workflows.” 

What Sets It Apart? 

  • Here, we take a different route. Instead of running the API workflows on a list, we initiate each workflow and pass in the required data type list it needs. 
  • It’s like having a conversation where each person brings their unique knowledge to the table. 

How Does It Work? 

  • These workflows have a clever self-awareness mechanism. They call themselves into action, but only when the underlying data type list is greater than one. 
  • If the list meets the criterion, it’s like inviting another guest to the party. But as a good host, we make sure the guest list isn’t overcrowded. So, when the list gets down to one, we gracefully bow out. 

Let’s look at the first workflow in this sequence. You’ll notice an extra touch at the end: it schedules another API action.  

Now, let’s test our workflow optimization methods, shall we?  

For a course with this specific volume of data: 

  • 1 Course 
  • 2 Sections 
  • 5 Modules 
  • 2 Quizzes 
  • 20 Questions 
  • 80 Answers 

The “Scheduled API on List” method clocked in at a reasonable 2 minutes and 3 seconds to complete. 

However, when we tried the “Recursive Schedule API” method for the same course, it took a tad longer, at 2 minutes and 30 seconds. 

So, there you have it – a side-by-side comparison of the two methods in terms of time and efficiency. We’re getting closer to finding the best approach for our app! 

Final Thoughts 

Optimizing Scheduled API workflows can be like a puzzle, with each piece forming a vital part of your app’s functionality. In our quest to enhance performance and efficiency, we’ve explored various methods, from Scheduled API Workflows on Lists to Recursive approaches. Each has its merits, and the choice depends on your app’s specific needs. 

But remember, this journey doesn’t end here. App development is a dynamic process, and optimization is an ongoing pursuit. The key is to stay curious, keep experimenting, and never settle for less than the best for your app and its users. 

At BubbleHelpers, we’re here to assist you with your no-code and low-code app needs, whether you’ve encountered a tricky API problem, want to infuse AI into your app, or need support for building that exciting new feature. 

Has your last Bubble developer mysteriously vanished? Are those persistent bugs refusing to budge? Remember, BubbleHelpers is your go-to partner, available anytime you need it. So, don’t hesitate to reach out and let us help you unleash the full potential of your app. Your journey to app greatness is just beginning!   

Similar Posts