API workflow to change thing when condition is met

Hi all,

My app is a job board and I have the following 2 fields on every job

- Status
- Expiry date

The status field is a text field that would normally be set to “Live”. I would like this to change to “Expired” when the expiry date is reached. I figured this would require an API workflow so I’ve setup the following but it doesn’t work.

Any ideas where I’m going wrong?


Right now it looks like you have an API workflow that will change the status of any job that meets your particular condition (where Expiry Date is < Current Date/Time). However, that API workflow will not run until it is scheduled. So what I would do is schedule an API workflow to run at the time of the expiry date when the workflow to create the Job is run. It could look something like this:

Create Job with expiry date ==> Schedule API workflow to run at Expiry Date

All the API workflow would have to do is change the status for this job rather than searching for all jobs that meet the condition you described.

An alternative way could be to set up a recurring task that searches for all Jobs that meet the condition of Current Date/Time > Expiry Date but this may be more resource intensive.


Thanks for the advice. Makes sense. So would your first suggestion be quite resource intensive too, if it was constantly running API workflows?

I wouldn’t think that it would be, because it would only be running one workflow for each Job that needs to be modified, as opposed to the second method that would be running workflows constantly at a regular interval regardless of whether there were any Jobs that needed to be modified.

Ah great! Thanks for the advice. So going by your first method. Is this setup along the right tracks? I feel like I should be triggering the workflow outside the API?

This topic was automatically closed after 70 days. New replies are no longer allowed.