API workflows scheduling themselves

28 PM

It would be really great if API workflows could schedule themselves directly or indirectly. I’m creating a draft process much like fantasy football/basketball systems work. For this process to run perfectly, autopicking needs to be triggered when the picking time runs out. Triggering this from the draft page itself causes problems since users NEED to be on that page for the API workflow to be scheduled.

Is there a possibility you can open this up in the near future @emmanuel? Indirect scheduling would do the job.

Also, has anyone found a workaround for this?


1 Like

Can you use the “Set/cancel a recurring event” function ?

No. Users get 2 minutes to select there pick.

Ah, I see so this is a “make your picks in the next 2 minutes or we will do it for you”.

Schedule the workflow 2 mins in advance, and then cancel it ?

Or have the workflow check to see if it is needed when it runs. Or both, to be sure.

Exactly. I have the “Schedule the workflow 2 mins in advance, and then cancel it” and it works perfectly. The problem is that once Pick 1 has been made, I can’t trigger the autopick function for Pick 2 because I get the error scene above.

Am I starting to make sense?

Kinda :slight_smile:

How many picks are there ?

Why do you have to schedule one from the other ? Can you schedule all the autopicks in advance, then cancel them one by one ?

Sorry, I know you will have been through all the options before !

5 per person. There ranges from 4-8 people per draft. So anywhere from 20-40 picks.

If they were all auto picks then I could schedule all of them before. The problem is a user could take only 30 seconds. Then users would have to wait 1m 30s before the next pick begins.

My hopefully temporary solution is to generate the auto picks from the draft page itself. The problem with that is that at least one person needs to be on the page at all times.

No worries man. I appreciate your time!

Aha (again).

So you need to chain these together somehow ? But to do that you need to be on the page ?

Exactly. Once pick 1 has been selected (either by the user or automatically), then next pick needs to become available.

So the way I have it set up temporarily is that the draft has a number field called “picking step” and a data field for the “Current Pick”.

Once pick 1 has been selected, it goes through 3 steps. Once it gets to step 3, the next pick becomes the Current Pick.

Once this happens, thw picking step is 3 in the database and the now Current Pick does NOT have an autopick api workflow scheduled.

When a user is on the draft page and the above is true, the autopick api workflow is scheduled and saved in the Current Pick.

That’s how it is temporarily but it’s not too stable as previously explained.

We can open this for dedicated customers, on the main cluster we need to keep this protection currently.


That’s unfortunate but makes perfect sense. Thanks for the response.

1 Like

Just decided to add 40 separate workflows that link together. Works perfectly.



Haha gold,
I had a similar problem.
In my case the user is sending reminder emails.
The reminder email should send every 3 days until the reminder recipient cancels the reminder or completes the action.
I was running into the same restriction on workflows scheduling themselves.
Would be good to have this as an option in the future.
Understand wanting to avoid infinite loops.
Would be good to have the option however.

I’ve solved for now with many many API endpoints in a sequence.

1 Like