Customizing outgoing email
00:05.46
Chris Morrell
All right? welcome back to another episode of overengineered the podcast where we ask the very important question. What's the best way to do things that don't particularly matter I am back with my friend skyler and Bogdan and today we are talking about. Ah, customizing the way you send email from your application. So everything from ah you know how do you change the email recipient. Ah and how do you change the content how do you make the content previewable um and ah potentially how do you even change like the logic behind when and if content gets sent um and I think ah this is something that you know we've bumped into in various different ways and some of it. We've sort of been talking about. Well in the future. We see a case where it's going to get even more complicated than it is um, but so far I think we have a pretty solid solution for one one piece of this puzzle but it definitely falls into that category of things that you just kind of run into in different ways and. Sort of solve ish. Um and move on and so I'm excited to try to think of ah a better way to approach this but um, before we get going. Um I feel like we've each.
01:37.64
Chris Morrell
Approach this problem in past projects differently. So I think it just be kind of interesting to talk about those experiences and then move from there.
01:46.72
Skyler Katz
Yeah I mean I think we one one thing that um, that I've experienced before is you know we had a situation where a person was getting reports from our system like new user activation reports and they were going on leave for over a month. And someone else needed to get this email. Um, and also the person that was going on leave like they didn't need these emails when they got back. They don't need daily active user reports from a month ago and so we were like I guess we'll just like have to remember to deploy. Ah, change to the configuration of who gets this email. Um, you know like it would have been great to have some sort of vacation mode like from the ui where they could just turn off the email. Um, and someone else could turn it on or activate it. Um.
02:35.65
Chris Morrell
Right? Or even be able to like set vacation mode and just enter in the the like who should receive this while I'm gone that would be pretty cool.
02:43.22
Skyler Katz
Yeah, and we never like I never built that but it would have been it would have been a great a great thing to build I have built a system to like customize what the email says when it goes out but I think bogged in has as well if you want chat about your. Solution. There.
03:02.48
Bogdan Kharchenko
Ah, yeah I mean so going to the first point about kind of how do we manager? keep you know like a custom recipient list of who the emails goes to I think like one of the ways that obviously that we will try it is you know or you you write some dirty. Ah, email in a text file and you read from that text file and that's your first iteration but you know one of the ways that I've ah was able to manage to solve it was you know I would tie the emails that are going out to like or to like a specific. Permission. So for example, like in your case Kyler maybe there's a permission that says like receives new user alerts and let's say you assign 10 people to that permission and all you would have to do is when the email is getting queued up and say hey give me all of the people who have those. Permissions and then you can just send out. You know those people the email itself and 1 of the benefits of that is that if someone ends up like leaving the team or maybe temporary leave. You could either like deactivate their account remove that permission. There's. Multiple ways of kind of like well this person's gone for a month they may not even have access to the system and you know that's one way to manage it and it kind of falls in nicely whereas. Um you know you could just say like well I just want to deactivate this person and whatever.
04:31.58
Bogdan Kharchenko
Permissions they have whatever emails they have they were they would be getting. They would just simply be gone from them. It's kind of like a nice fell swoop. Um and to the second point about the email customization. Ah the content. Ah, one of the ways I did it was. Um, you know this was early on and I feel like I didn't have like a really good concept and like email templating engines maybe mustaches like 1 of them that we could talk about later but you know I basically adopted like a pretty you know I guess. Um, pretty um was the word I'm looking for um I don't know ah simple yeah nomadic or I don't know just like very crude version of here's a variable in a template.
05:14.19
Chris Morrell
Simple straightforward.
05:25.85
Bogdan Kharchenko
And we're just going to replace it with some sort of variable that comes from like a Php file so it wasn't anything um that could actually provide like logic like hey if this is set then show this or here's a list of items. It was just like a pretty basic search and replace effectively. So ah, you know I I always felt like that solution was um, very developer intensive like I was the only one who was able to like really um, configure this stuff even though there was like a ui um element where you know you could write html and you could see. You could write the html itself and see an instant preview but I always felt that that for the end user. It was super technical and um, you know it was almost like I think towards the end of working with those email templates I actually converted everything into Pgp back into blade templates or markdown because. I would be customizing that stuff anyway, um and ah rather than giving some sort of like choice of email templates I just said well there is no choice. This is all you get because it was just so it would end up being a little bit of a headache to be honest. Um, but yeah, so that's kind of like the 2 approaches for customizing the recipient list or kind of controlling that and how do you customize the content of the email itself that I've kind of run into. So.
06:49.60
Chris Morrell
Yeah, listening to this I Actually think there's sort of 4 pieces that have come up in in various ways for us. Um, the sort of 3 that I already talked about um, but also there's this fourth piece of um how do you let. Non-technical users on your team preview emails. Um, even if they can't edit them. Um, but you know if you're just talking about a traditional Laravelle Mail ball. Um, that's going to need to. You know it's going to accept some real. Arguments that are often models or other you know relatively complex data structures. There's potentially going to be some real logic in there to determine you know, either at the view level like you know some conditionals about what what parts of the Message. Um. Being shown depending on on the data or um or you know or even just like in the mailable itself determining which view it's going to Render. Um, and so even just this question of you know this came up for us pretty recently a staff member was just like I want to see like what. New Members receive and um, it's not like you can just grab that blade template and render it right? You know there needs to be there needs to be a step ahead of there where either um, you know where you're sort of.
08:23.76
Chris Morrell
Creating some test data and maybe even multiple sets of of like preview data for a given mailable to account for the different like sort of scenarios that a person might receive that in um or like if you really wanted to go over the top give um you know give. Staff member a way to to like almost like um, have either of you used a cash.. What's it called a storybook for react. Um, you know where you can preview different stories of components and like the way that works is like.
08:52.99
Bogdan Kharchenko
Yes.
09:01.75
Chris Morrell
The different inputs to those components are like wired up to these like tools that storybook provides so that the ah the user of storybook can just enter like a name in a box and see how that'll look or like Toggle a switch to. To set like a Boolean true or false and like um, you know that's that's talk about overengineering like that's certainly overengineering. But um I could imagine a world where that would be very cool. You know to be able to just say like okay this mailable takes these values and. Um, let then user just plug them in. You know here are the defaults. Um, but yeah I I would say the the part of this that I think we have a pretty solid solution for is who receives what right? So you know in the early days. All of these sort of staff Reports. You know, New User report or something like that. Um would just have the recipient hardcoded and in the message. Um in the in the mail bowl class. Um, or you know, maybe you know we were just hard coding the recipient in the like. Mail to and then we just put in a staff email address and then new. Ah, New User report mail. You know, um, and obviously that started to feel fragile pretty quickly and like um we switched to so to this concept of like recipient groups.
10:34.34
Chris Morrell
Where there was a config file and you could go into the config file and there were different named recipient groups and you could add or remove different um different folks to different groups so that you know these 3 people want to get this mail and these 2 people want to get that mail. But again, it's you know. What? Ah Skyler was saying at the beginning every time we needed to change who received what? Um, that's a whole deploy and that's not the end of the world. It's fine, but ah it got annoying. Um, and so we implemented I think bodin you implemented this right? configurable.
11:09.83
Bogdan Kharchenko
So yes.
11:12.53
Chris Morrell
Yeah, so um, ah well go ahead. Why don't you talk about how how configurable recipients works right now in our app.
11:19.26
Bogdan Kharchenko
Sure, um, so I think like 1 of the main challenges that we had to solve early on was the actual like admin ui right? and I'll kind of step for for that from that perspective first. And one of the ways we kind of do this. We just say we just query. We just kind of search for all of the files that are extending like a mailable class and we're talking about a lot of learnable project here and ah we basically present it on like an index page for a user for the administrator to kind of control. Or to see which mailables are configurable and we allow the administrator to go in and select a user or multiple users who receive this mail. And then when the email is actually sent all we're doing is matching um, you know the class name of that mailable to you know all the recipients that are configured for that mailable and that's how we're able to control um from kind of like a nondeployment side. Um, you know from the like a ui who is getting what email. So I think like it has been working fairly well for us I think there's a few small things that um, you know, still need to be ironed out in terms of um.
12:45.80
Bogdan Kharchenko
1 of the things that Skyler mentioned for example, like a vacation mode or if somebody is leaving or someone else needs to get these emails like we um sometimes forget to go in there and change the recipients. Even though it's easy. Um I still feel like we're sending some emails to people who shouldn't be or. Vice versa. Um, so I think there still could be ah, some improvement on but overall I think you know it's a major leap forward and you know deploying email address changes instead. So okay.
13:22.30
Chris Morrell
Um, yeah I mean I could see pretty easily adding some concept of like recipient groups right? Where um, you know, kind of like what we were doing before with these arrays. There could be a billing group and this is you know that's folks who receive. Billing related emails right? and there's like um like tech support group or whatever right? And that's people who receive tech support ah type emails and then instead of having to go and look through the different ah messages that are being sent and and decide like where do I add this person or or. Where do I need to go to remove this person. It would be like you could add or remove a single user to a single email if that makes sense but you could also add or remove a user to a recipient group and then any message that goes to that group would also go to that user I think that could be a nice addition.
14:15.81
Bogdan Kharchenko
Yeah I think it kind of complements what I was mentioning earlier like you could have some sort of like group or permission that you know a user is assigned to and then that way we're just fetching data from that.
14:17.89
Chris Morrell
Um.
14:32.73
Bogdan Kharchenko
You know we're fetching the users based on that rule or that permission or group. It's a little bit more flexible. Almost you know where you could be like well here's 10 people in this group. They all get these emails. So.
14:47.80
Chris Morrell
Um, yeah.
14:47.93
Skyler Katz
1 thing that 1 thing that this also kind of helps solve for is like um you know at a previous shop. We had multiple staging environments that were connected up to real sendgrid credentials because we wanted to make sure like things were actually being sent and but we were like hard coding emails. Email addresses in so then like you know our billing manager was getting these emails from staging data and being like what um I can't set up this account like 1 2 3 main street like what city like what like so then in our email templates we had to be like if environment not production. Like add this huge red block that just said like staging environment like you can disregard and like that's it was just kind of gross and so being able to you know and so some of the emails like we would store the email addresses in ah our environment file like a new recipient email address. And and like that stuff just floods up your environment file with all these emails and then like you know, not everyone on the dev team like has access to the environment rightly. So so then like you know your lead developer or your devops person has to go into the environment and update the config when. Someone on the sport team leaves the company and but it's just it's such a mess. Um, and so this approach where you add a trait to the mail and then we're using reflection to just like find all of the mailables that have that trait and let that then be powered by the database it it was.
16:21.97
Skyler Katz
A very cool feature. Um to see.
16:26.18
Chris Morrell
Yeah, and just to be clear I mean how this works ah, ah, Bogdin's right probably the hardest part of this feature was um, you know, essentially making the index page that shows all of the mailables that implement this trait that use this trait. Um, but you know with that out of the way really all this feature is is just a table. Um, that has one column that is the fully qualified class name of the mailable and 1 column that is um, the recipient you know in and in our case, um, that. It actually has 3 columns. You can either configure an email address directly or you can point to a user um excuse me and that way if the user changes their email address. They continue to receive um any mail that's configured for them. But. If something needs to go out to someone who doesn't have a user account. We still ah handle that scenario. Um, but you know the the actual technical implementation is not that hard. Um, but it definitely was a huge quality of life improvement. Um. And I think I can imagine sort of a similar approach to some of these other problems where you know potentially a maileable. Um, right now could essentially ah pull in like ah you know has preview states.
17:58.27
Chris Morrell
Or maybe that would be an interface or something like that and then you just um, implement like a public static function. That's like get preview states and that just returns an array that's keyed by like the name like a label or something like that. And then the value is just an instance of the mailable with all of the data that the mailable needs set up and in there like you know because we we could just be loading that in the moment of preview. Those objects don't actually have to exist in the database right? You can just new up some temporary models. Um, you know do like a factory make instead of a factory create and just set the data that your mailable cares about um and then if there's like a major conditional where someone wants to see both. Both cases like you just return 2 different options one where the condition was true and 1 where the condition was false and obviously for more complex logic setting that up would be a little bit annoying because you might have to set like 3 or 4 nested relationships. Perhaps. And I can see you know the drift would probably get um also to be a problem because realistically you're going to forget to update those when you update the ah you know the the email contents. But um.
19:30.85
Chris Morrell
Said I I can see that being a pretty good solution to the to the preview concept and then you just do the exact same thing you just use um reflection to find all the mailables that implement this interface and list them and then when you Click. On one you know it just loads up the state and and just renders it. You know.
19:52.26
Skyler Katz
Could you could you just use reflection on all of the mailables infer the parameters and like oh it's a model just do like a in random order first model and return it and. Or like if it's a Boolean Just return a true or something like we like you could just potentially use reflection to dynamically generate all of this stuff. Um, and maybe there's a way to override it like there's a oh if you have like. Preview data ah set then you can use that to kind of like help prevent some of the drift that can happen when you forget to change something.
20:41.30
Chris Morrell
Yeah,, that's smart because ah, you know my initial reaction was like that's great for models and strings and booleans. Um, but like if you're passing in sort of like a dto or or some more complex like custom. Data structure that's going to fail but as long as you have a way to like provide that and you could even um, you could even instead of like returning the whole mailable. You could just like almost think of it as like a. Data provider like test in testing where you're just returning the argument name and value and that way like ah, you're just providing the default that like we're just matching back to the name of the argument through reflection and that way like yeah, even if the. The mailable changes if you only need to customize one of the objects that it receives like then you're you're mitigating that even further I like that a lot.
21:49.45
Skyler Katz
Well, unlike so much like I would probably say like 80% of Mailables have like a user and like maybe another model you've got that 20% that yeah has like a special dto and is doing like some extra stuff. But so many mailables. Are just like who is the user that's going to and it's like hi bogged in like your account was passed due and like maybe there's a subscription model that's being passed in but like there's not so much stuff. It seems like you could just kind of use use reflection and then have that. That extra space extra function for for the 20%
22:29.67
Chris Morrell
Right? And even like have some heuristics where it's like you know if the argument is sense right? We know that that's like a money amount and so like maybe give some reasonable value and like. If it receives like a user and a subscription. Maybe we find a user and then pass in that user's active subscription because like I could see if you're just like if something takes a user a company and a subscription and you're just passing in like a random one of each of those.. There's a good chance that like. The mail bowl is going to blow up because it's assuming that they are related when they're not usually that's probably not a problem because they're going to be loaded through relationships Anyway, um.
23:07.85
Skyler Katz
Yeah.
23:18.90
Skyler Katz
And you could always like make a test that says like mail can be previewed and it loops through all of your mailables and like calls some render preview button ah method that we provide and that way like if something breaks because you've changed like that would prevent some amount of drift.
23:35.80
Chris Morrell
Yeah.
23:36.91
Skyler Katz
Or like some special thing if like oh the defaults don't work here I've got to go in and ah you know configure The the preview data.
23:47.14
Chris Morrell
Yeah I mean my only hesitation here is um, this this is ah this is reminding me of that time. This is pre skyler but when um, ah, Daniel wrote this whole. Thing that like lets you preview all the blade components ah being like well if we could just see all the blade components. We'd actually like use them more and we'd know how they look and how they work and like that whole thing got into production and. No one has looked at it since.
24:21.22
Skyler Katz
I did look at it in the first week I was here and then I was like all right cool and now I've properly stopped looking at it.
24:28.86
Chris Morrell
Okay, well there you go. That's something.
24:30.80
Bogdan Kharchenko
Um, well I I think I think you know as far as the you know the component previous stuff that Daniel has worked on I think one the um one of the things I was trying to solve. It was just it was great like Skyler said to get up and going seeing what's. You know in the system but like once you're working with this code all the time you kind of are familiar with all of the components and you know you you just feel more comfortable whereas the mailable stuff. It's a bit hidden and for us it may be obvious even though sometimes it's hard to figure out. Um you know. Which emails exist. But I think for staff particularly which I feel like most of the requests come from. You know they want to be able to kind of figure out when ah or like how an email looks like that is sent to a user and one of the ways they do that right now. Is someone replies to them with that email and they're like oh well that's how that looks like you know we don't have a really good story for our staff members to actually see what those emails look like when they go out. Obviously you know we try to. Make sure that the text that we put in there is something we all agree on but I think ultimately you know once we deploy that mailable nobody has any idea really what the final look and feel is um, you know sometimes we try to do good at that. But I think overall like people. Forget.
26:00.50
Bogdan Kharchenko
And you know you just even if you showed a screenshot of it. You know, two months later no one's going to remember how it looked like so I think I think it's a little different than having um a useless component preview I think it's valuable to have. Um, you know this mailable preview.
26:19.47
Chris Morrell
Um, yeah, it's just a question if if people use it or not.
26:20.92
Skyler Katz
You know I came across a package the other day that has been archived on on github as like no longer maintained but it would store a copy of the email content as it was being sent to the individual user. And it the purpose of that was that there it would inject a view in browser link. Ah so that if you like didn't want to read the email in your email you could you could read it in the browser but it was just like per user it was storing this in the database. Um you know and. It kind of came up where someone on staff was like what did the email say for this particular customer who like their account was passed due but they were still in a grace period. But I don't actually think they were still in a grace period. But they said that the email had this information and so kind of the ability to store like what did. What did this user get at this time like what was the email copy when they got it versus like oh like we changed the email copy and now two weeks two weeks ago it it said something different and you know it's kind of interesting approach to like store. The actual email content. Um and not just you know, not just data about like opens in and clicks.
27:39.91
Bogdan Kharchenko
Random dito. Yeah I mean I personally think that's a really good idea to do that for like auditing purposes because yes templates do change and you know that mailable that we created six months ago had text updated a week ago and nobody was notified. And I think it's a good idea to you know store a copy of that content. Um, yeah I mean maybe that's even a better solution like if we were to send a bunch of emails to people and we had the content of those emails and maybe the previews are just you know and you know like a single. Ah, email that we randomly select that was sent within like the last week and that's how emails look like and rather than like creating this interface that or some trait that you know you would have to like you know create a random model and random data. Maybe that's like an easier solution. But.
28:43.47
Chris Morrell
Yeah, and you could even just like just prune the data. Um, so that there's only say a hundred copies of any given mailable or you know so whatever. The the threshold that we want I mean I'm generally. I have generally become a believer and just keep all the data all the time because there have been so many times that I've been burned by not having ah something to refer back to but the contents of every email message that we send out is maybe a lot but um I do I do think I think. Having that for auditing you know when you think about it from an auditing perspective. It's useful to be able to go back further but just from like a debugging and previewing perspective. You know as long as you have a couple even you know 10 or whatever copies of any given message. Um, then? yeah for someone who wants to see like oh what does this message look like they could click through to that mailable and then essentially just have a dropdown list of you know the last 30 or last 10 or last hundred who cares right? copies of that message and they could just you know. Tick through those to take a look at it. Um, and then so long as we're keeping them. You know, maybe we keep them around rather than keeping some set number. Maybe we keep them around for two weeks or something like that or four weeks or something like that that way you know if a staff member is in that situation where it's like.
30:18.15
Chris Morrell
What what did this email like I just talked to someone who said they got an email yesterday. Um, or they got an email two weeks ago or whatever you know like they'd be able to view that that message directly as long as it wasn't too old. Um, and that would be. You know the only the only situation where that wouldn't work is like for messages that only go out once every six months or something like that things that are really rare but those are kind of inherently going to have less of a need for this type of um, review. Because those are almost certainly going to be like internal messages that like you know, maybe just have like an ah excel spreadsheet attached to them or something and it just doesn't matter what the contents is very much.
31:08.27
Skyler Katz
Well and your you know your pruning could be it. It could be like keep the last 50 emails that each user receives or like keep the last 10 emails that each user receives because then someone who got an email that. Goes out every six months like it's going to still be in their email history until they receive their eleventh email or something like that as opposed to just just pruning based off of the create date of the of the email.
31:33.69
Chris Morrell
Um, sure.
31:46.45
Chris Morrell
Right? Yeah and you could even you could even go so far as have like different pruning logic because though my only hesitation there is right? There's there's like a certain class of message that just goes out to every user all the time right? like ah. And you know multiply that by ah 100000 users like it just yeah I guess you know maybe it's just not that big a deal. Um I mean Skyler's suggestion we talked about this very briefly and you. Talked about Maybe you just throw it on s three so it's not in the database and that mitigates a lot of the concern I think um so that's another interesting piece.
32:30.16
Skyler Katz
Hey, just store the content on s 3 and then link to it and someone wants to know what it looks like you just click the link and you you dropped onto an H Shamel page from from s 3 Let let us 3 handle the load of of that and. I mean these are small files and if I'm not mistaken by s three s pricing like it's not going to cost anything to drop it on there because we're on s 3 are we're on E C two instances when we'd be generating content and then if it's never accessed like you're paying. Basically nothing for storage of these files.
33:06.95
Chris Morrell
Right.
33:10.55
Bogdan Kharchenko
And the nice thing about that it would solve this thing where you know? Ah, even if we decide to keep the files for rather than pruning them but keep them for a few years or something you know and some member user comes back and says like hey I've never received this email. You know we basically have like a permanent log and you know we we could do that I was also thinking the other approach that we could take is maybe drop some sort of like small config on the mailable that says like prune this file in thirty days or something where you know if we want to we say like well this. Email gets sent every day and like we don't want a million copies of this you know, just this one needs to be cleaned up more often than others. So I think there's a lot of strategies I think that we could take.
33:57.42
Chris Morrell
Yeah, you could just have a scene default and then if you needed to go into a specific mailable and say like this one needs to be cleaned up more often.
34:10.35
Skyler Katz
And I think I'm an interesting thing. A kind of switching topics. A little bit is like customizing the actual content of the message. Not the template of what the email looks like but um, like the actual content. Um. You know you have non-staff or non technical people that want to change what the email looks like ah like the content within the email and making that easy easier to handle.
34:43.33
Chris Morrell
Yeah I mean this is definitely an issue for us because um, you know, basically these messages never get changed because they they like to change it. There's a sort of changing content. Goes through an editorial process usually right? where there's um, often sort of the stakeholder writes the content but then it goes through an editor and then it comes to us and um, you know it's it's a pain. Ah, to change it after the fact and not everything goes through that process but a lot of things do um and so giving like having an interface for um, for managing that content and maybe even um, you know having some sort of. System of flagging whether like the latest edit has been reviewed like you know there's a bunch of sort of interesting pieces there too where um, you know someone goes in and updates a piece of content and that could that could actually ah trigger a review. Ah. From our editor to make sure that it you know all the all that spelling and hyphenation whatnot is right? Um I don't know if that would be v 1 but ah, it's it's kind of opens up an interesting. Um ah you know an interesting.
36:14.83
Chris Morrell
Can of worms we get back into event sourcing all all of a sudden. Ah.
36:18.71
Skyler Katz
Ah, yeah I mean at a previous job. We would send transactional type emails to our customers customers. Um, it worked a company that made websites and these websites would have different contact related forms on them and.
36:19.70
Bogdan Kharchenko
Ah.
36:36.90
Skyler Katz
At First like we would just send like we my that my employer would send an email when someone filled out a form and we'd say like hey thanks for filling out the form and we'd email our customer saying like hey someone filled out this form like here are the results. Um. But some of our customers like we want to change what the email body looks like that we're sending to our users like our visitors. Um, and so the approach that we took was basically like we would store markdown in the database and with ah like.
37:02.40
Chris Morrell
Right.
37:13.83
Skyler Katz
Merge Keys of like user dot name and like user dot form field. Um, and then when the email was Sent. We were like does this does this customer have a custom email body for this email if they do then like load up. Our like emails dot custom markdown file otherwise like use our default. Um and it worked pretty well. Ah you know we we got around customers having to learn markdown by just using a a tiny Mc e.
37:36.80
Chris Morrell
Right.
37:53.50
Skyler Katz
Like Wyzzywig editor and then converting the html to markdown to store in the database. Um and it and it worked pretty well because it also eliminated people from trying to like put in video tags or like a lot of things that aren't going to show up in an email an email. Providers inbox. But yeah, it worked ok, it was just we didn't have previews. It was just here's your form field and here's like your I don't know merge tags but it it worked pretty well I would say.
38:29.60
Chris Morrell
Um, yeah I think that Markdown is definitely a good Ah I don't know in between or so you know a place to settle on something like this because even if you even if you don't use like a wysiwig. Um I think. That for the type of content in email messages where it's like you really aren't you don't want to let them do very much formatting. Um, it's a lot easier except for Links. So Maybe having like a link helper and then like I've looked At. There's um, ah tip Tap editor. Um, which is just another wiyzzywig and actually I should look Mayberola does this because we userola for a lot of wizzywig stuff and I I think it's a fantastic editor. Um, but what's cool about tip Tap is. Um, you know you can you can like implement sort of placeholder type. Um functionality directly inside of it so that like you know the the example that they've they have is like at mentions right? you type an at. And it gives you a select a dropdown of like usernames and then that is like a token in the message like that you edit like you can move or remove entirely but like once it's in as a token. It's like your users aren't thinking about like.
40:03.48
Chris Morrell
Something like handle bars or or ah you know some twig syntax where it's like I have to you know? and even I'm so kind of amazed that Mailchimp hasn't done this because Mailchimp like still uses the you know asterisk pipe variable name. Ah format for their like merge variables. Um, but yeah, like if you basically know a given message has um potential like all these are variables available to this message. Um, then. Storing that content in the database somewhere um with like you know some sort of placeholder format. Um and giving giving some sort of wyzzywig editor experience I think that that's like the dream.
40:55.20
Skyler Katz
Yeah, well and the great thing about storing it as markdown is like at least in lairvell like Laville has first class email markdown support like all we had to do was drop the markdown into the markdown method on the mail and then like we were done and it was it made it really.
41:10.15
Chris Morrell
Right.
41:14.78
Skyler Katz
Easy. We didn't have to do a ton of other work to to have that. Yeah I mean like we used in tinymcee like we built a custom plugin that like you could click the button that was like user name and user dot form input like we were able to to have these. Buttons and it it like showed up in the text is like bracket bracket user dot name. But um, at least they didn't have to know the exact formatting of what that looked like.
41:36.37
Chris Morrell
Right.
41:47.90
Chris Morrell
Um, yeah I mean and you know in the end Obviously people can handle a little bit of that sort of technical stuff as long as you give them cardrails and do a little bit of like validation and stuff like that.
41:59.46
Skyler Katz
Yeah, yeah.
42:02.19
Bogdan Kharchenko
I like the markdown approach because I feel like some of the things that I'm sure everybody has noticed you know people tend to copy paste work documents and put them into email ah email templates and then there's a bunch of garbage in there. So I think. Having like a really clean, easy format that you know doesn't give you too much. Um, you know creative ability from the user end you know is is a really good placeholder and the nice thing about um, you know Markdown is you. Could also use the layer of all mailables nonmails notifications where you could store. You know the the content like that markdown itself. Ah correct me if I'm wrong. If. That's not how it works but I'm pretty sure that like you're basically you can preview like a sent um notification in a database like database mailables or database notifications. That's how it works me for.
43:05.90
Chris Morrell
Yeah, yeah, and we've only we only really do 2 mail in our notifications right now. But I know if you use it use like 2 database I don't know what format that's stored in I'm not sure if it's markdown or not.
43:20.10
Bogdan Kharchenko
Yeah, we thought it was marked them. Oh really? okay.
43:21.95
Skyler Katz
Um, it's sort of up to you Well I mean because it's stored in the databases like text and then it's however, you want to then pull those out and display them. Um in your system.
43:29.82
Chris Morrell
Right.
43:32.29
Bogdan Kharchenko
Um, oh I see interesting.
43:38.30
Chris Morrell
Yeah, yeah I mean that's another thing that I think about is um, you know right? now we have we've implemented some things as notifications I think but I think that was partially just like. Whenever notifications came out in Laravelle it it was looking like that was going to be the like official way to send stuff out. Um, but in in reality Um, it doesn't you know it doesn't feel like mailables are ever going away right? like a notification is sort of in a. An additional abstraction layer that either I think the way we're doing it where notifications are really only ever going to Mail is just sort of a needless Abstraction. Um, but I do I Do think a lot about um. Particularly when we have folks who you know marked a message from us as spam and then ah, call up yelling that they didn't get the message um like having. Another way for them to look up all the messages that they've received from us would be really nice. Um, but on the flip side I I often I don't know I just I know personally.
45:00.74
Chris Morrell
It really irks me when like I log into an app that I haven't been in for a little while and there's like 35 notifications and all of them are things that I already looked at in my email but because they're 2 separate things. It's like there's no way. There's no reliable way to know although I think did did you say that? um you guys in your previous place tried to to sync those up Skyler.
45:32.30
Skyler Katz
Yeah, we so we had this situation where like you have a user account and you can belong to multiple teams and in in situations where you get invited to a new team. Ah, we would send you an email but we would also send. You an in-app like database notification and if you clicked the Accept invite link in your email in that controller we would then go in and delete the invite notification from the database because you had clearly already been sent.
46:06.44
Chris Morrell
Interesting.
46:09.23
Skyler Katz
You'd already like access to that. Um, that was kind of like the um, the only place where that type of notification was being used but we kind of built built it so that um it was easy to you know I could foresee other other emails. Like maybe you track when it was when there's a click or if it was opened those those like opens are really finicky like in my email you know so like you can't necessarily trust the open but um, the other thing that.
46:35.10
Chris Morrell
Right? That makes me nervous. Yeah.
46:46.14
Skyler Katz
You know I could see you doing is like maybe your database notification has like a expiration date and so if it's over you just prune them like prune notifications that like probably don't matter. Um or Mark them as red. Yeah um, but.
46:58.99
Chris Morrell
Or just Mark them as red.
47:05.28
Skyler Katz
In this case like if you clicked the email then we would delete or market is red I think we marked it as red. Um that that the notification was in there. Um, but if you were in the app and you clicked it then it was marked as red and like you still got the email but you know that it didn't.
47:13.53
Chris Morrell
Right.
47:23.69
Skyler Katz
I Don't know if way to unsend an email but at least at least in the app like we knew they clicked to the link because they landed on the like accepted page.
47:34.26
Chris Morrell
Yeah, yeah, Okay I think I was I thought that maybe you were trying to sync up with like ah you know an open um webhook from Sendgrit or something and that's just me I don't I feel like that's On. Too unreliable to really.
47:51.36
Skyler Katz
It's too. It's too unreliable like I use hay for my personal email and they claim to block all of those open and click links I have no idea if that's true like if it's true that they can fully block all of it. But I I don't think those are reliable I know Apple's privacy um, privacy email settings like make it much harder in the mail app to to track opens and clicks. So.
48:15.67
Chris Morrell
Yeah I mean even Gmail does that I believe where that you know that it's not like you know it used to be that the message never even like the the contents of the message not was wasn't parsed right until like. You clicked on it in Thunderbird and do do either of you guys remember Thunderbird yeah, you'd click click the message in Thunderbird right? and it would download the contents from the server at that moment and parse eachtml and render it right? And that's like then.
48:39.63
Skyler Katz
Oh yes.
48:40.20
Bogdan Kharchenko
Yes.
48:54.41
Chris Morrell
For sure you know that that's the first time that that like if it's fetching an image or whatever. That's the first time that that image was fetched but you know nowadays no email client works that way. So they're all, um, loading the message. Usually on receive and you know parsing it for spam and you know potentially like yeah, all that stuff. So.
49:15.95
Skyler Katz
Proxying the images and yeah, so like we we don't use that we were basically like managing the click and if you clicked on it. You land on our you eventually land on our controller and and then we just had a like ah notification. Like Mark is red method or on the I forget exactly what the method was but it it was like very easy to just link those together.
49:45.98
Chris Morrell
Right? Um, shoot.
49:52.40
Bogdan Kharchenko
I was thinking what if we talk about email Unubscribe Unsubscribes right? like you want to unsubscribe for an email and I was thinking about this because you know theoretically what we could do is um, ah create like a dashboard. That lists the emails that we kind of have set to go out maybe like in some sort of list that we curate and the only thing the user would have to do is just say well I don't want to receive like past due reminders right from from from you guys ever and you know, ah.
50:24.61
Chris Morrell
Ah, ah, of course.
50:28.97
Bogdan Kharchenko
At the time that that reminder is Set. You know we would then save that like fully qualified domain name ah class name into a database and at the time that it's supposed to be set all we're going to say is like hey but make sure that this person is not unubscribe from this fully qualified class name and then that way we just skip. Um, you know sending an email to that person because they've just unsubscribed from that particular email. Um I think it's like a pretty quick solution to that because I know that that's also something that's fairly challenging. Um.
51:03.12
Chris Morrell
Yeah,, that's a good I Like that idea I mean I I know that like a lot of the email service Providers I'm pretty sure that sendgrid has a way to basically like inject an unsubscribe link into a message and if you like. Provide the correct like metadata so that they know like what the grouping or like what the idea of that message type is um, they can handle that for you? Um, but I do yeah I like the idea of just sort of.
51:42.63
Chris Morrell
Again, it'd probably be something where you'd want it to be opt in right? where any given mailable you could add like an interface to to say like this is unsubcribable or something like that and then we just present that list to the user and they could say Oh yeah I don't want to get these messages.
51:49.56
Bogdan Kharchenko
Yes, correct yeah and.
52:01.36
Bogdan Kharchenko
Yeah I think ah, the other thing is you know?? Ah, we have to I think consider that not everybody uses sendgrid or you know this is some other mail gun or something else and you know if you look at like ses. It's pretty like bare bones you know and I feel like a lot of people use that. And um, you know I think having an an app solution is still like worthwhile rather than potentially just having unsubscribes on the mail server and then your app is still dispatching these emails. Um for everybody. So.
52:33.97
Chris Morrell
Right.
52:37.63
Bogdan Kharchenko
I don't know that was just my quick thinking as you were scratching your head there. Real quick thing about where you were gonna say but I think like overall you know you know we talked about the configuring the configurable recipients feature which I really like that approach I think we could probably. You know, improve on it a little bit with maybe some roles or groups I think that's a really clever solution to manage like which groups of people get these emails as well and obviously configured emails like the content is obviously a huge thing. You know I've looked at the furlough does offer a plugin for Markdown I think it's a good solution and using something like handle bars or you know, even some barebone. Um, you know parsing script also makes sense so I like it. Yeah.
53:31.78
Chris Morrell
Yeah, and then you could do the same thing where it's um, you know it's a it's it might ah still need to be like a trait because you you probably are always going to need to Map. Um, the. Properties on the mailable right? If the mailable receives like two booleans and a user object like okay we could just write a thing that maps the user object or maybe even for all Models. You just do 2 array and you just like present the Array keys. Um, as the options. Um, but you'd still probably need some intermediate thing that's like ah these are the variables that are available to this mailable. Um and I and honestly.
54:22.87
Skyler Katz
With some Ph P attributes.
54:27.50
Chris Morrell
Yeah, some Ph P attributes may be um, but even that like ah I think you'd want to curate right for any given message even for the for the user like you probably don't need. To expose all the different ah attributes of a user to the mail ball right? You'd want to be like okay here's their display name right? here's ah you know here's this city-state country like ah different pieces of information that are going to be relevant.
54:49.35
Bogdan Kharchenko
Yes.
55:04.50
Chris Morrell
Um, so there'd there'd probably need to be an intermediate step there too. Um.
55:08.90
Bogdan Kharchenko
Yeah I agree I feel like a lot of times what we do is we would do like a for each loop inside the template. You know, let's say we're listing a list of users and then we call like some sort of special function on a user like oh give me their full name which is just concatenating their first and last name. And we do that fairly regularly, but it seems to me like it has to happen beforehand inside that template and just passes an array. You know like.
55:35.47
Chris Morrell
Well right I mean right there That's a great example of like if you have a loop inside of your message like this solution does not does not unless your message unless you want to let a you know include a full templating language that. Has things like loops and conditionals like um, that's just not going to be possible either. Yeah, you have to do that loop. Yeah or like Map partials or something.
56:01.88
Bogdan Kharchenko
You would have to like map. It basically.
56:03.64
Skyler Katz
Or you create your mail you create your mail merge tag that is like here's the list of exams you took over the last eighteen weeks or like the last quarter and it's like well here's your you can choose where you want that.
56:19.36
Bogdan Kharchenko
Um, hang. Ah.
56:23.64
Skyler Katz
List to go. You don't get to just necessarily like change What the list says but like here's your here's your mail merge for like courses taken last quarter and ah you put that in somewhere.
56:23.86
Chris Morrell
Right.
56:28.78
Bogdan Kharchenko
Oh.
56:37.97
Chris Morrell
Right? And then you just like have a separate view that you like render and then pass that in as a string. Yeah that makes sense that wouldn't be that bad for the.
56:43.45
Skyler Katz
Yeah.
56:49.48
Bogdan Kharchenko
I mean what? so I'm not a hundred percent familiar with the mustache templates I know that Chris you said you've had some experience I mean would it be possible to have like a more data rich environment there or no.
57:03.24
Chris Morrell
It would be but then you're just like asking a lot of the end users like if you're asking them to do the logic.
57:08.51
Bogdan Kharchenko
I see I see what you're saying right.
57:08.60
Skyler Katz
I mean like Boden you said you were basically like writing raw html and then you ended up having to do it all and so it's kind of like if your end users like at most they customized their myspace pages back in the day like you know you just.
57:23.40
Bogdan Kharchenko
Right.
57:27.79
Skyler Katz
Got to make it easy or no one's going to customize it or they're not going to want to touch it or they're going to ask us to touch it. Um, and then we're gonna have to leave our Id and use a form on. Um.
57:39.40
Bogdan Kharchenko
I think I think like there's probably ah I don't know maybe a bit of a pipe dream about like just allowing like an everyday person like modifying mail right? Maybe they'll modify a little bit of the content but I feel like you know, just even us writing emails. Um.
57:42.24
Chris Morrell
Um.
57:56.15
Bogdan Kharchenko
You know the writing the actual mail bowl class and the views and everything like you know it's it's fairly technical like even this loop and you know some of I don't know some of the decisions some of the variables are displayed and I feel like. I don't know I don't know if it's really possible to give a lot of control to someone who is non-technical to update emails I know that people do this and obviously Mailchimp and wordpress and stuff like that. But um I think once it becomes like very complex like once there's like. A little bit of complex logic like ah you know you you almost have to like you as a developer for example, like let's just say you want to include like some sort of password reset link right? Well, we obviously let's say create that password reset link inside the mailable we pass it down as a. Variable that can be consumed but it's almost like well we want to make sure that that link is displayed. You know, whereas like the end user could be like well I'm not going to display it. Um, so I feel like.
58:57.70
Skyler Katz
I Mean in that in those Contexts though like you could just make your like you're providing a introduction to the to the Password reset but like the actual button that renders the Reset link like that could just be hard coded in the template.
58:59.75
Chris Morrell
Um, yeah.
59:11.55
Bogdan Kharchenko
Oh it's static.
59:16.49
Skyler Katz
But like we're letting them customize everything else. You know there's there's some options there sorry Chris you were trying to say something.
59:18.22
Bogdan Kharchenko
I see me.
59:25.36
Chris Morrell
no no I mean I think you were you're getting at the same thing that I I started thinking about which is this this? Um, this brings me back to Medusa like right internally we have this ah sort of headless Cms concept.
59:36.27
Bogdan Kharchenko
Um, yes.
59:43.35
Chris Morrell
Where um, you know there are lots of pages on a website where you want certain parts of the page to be editable but a lot of the page is either dynamic and shouldn't be editable or like there's a lot of like very sophisticated um Mark. Markup and Css to make like you know some fancy I don't know ui component and like you don't want someone to be able to edit that you just want them to be able to edit the like headline text that shows above that and maybe like the paragraph that shows below it. And then like the outro text at the bottom and so our solution for that is we have this this? um Cms where you basically wrap like editable portions of a page in these tags and then only those elements can be edited on the page but the rest of it like we have. Full design markup control of um and you know just like listening listening to us talk about this It's coming back to that almost here where it's like actually maybe the. The ideal is not letting people edit the messages right? It's giving people a nice way to customize the parts of the message that they're actually going to change right.
01:01:16.81
Chris Morrell
And maybe you still need to do some like merge variable support there but v 1 you probably don't need to like for for the first pass at this um the message could be like hi first name comma and then you have a paragraph that's editable. And then you have a table of like the exam sessions and then you have like a like um salutation paragraph that's editable. Um, and we could I mean internally we could even render this using Medusa right now. Um, and you'd set the defaults. But if someone wants to go in and change that introductory paragraph. Um, they could easily go in and do it I mean it. It has the tradeoff of we're kind of going back to the beginning. Where now you do need to have like sort of sample data for any message because um, you know we need to be able to render it to give them away to edit it. But um, you know, given that tradeoff. Comes with the benefit of being like yeah we don't not only do we not have to but we kind of don't want to have like non-technical users thinking about loops and tables and like you know, especially with email content like the the just outlandish.
01:02:45.80
Chris Morrell
Efforts you have to go to to get like markup to work for anything. That's not really just like a paragraph. Um, you know like 6 nested tables with different like ah padding and and v a line settings and stuff right? Um, and that. That certainly is appealing.
01:03:07.63
Bogdan Kharchenko
Yeah I really like the approach of this and I was going to ask? ah earlier is maddusa a public project Chris or is this something just in our world right? okay.
01:03:15.56
Chris Morrell
It's not yet I I hope to make it public someday. But it's not in a state that it can be.
01:03:22.12
Bogdan Kharchenko
Yeah I think like ah, really like the you know this kind of solution where we give enough to make some sort of change to the non-technical person but overall like they cannot change like the reset link. You know not being displayed or not properly put in. As a markdown piece of content I think that's a really good solution to this kind of like customizing the email and I think even for developers I feel like 1 of the challenges that I have or that I kind of dislike about writing email in general is that you're kind of. Flying blind as you're writing the template and then you kind of like send yourself that message to see how it looks like and then you open up whatever flavor of a local email parser tool you have and you see it and then you go back and you modify it and it's like by time you align everything correctly, you know you switch the tablet. 20 times whereas having some sort of like online you know in in app preview is like a pretty good. Um you know solution in my mind.
01:04:29.43
Chris Morrell
Um, and and it's not like realistically it's not like every message needs to have this support like it's only probably 10 emails that staff really are ever going to want to edit and obviously that's going to be different. Ah. Case by case for different um and different organizations. But I I think for us that's true like most messages that we send out. There's just not a lot to it right? and it's it's never going to change. It's really things like you know welcome emails where maybe like it would be great if we could. Um, have a way for staff to be able. You know we're doing this convention in October like it would be awesome if someone could go into the welcome emails that are going out and add just like a little hey and did you know that internet she is hosting this convention in October right? And of course. Then they have to remember to go back in and remove that. But um I think there's there's a huge upside to letting folks have more control over some of those those messages and it wouldn't have to be a ton.
01:05:43.60
Skyler Katz
Um, agreed.
01:05:45.80
Chris Morrell
I think um Bogdan's idea about um unsubscribes kind of we we got off of it. But I'm going to bring it back because it was kind of a nice segue into this last piece that I've been thinking about a little bit. We don't really have the use case for yet. Um, this is more along lines of what you were talking about Skyler when you're sending messages not to your customers but to the customers of your customers where your customer needs. Ah you know once more ownership over that message and. The message contents is one piece. Um, but also the the logic is another piece right? So you know an example would be um, you know is a big tool in the home inspection world. Um, that that lots of home inspectors use. To manage their customers and manage sort of like marketing automation flows for their customers and all sorts of integrations and I know a big a big um component of that is sending out emails to their customers. Um, at different points right? like you know your inspection is scheduled or your inspection is coming up or thanks you know, thank you for ah, having us at your home like here's here's some details about the inspection. We just performed like all these different steps. Um.
01:07:19.95
Chris Morrell
And I don't know you know this is just this is just sort of an example that I can think of I don't know how much customization they allow or how they handle it. But I'm sure that they get all sorts of feature requests for more ways to control like. I don't want this message to go out five days before the inspection I want to go out seven days or three days or I want one to go out seven days three days and one day you know like I think there's an infinite number of possible scenarios like that. Um, and so. You know we have a use case that is sort of so potentially going to be similarly flexible. Um, where I've just been thinking about like eventually if this if this feature that's mostly internal right now ever gets. Live for our members to use outside of like this one specific context they're going to start wanting those same things like you know they maybe are going to receive a report about some some records in the database and maybe they're going to want to say I want that report every month like 1 person might say I only want the report every month and another person might say I want the report every week and another company might say we want this report every day. Um, and so that's obviously a whole whole Hannah worms because I don't know if you can you know we're we're basically describing.
01:08:55.35
Chris Morrell
A programming language. Um, but I have just been thinking like what approaches might you take to um, allow for that type of flexibility in not just like the message content but actually like.
01:09:12.82
Chris Morrell
You know the logic around if and when certain messages are sent.
01:09:17.90
Skyler Katz
Um, yeah, it's up sorry go on bogged in.
01:09:18.39
Bogdan Kharchenko
Ah, ah sorry about that. Um, thank you so one of the ways I've managed to solve it in like a multi-tenant context is ah you know there's 1 layer of a app that is a multi-tenant app that I would have that I have and you know. Ah, one of the features that I have is like let's say you're scheduled ah just for context this is like a scheduling platform like a work schedule management system. Um, where you know you're scheduled to go on a shift that starts let's say whatever tomorrow at 8 pm t pm. And you know one of the features that it offers is you know there's ah, there's a way to send a upcoming shift notification. So you know? For example, like 24 hours before your next upcoming shift. It would send an email saying hey don't forget that you're going to work tomorrow at Eight p m.
01:10:03.35
Skyler Katz
And.
01:10:14.40
Bogdan Kharchenko
This is like just a reminder but ah, you know a different tenant may choose a different time. So one of the ways that I was able to kind of solve. It is I I have like a setting table and it would just say like this type of notification is sent. Let's say 12 hours before 6 hours before and the way that would work is there would be a a scheduled job in a kernel that runs every minute or every hour you can do probably every hour is fine and ah once that job is ran inside the command inside the. Inside the command you would just loop through all of the tenants and say okay, well give me the tenant and give me just the setting and then find me all of the shifts within this timeframe and then dispatch the emails so that is one way that you could potentially do and I can imagine. This is something that's similarly happening to this system that you're describing Chris.
01:11:14.13
Chris Morrell
Um, yeah I I think that makes sense and I and I think I imagine that something like this is just always going to have um you know there are always just going to be boundaries of what what's going to be allowable. Um, because I could even see in that scenario if you have another tenant. Who um, wants to send out a reminder 24 hours before and 2 hours before you could always just have like 2 emails 1 is like you know shift first reminder and shift second reminder you know and then like if you have a if you have a.
01:11:50.35
Bogdan Kharchenko
Um, sure.
01:11:52.38
Chris Morrell
Tenant who wants 3 you could just add shift. Third reminder right? and just by default the the new ones are just set to be not enabled for anyone. Um, but ah, you know I think that that maybe that's the best solution I've been thinking a little bit about like.
01:11:53.68
Bogdan Kharchenko
Right? right.
01:12:12.22
Chris Morrell
What if instead of having like a um sort of like shift first reminder um message template instead you um, you basically think about. And I I do not I I'm not bringing up event sourcing again I'm just going to preface this with but you basically think about these as events right? Where um, what if instead you're just saying okay, there's a.
01:12:51.75
Chris Morrell
Um, there's like an hours before shift event that fires every hour for 48 hours that includes 1 argument which is like number of hours until shift and then you give your clients basically a way to say you know. When this happens with like this number of hours remaining send this email and that way if I want to send out an email every hour for 48 hours leading up to a shift I could create 48 custom messages and all of those are just basically saying. When this event happens with these arguments send this message and like I imagine that there's a way to kind of you know these are these are events I would think of them as purely events that are for. Customer consumption like you would keep them totally separate from the rest of your applications events. Um, and you'd like only trigger them from like a scheduled job or something like that. But then if a customer comes to you and says you know I want to be able to like reach out. To people who are still on staff but haven't like picked up a shift in six months you know like um, it wouldn't cost you that much to basically just like add a new ah scheduled job right.
01:14:27.75
Chris Morrell
Once a day performs that query and triggers that event and now like that that use case is supported and I feel like that may be a really flexible way to approach this problem. Um, but right the the downside is it may be a little more like. Technically difficult for customers to understand because now they're they're not thinking like this is what the you know customer reminder email looks like they're they're having to think like I want to send this email went like 24 hours after ah like on the like. Job happened in past event when ours is 24 or whatever like you'd have to do a lot of work to make the ui nice.
01:15:16.86
Skyler Katz
Yeah I mean it's it's almost a little bit like a like drip campaigns I think um, you know like mail mail coach like spotty's newsletter thing like their latest version has this drip builder where you can like. Send automated emails on a schedule and there's like ways to like opt out of those and the the founders of Honey Badger built a tool called hey hey yeah, hey yeah, dot.emailheya.email and it's similar. In that you can like create these campaigns. There's is all code generated um, but it's almost like we we could have these campaigns that that could be built where they're like all right? Well your campaign starts when the job was scheduled or the campaign starts when. The user fills out a like request for something a request for an inspection and then five days after or four days before the scheduled inspection. Um.
01:16:14.68
Chris Morrell
Right.
01:16:26.84
Skyler Katz
It's a little less flexible than what you were saying because like we're kind of providing them what those campaigns are um, you know specific but it may be a little bit easier to like build a ui that lets people design these you know they could send. They could add 8 emails to their campaign.
01:16:50.50
Chris Morrell
I Mean honestly as I think about it I feel like a rule builder you I like I think the trick is you'd need to um, you'd basically need to map.
01:17:06.52
Skyler Katz
I.
01:17:07.94
Chris Morrell
An event to a like label that makes sense in like a rule buildder context but then like it'd be pretty easy to just say like okay I want to send an email why when do I want to send the email and like the options are after a inspection is completed or you know. Ah, ah before an inspection is scheduled right? or before an inspection is performed or when an inspection is scheduled right? You just like essentially have to think about these events as like strings that make sense in that context. And then you would just have dropdowns for any of the parameters right? So like I want to send this after an inspection is performed and when you choose that from like the rule builder then you have the option to say like. After x number of hours right? and like you could set it to 0 to have it happen immediately or you could set it to 10 or 400 or whatever you want you know um and that would be pretty easy for people to use I think.
01:18:14.96
Skyler Katz
The.
01:18:15.88
Bogdan Kharchenko
Yeah I've certainly ran into one of these like workflow automation tools before and you know it was like a very user friendly thing where it was you know, kind of like like a little you know configuration or wysiwig builder type of thing. We would say like you know with an invoice you know, sent to a client also send like a text message. Um, you know later or something like that you know and you know it seemed pretty easy in the ui portion I don't know how complex it sounds a bit complex. But. Certainly one of those things where it would give a lot of flexibility where you could have like just various events like you said that are able to happen and then you know you would just I suppose store them in a database and at some sort of a timeframe that says like well you know. When ah when ah, um, you know an invoice is generated then you know 24 hours later send a text message as well. You know to remind them to pay that invoice. Um, so I think you know it's pretty plausible to do something like that.
01:19:26.61
Chris Morrell
Um, right.
01:19:30.82
Bogdan Kharchenko
Um, it's just I think one of the challenges is the Ui component as well. Oh zapier That's right, That's what that is um, now it's It's an interesting concept.
01:19:34.98
Chris Morrell
Um, yeah, let's just build zapier real quick.
01:19:45.86
Chris Morrell
Yeah I mean and this is one of those things where we don't have we we at internet you don't have to figure it out quite yet. But I think it's um, it's definitely part of this conversation or you know it's like it's been on the edge of discussions from time to time is like. Um, not only do we want to be able to customize other parts of the message but like I mean even even going back to Skyler's first um first example like maybe maybe it's just like instead of having vacation mode. You just the. The solution obviously having vacation mode would be great, but if there was more um, user level control of these messages like just having a way for them to go in and say ah you know, update the logic to be like and the dates are not between these 2 dates you know like and.
01:20:38.39
Skyler Katz
Yeah, don't send anything on New Year's eve or whatever.
01:20:40.40
Chris Morrell
Just to stop sending it? Yeah yeah, like you could if you had sort of just like a generic rule builder. Um, yeah, it could be um, it could be another way to solve that problem.
01:20:59.81
Chris Morrell
It You know obviously it introduces a lot of complexity though.
01:21:04.46
Skyler Katz
Yeah, or you could just use zapier and mailchimp and then it wouldn't be overengineered though.
01:21:12.17
Chris Morrell
Well right? I mean what's the point of that I did think like that that may honestly be the best solution is just like ah build a bunch of zapier triggers and be like hey if you want to like.
01:21:12.51
Bogdan Kharchenko
We we could.
01:21:29.27
Chris Morrell
Want to send out email messages based on things that happen inside the app like you just connect whatever email provider you want with our zapier integration and you're on your own you know, like um, it's not you know.
01:21:41.58
Bogdan Kharchenko
Yeah I don't know I don't know I feel like the.
01:21:45.26
Skyler Katz
That that's talk first for not this podcast this is about overengineering things.
01:21:50.48
Bogdan Kharchenko
Ah, ah yes, but yeah I mean I like ah I like that approach I think it's very overngineered.
01:22:01.81
Chris Morrell
Um, Well this feels like a pretty good place to stop? Um I I feel like I want to mull over a couple of these pieces. Um, but I do really like the idea of using I like the idea of using Maddusa Edit email contents. So that you can just like um, zero in on the few pieces of those messages that ought to be edited and you don't have to deal with any of the nonsense of like oh yeah, are they going to accidentally like remove the button styling from the link or whatever you know. Um, and that feels like a good a good solution there even if it does mean that we have to come up with some sort of like way to pull in defaults for preview or whatever. Um, but yeah, all in all I'm I'm pretty. I'm I'm pretty satisfied with where we got to.
01:23:00.26
Skyler Katz
same same I feel like if ah if people have opinions. Be sure to to share them on like Twitter and Mastoon and threads and 1000000 other apps on social blue sky or if you're coming to laric on in like a week
01:23:10.48
Chris Morrell
Um, blue sky Of course.
01:23:15.27
Skyler Katz
Ah, come find us. We'll be there.
01:23:17.38
Chris Morrell
Um, yeah, and I'm bringing some overengineered stickers. So come and grab one all right? Let's call it.
01:23:21.40
Bogdan Kharchenko
Nice.
01:23:24.66
Skyler Katz
See ya.