I am going to be the first to admit I am the world’s worst at forgetting birthdays, anniversaries, important dates, etc. We’re up to 96 individual birthdays, and I don’t even remember how many anniversaries. Thankfully a few of us share birthdays, but still, it’s a lot. So…how do we tie in all those birthdays and anniversaries, send a social media post, and an email to a mailing list? Integrations. No, I’m not going to go into nitty gritty detail in here, but personally I like knowing how things work. Plus, writing it down helps me remember it.
Bots. Love them. Or Hate Them.
In this case…I like my bot. Actually, its less of a bot than a catch-all for the automated processes that run. But still…my avatar is around to remind me that something automated has triggered and ran. So meet, again, the Schleicher Bot.
In general, anything automated is going to have the Schleicher Bot tag or avatar to identify that a human didn’t actually have any input, other than to set the automation up. That being said, in some cases I do have an actual bot taking care of some processes. Not here, over in the rest of my crazy home setup. That one is definitely a love-hate relationship.
How about that calendar
Okay, so the first building block of this whole thing is the calendar. Anything and everything sources from a Google calendar I’ve got setup for all the sites I administer. Each site has one (or more) calendars that various applications will sync to. As an example the calendar displayed on this site is synced to the Schleicher (Site) calendar on my Google account. That calendar is a cloned calendar of the Schleicher Birthdays calendar, just without the times.
The site calendar simply ties into the Google calendar using the public calendar link. These calendars are shared, but only accessible by those with the public link. The site calendar is pretty simple…birthdays and anniversaries are all-day events that just get pulled into the site. Toooting and emailing those birthdays, however…
Toooting away
Automated Tooots are a different story. I use a home automation platform for that. IFTTT (IF This Then That) is a fun place that integrates various different platforms and web elements in unique ways. In this case, I’ll take the following expression:
“IF a birthday is happening today (THIS), THEN post to Mastodon (THAT)”.
Of course, its a little more complicated. That’s were the bot comes in. You see, I don’t want to post from my account all the time. It makes more sense for a catch-all bot to do the legwork, and let my account be….well, mine. So, to do this I’m gonna have IFTTT watch for a birthday or anniversary in Google, and when one is present the bot will post on Schleicher Social.
The first part in IFTTT is easy…I just link IFTTT to the Google Calendar I want in my Applets. The second part…is a little more complicated. I need to tie into the Mastodon API to post as the bot. So…in Mastodon I’ll just create a set of credentials (like 20 something characters long) that IFTTT sends to identify itself as the bot, give those credentials permissions to write a status, and embed that API key into the IFTTT header. Everybody understands that, right? I’d be crazy if I said I figured that out on my own; Google and ChatGPT helped out a lot to tie all the pieces together.
My trigger (or my IF), is to decide what to send, and when to send it. For this I simply choose to send the TOOOT at the event start. That’s why I’ve got different calendars (simply for appearance’s sake). All birthdays and anniversaries start, so that’s when everything starts triggering.
Likewise, I have to determine what the event is. To do that I use a filter. In IFTTT I’ll search for an event start with “something” in the description. This something is either “Birthday” or “Anniversary” and I have different automations for each.
The next part is I’ll define the body text of what the bot will post. It’s not complex; it’s simply to wish a happy birthday to somebody. That being said, I’m limited by what Google Calendar sends to IFTTT. Easy fix; the title of the event is my birthday (or anniversary). It’ll tooot the name(s) defined by the title in Google.
End result…a concise Mastodon post with whatever happens to be going on.
Shooting off those emails
The second part is the email push. That integration is more fun. And more complex. I use Google calendar, Sendgrid, and Zapier to help with that. Zapier is simply another automation platform, but its a little more expansive than IFTTT and allows for more complex integrations. Sendgrid is simply the email relay service I use for my email server. I use the same calendar in Zapier as I use for IFTTT, since it will send emails when an event starts. That’s why all the emails come through ~7:45am. So, just like IFTTT I’ve got my trigger (an event start), my event identified by some description (Birthday or Anniversary), and an action based off of that event (in this case, an email).
The emails are more fun with Zapier. Sure, I could send a simple email with “Happy Anniversary John and Jane”. But, to make it look good…I’ll use HTML markup. HTML defines how all of the web looks (along with CSS). In this case, its:
a Happy Birthday</a> on Scheicher Social. Don't have an account? <a href="https://schleicher.social/invite/xxxxx">Join the discussion</a>, and if you need help signing up check out the <a href="https://family.schleicher.social/help/">FAQ</a> on the Schleicher homepage.</p></br>
<hr>
<h2>Other Links</h2></br>
<p><a href="https://family.schleicher.social/calendar/schleicher-birthdays-and-events/" target="_blank">Schleicher Birthdays and Events</a></p>
<p><a href="https://family.schleicher.social/happenings/" target="_blank">Happenings</a></p>
<p><a href="https://family.schleicher.social/photo-gallery/" target="_blank">Photo Gallery</a></p>
<p><a href="https://family.schleicher.social/recipes/" target="_blank">The Schleicher Cookbook</a></p>
</br>
<p>Don't have the app? Search "Mastodon" or "Tooot" on the iPhone or Android app store. If you no longer want to receive birthday reminders, send an email to <a href="mailto:[email protected]?subject=Unsubscribe from Schleicher Emails">[email protected]</a> to be taken off the mailing list. Have a great day!</p>
</br>
<hr>
</br>
<h2>We are the Schleichers</h2></br>
<a href="https://family.schleicher.social"><img src="https://family.schleicher.social/wp-content/uploads/2023/04/schleicher50x50.png"></a></br>
<footer>
<p>This was an automated e-mail sent by the Schleicher Bot</p>
<p>Don't want anniversary or birthday reminders? Unsubscribe from this and other Schleicher email lists by sending an email to <a href="mailto:[email protected]?subject=Unsubscribe from Schleicher Emails">[email protected]</a></p>
</footer>
It looks like a lot, but that translates to the email format everyone can see. At the moment, I’m going off of Aunt Gatha’s mailing list (minus those that requested to not receive reminders), so if you want added or removed I have to do that manually.
So what?
Honestly, just more info. I’m a firm believer that to stop learning is to stop living. We can all learn something new every day. It can be something totally random and useless, but its still learning. So…learn. And live.