I have a workflow shown in the image below where I would like to pull data a minute before a date is reached so I can send stripe coupons to users with the most votes. The reason why I need to do it before is because once the time is reached, the next competition starts and it pulls in the wrong data.
The problem I have is that I can’t figure out how to say that something needs to happen before a date is reached. The +minute, option is the only thing I see and I saw in another post to add a negative number but it doesn’t seem to work.
I guess I am curious if I am doing something wrong in this workflow or if there is possibly a better way to trigger this type of flow.
I think I can see what you are trying to do. Let’s see if we can help.
You would need to do this on the backend workflows. Do you have those enabled?
Backend workflows are workflows done on the server so someone doesn’t need to be on the page for it to trigger. You can schedule it to happen a minute before the competition ends if you want.
Now I am not sure how I get it to start running, or get triggered a minute before the competition ends. I tried setting the recurring event when the condition is true, but it doesn’t seem to work and I am not sure what I did wrong.
Unfortunately I wasn’t able to get that to work, but I figured out how to use the countdown plugin I have to trigger sending the email so I think I am good until I run into something more complex. Thanks for your help!
@J805 I finally made it work thanks to your example. My only question now is whether or not that data will change each week. I have put the source of the api data as dynamic inputs but I am not sure if it will run this search on the list every 7 days, or it will keep using the same data?
I just tested it and it looks like the parameters it sends don’t reset and get pulled in. Do you know if there is a way to reset those parameters and pull them right before the workflow is run?
Example: Week 1 the first user in the list is Joe and is sent an email. 7 days pass, now there is a new list and Ann is the first user in the list. I want an email to be sent to Ann but it seems like it keeps Joe as the user.
So you don’t need to pass those values back. You can do the search for them on the backend so it will be new each week. How do you determine who wins? What is your logic for it?