Backend workflow to create a new list daily

I am building a news aggregation site that displays five new articles daily at 8 am PST.

When the page is loaded, a custom state is created that pulls the most recently created Daily Article List and serves that list to my reusable element “Article” to display the articles.

I am struggling with the backend workflow. I’m not sure I understand the logic of parameters, passing data from the front into the backend, and how to trigger the workflow.

To clarify, I would like the backend workflow to create a new Daily Article List each day at 8 a.m. PST.

Here is a picture of the workflow as it stands.

In step one, the workflow creates a new Daily Article List. In step two, I tried adding five random articles to the list created in step one.
Screenshot 2024-06-24 at 5.55.48 PM

To test this workflow, I am using a button on the main screen to schedule the workflow at the current date and time.
Screenshot 2024-06-24 at 5.58.46 PM

When I do this, a new Daily Article List is created, but it only includes one article instead of 5.
Screenshot 2024-06-24 at 5.59.42 PM

Any thoughts on where I’ve messed up? And once I can confirm the workflow is working correctly, how can I set up to occur without pressing the button each day?

This part is easy.

Once you know that the code works as you want, just add a final step to your workflow to schedule itself at current_time+hours(24).

You will still need to manually start it on your live side, but after that, it will reschedule itself whenever it runs.

To make sure it runs at the EXACT same time every day, you may want to use current_time replace minutes with 0 replace seconds with 0.

Awesome! I imagine I’d just use the same button and make not visible on page load?

Any idea on the backend workflow? Still struggling :frowning: