Hi All,
I’ve seen this question asked a few ways recently but I don’t believe I’ve seen a solid answer. I’ve been able to use the API to send emails, both in real time and in the future with no problem. What we are struggling with though is a scenario like this:
Workflow does a search for records meeting a criteria. For example, any user with a certification in woodworking.
API sends out an individual form email to each of the 12 hits on the search telling them their certification expires in 72 hours.
Has anyone cracked the code on this? Thanks!
Just to clarify, you have two issues:
1.You need to automatically schedule workflows when a users certification is about to expire
- You need an individual email out to go to every user who meets this condition
Is this where you’re having issues?
Hi Alex,
Thanks for your response. It’s the second issue. I am struggling to get Knack to send individual emails to each record that matches a condition.
Craig
I see, how does your application know on what date a certification expires?
Does the user enter a certification along with an expiration date?
I was just using that as a generic example. This would be for any type of criteria, either time or field based, I can get it to identify the list of records, just missing the “here are the 12 records that match the criteria, sending an email to each one” part.
Craig
Okay, knowing more about the app itself helps when thinking of solutions
For instance, in that generic example. If a user input told me when a certificate expired, then I would schedule my workflow at that very moment
where the scheduled time is expiration date - 72 hours
Knowing the situation better, I might do it differently. But in many cases its easier to schedule the future workflows that way, than to have a condition constantly being checked.
If the issue is just finding these users, then maybe you could create a custom state for the users in the database. Something like “Certification almost expired” = true/false. You could schedule that condition to change and then search for them.
Hi- I’ve got that part handled. I just can’t get it to fire off individual emails to each matching record.
@craig.davidson If you are able to find them via search,
can you dynamically fetch a list of emails for the email input? Each user on the list will get an email.
Unless you need to have each email be different in some way, I think this would work.