How automation saved my relationship (šŖ¤)
Oh, we're not done with Script Kit yet. There's still stuff we can automate!
Context
I pride myself in being a caring and attentive partner. I set little reminders to check in with my girl to see how sheās doing; we have a monthly check-in that we engage in where we report on the status of the relationship and how weāre feeling about things (š„ so hot right); and I do my utmost to try and deescalate any situations if Iām ever feeling like itās getting a little too heated. Thereās good kinds of š„ and bad kinds of š„, if ye know what I mean.
However, I am far from perfect. One of the things I struggle with the most ā like a lot of you fine folks reading this article ā is pulling myself away from the computer when Iāve entered the flow state. If you donāt know about the flow state, this blog post does a good job of going over it and why it rocks! The TLDR is that youāre in the zone and you donāt want to leave the zone because the zone is where sh*t gets done. Now, if you add in the inability to rip myself away from the screen when Iām in flow and an emergency šØ in production, Iāll almost always forget to message my girl that Iāll be working late. In fact, I probably will not be responding to any messages she sends my way so her ājust checking in on how your day is goingā messages go totally ignored.
Again, I just said, I pride myself in being a caring and attentive partner. Whilst flow state is a great thing, itās not the most important thing in my life and human relationships matter way more to me than any issue in production. Ignoring your partner is not a good thing (obviously) and in fact ā and donāt quote me on this but I swear I heard it from someone ā being ignored and feeling ignored is as bad for as you as smoking a cigarette! Again, donāt quote me on this and when I Googled it, I couldnāt find squat, but weāre gonna run with it because even if itās not true, it really really sucks being ignored.
Alright, so leaving my girl hanging wasnāt an option anymore. I needed a solution that could pull me out of the flow state gently but effectively and ensure I stayed the caring and attentive partner I aspire to be.
As a developer, the obvious choice was to code my way out of this problem. After all, if tech can solve production emergencies, why not relationship ones too? Enter Script Kit and a little help from Twilio. Hereās how I hacked my way out of the dog house and into ālegendaryā boyfriend status.
A Demo

The Code (Since I Know Thatās What You Want)
// Name: Whatsapp Babe A Late Message
// Description: Send your babe a whatsapp templated mesage to let em know you're running late!
// Author: Taran "tearing it up" Bains
// GitHub: @tearingitup786
// Schedule: 0 14 * * *
import '@johnlindquist/kit' // ScriptKit imports
// Import Twilio SDK
const twilio = await npm('twilio')
const phoneNumbers = await env(
'TWILIO_PHONE_NUMBERS',
'comma separated list of numbers: 131-131-1313,787-787-7878',
)
try {
const numbersToText = phoneNumbers.split(',')
// Your Twilio Account SID
const accountSid = await env('TWILIO_ACCOUNT_SID')
// Your Twilio Auth Token
const authToken = await env('TWILIO_AUTH_TOKEN')
// Your Twilio phone number
/**
* You'll have to set up a whatsapp/facebook business account
* Twilio makes it pretty easy to do this so don't fret, it's pretty straightforward.
*
* @docs https://www.twilio.com/docs/whatsapp/getting-started
*/
const fromNumber = await env('TWILIO_PHONE_NUMBER')
/**
* We opt for a message template so that the numbers we are messaging
* don't need to have this particular number saved as a contact
* We're able to start conversations with whatsapp users with message template
* doing it via adhoc messaging doesn't really work!
* @docs https://www.twilio.com/docs/whatsapp/tutorial/send-whatsapp-notification-messages-templates
*/
const contentSid = await env('TWILIO_CONTENT_SID')
const workingLate = await arg('Are you working late', ['yes', 'no'])
if (workingLate === 'no') {
console.log("Okay, won't text babe!")
process.exit()
}
// Initialize Twilio client
const client = twilio(accountSid, authToken)
// Function to send a message
const phoneNumber = await arg(
"Enter the recipient's phone number (e.g., +1234567890):",
numbersToText,
)
const messageBody = await arg(
"Enter when you'll be free... He'll be free around <your message>",
)
console.log('Last time given', messageBody)
client.messages
.create({
// body: messageBedy,
contentVariables: JSON.stringify({1: `${messageBody}`}),
from: `whatsapp:${fromNumber}`,
contentSid,
to: `whatsapp:+1${phoneNumber}`,
})
.then(message => {
notify(`Message sent to ${phoneNumber}! Message SID: ${message.sid}`)
console.log(`Message SID: ${message.sid}`)
})
.catch(error => {
notify(`Error sending message: ${error.message}`)
console.error('Error:', error)
})
} catch (err) {
console.error('There was an error running the twilio script')
console.error('Error', err)
}
The Setup
So before we jump into Twilio, I think you should go read my blog post about Script Kit! Iāll wait. Okay, you probably didnāt read it so Iāll give you the TLDR. The TLDR; is that itās a scripting platform intended to help developers automate tedious parts of their workflow. BTW, if youāre reading this babe, nothing about you is tedious š°. I swear, if this blog post gets brought up in a future fight, even as a joke, this is going to be me:
Why Twilio?
Now, I needed a reliable way to send a perfectly-timed text to my girlfriend. Sure, I couldāve stuck with reminders, but whereās the fun in that? Twilio came to the rescue with its robust API, making it effortless to send SMS messages programmatically. It fit seamlessly into my Script Kit workflow, bridging the gap between code and communication.
So this isnāt a blog about Twilio but if
you havenāt heard about it before, itās a cloud communications platform that
allows you to send not only emails and SMS messages programmatically, but also,
and this is relevant to my blog post, WhatsApp messages š! I went with Twilio
over another provider because Iāve got experience with their platform and they
had the coveted WhatsApp integration that I needed.
The setup for Twilio is as following:
- Sign up for Twilio.
- Get a phone number (~$1.15 USD).
- Add funds for messaging (~$0.025 per WhatsApp message).
The things youāll need to run the script from Twilio can be found in the dashboard. They are the following:
- Account SID
- Auth Token
- Phone number

