Need: Each org admin will have the ability to create their own email reminder templates that go out X days or hours before a user’s appointment. Each org admin can create multiple reminder emails, and they configure when they’d like to go out (X days/hours before an appointment). I want this to happen seamlessly in the backend for all upcoming events, without having a button to trigger the action.
I believe I’ll need to use the backend API and recursive workflow but I’m having trouble piecing together. Would each email template need it’s own, separate recursive workflow? Or can I have one recursive workflow that works through every email template and every relevant user? Since org admins can create these templates on the fly, can a new template automatically be added to a an existing recursive workflow?
Thanks in advance!
You need to focus mostly on your data structure first. Each org admin needs to save the X days or hours amount as a number, and the option of days or hours as the interval.
When an appointment is booked a button is clicked. On that button click schedule the backend workflows to send reminders.
Yes, likely separate backend workflows for each email to be sent, but this depends on how you are sending emails and templates as you can likely just create a single email action using dynamic data related to the email templates. You are not using recursive workflows because you are not looping through a list of a single type of data…instead you are creating an appointment and then scheduling different emails to be sent, but if you are using dynamic data for the different email templates then you can do a recursive workflow to loop through the different email templates of the admin org.
1 Like
Very helpful. I understand your point about separating the day/hour amount and interval. And I understand that I can schedule the backend workflows when the “Schedule” button is clicked.
I’d like the org admins to have the ability to create new reminder emails on the fly without me having to go into the backend and configuring/tweaking additional workflows. Is it possible that anytime a new reminder email is created…it just works with additional manual intervention? I want to make sure it’s scalable. Thanks!
Yes…there are database trigger changes, which are a form of backend workflow, that when a particular data type is changed in some way can then trigger other workflows or just run actions.
So, if your database is setup properly, you can use a database trigger change and the important part is to setup the conditionals to be such that they indicate the database trigger change should only run when the data is a new entry…this could then schedule to run another backend workflow that is to send out the emails.