I have two data points that I’m trying to turn into a schedule of API workflows that sends out a mail at a specified frequency. The end user has filled out a few fields contained within a Data Type:
Recipients (list of User’s and their email addresses)
Frequency (number of days between each distribution, for example 7 days for weekly email)
Start date: First date of sending
So, I need to set up API workflow that sends out a mail on the Start date, and every X day thereafter. I realize this would basically make up an infinite amount of workflows, so it might make sense to split it into two workflows (send mail every X days until Y, and then at Y set up a new workflow).
Thoughts? I haven’t used scheduled workflows before, so I’m hoping to set it up as efficiently as possible – which is why I’m resorting to the forum first
I did, by changing the approach a bit. Instead of scheduling X number of mails in advance, I only schedule one, which then schedules the next after it’s sent, and so on.
I keep the scheduled time up to date by updating a field called “Next publication”, by adding X days to the last publish date.
Sure! Could you describe just what you want to accomplish? There are several aspects to this, so it will probably be easier to follow if I can display just the part you actually need
Wow, that’s was a really fast reply.
So, basically idea is quite simple: there are list of “events” which has a deadline date (up to exact minutes) and users can “subscribe” to this “event” by entering their emails.
And what I’m trying to achieve is:
When deadline for “event” is reached - set Expired to YES
When deadline for “event” is reached - send email to email list with “event” text
I’ve already create workflow so users email adding to database, but I’m really lost in this “automation” part.
Configure your app to use API workflows (if not already done) - Done
Set up a workflow that emails the user, and sets Expired to YES
Well, this is something that I’m trying to achieve for the last couple of days.
On which page I should create this workflow?
This workflow purpose to receive some parameters: 1) which “event” should be marked as expired and 2) which email list should be used in email sending
And how should I pass those parameters in this workflow?
This is something that Documentation - Video lessons is really need.
On which page I should create this workflow?
This part is a bit confusing the first time, but you will find the API Workflow editor in the same place where you find Pages and Reusables:
The reason you need to build this workflow in the API editor rather than on a page, is because the workflows you place on pages are dependent on that page being open. In other words, if you close the window, they wont’t run. API workflows on the other hand, run independently. Instead of relying on elements on the page and user actions, they rely on (as you say) Parameters.
Set up workflow
You set up a new API workflow by clicking on:
Thank You so much, petter.
This is something that should be in those Lessons! That’s for sure!
I think I’ve started to understand the philosophy of Scheduled API.
The last this that I might missing is: how do I change for example: Expiration parameter for specific “event”?
Should I implement and add some kind of ID (probably unique) for each event and do a search or there some more simpler way?
In that case, the parameters would be the Event itself (a unique ID is already automatically added to all entries in the database), and a User, probably fetched from Current User.
So the API workflow receives the following parameters when you schedule it: Event = Current Page’s event (or wherever you choose to fetch that info) User = Current User
And the workflow changes the Event->Expired? to “Yes”.
Your manual is truly helped me a lot.
I’ve managed to do this with “Event” as an object.
I have a very last question, but it’s not regarding this topic.