If all youāre wanting to do is send SMS messages, youāre all set. Youāll just
need to tweak the script and remove any references to whatsapp in the from
and to fields in the create method (line 70 and 72 respectively)! If
youāre running the full gambit, youāll also have to create a WhatsApp Sender
inside of Twilio.
From what I recall, the only difficult part, and I use the word difficult
liberally here since nothing is really all that hard when it comes to this
automation, is creating your Facebook business profile. I called my business
Taranveer Bains Business ā thatās it, just my name, followed by business š.
Assuming everything goes well with creating Facebook business and your
WhatsApp Sender, the next thing youāll most likely want to do, is create a
whatsapp template. The primary benefit Iāve seen with using the template versus
a traditional message is that by using a template, your recipient will not have
to save your phone number in order to receive messages. For example, when I
tried to message my own phone number with my automation, I wasnāt able to
actually receive the messages until I had saved the number in my contacts.
This wasnāt great because I didnāt want to create unnecessary work for my girl.
There were a few other issues I ran into but Iāll cover them later. Check out
the video below to see how easy it is to create a message template!
The Issues I Ran into
Okay so this one is on me for not knowing the limitations of the platform, and this makes perfect logical sense: Twilio stop sending my messages to my gf. This happened, not because I voided their terms of service or anything like that, but because, my gf didnāt respond to any of my messages. This most likely flagged my messages as āspammyā because I was broadcasting one way and not getting any engagement.
The fix to my messages not being delivered was to ask my gf to respond every time she got a message. That isnāt the ideal fix but itāll do for now.
Next Steps
Like I said, itās kinda lame that my gf has to respond to my Twilio number to stop the number from being flagged. Itās also lame that she sends a message to the number and thatās the end of it ā it just goes straight into the void ā«. It would be super cool if I had a way of receiving said messages so that I know it was delivered and that sheās actually cool with me working late. From what I gather, it actually isnāt all that hard to set up a service to do this. From my cursory research, it seems like I need to associate a webhook with my number in the Twilio dashboard and have a server sitting somewhere listening for messages and then performing some action when a message comes through. Now⦠if only I had a server running somewhere where I could do this š¤. Oh wait! I have my remix site (the one youāre reading this post on), so maybe I can just create a resource endpoint here and be about my business.
I havenāt done it yet, but thatās the plan. Iāll come and update this blog post once Iāve done that part!
Closing Thoughts
Scripting isnāt just about automating tasks or writing clever codeāitās about reclaiming time and mental bandwidth to focus on what truly matters. Whether itās sending messages to your girl one or streamlining repetitive workflows (like checking if your enterprise companyās website version has updated), automation is a tool that empowers us to be more present, thoughtful, and efficient.
Shout out to my girl for being the love of my life and inspiring this automation ā¤ļø.
Love is not only about what we can get, but what we can give.
-A. M. S.
Thanks for reading. Go build something cool.