 chord. Hello, OpenJS world. My name is Tilda. I use they, them pronouns. And I'm a developer of Vandals at Twilio. We don't have much time, so I'm just going to dive right in. Raise your hand if you've ever experienced imposter syndrome. Yeah, you know you and me and everyone else in tech. So I was talking to my therapist about this and she was like, hmm, have you considered using affirmations? And I was like, are you kidding me? That's so cheesy. But I tried it and it was surprisingly effective. Since I'm an engineer, for better or for worse, I tend to want to automate things. So I wanted to build a little project to automate sending myself affirmations. I wanted there to be a physical component because taking a physical action is grounding when I'm dealing anxious. And I wanted it to send affirmations via SMS, so I didn't have to open up another tab and get sucked into the internet. So today I'm going to rebuild it for you in one minute or no, sorry, in four minutes. Let me share my screen. All right. So this is going to be interactive. If you'd like to participate, please send a text message to that phone number right there. We're going to use this flick button, which is a little hardware button, and it makes an HTTP request when you push it. And just so you know that it's real, I'm going to push it. You see that nothing happens. So the first thing we're going to do is import a library that I'm going to use to make the HTTP request. And then we're going to write a serverless function. So then we need to make the API call to get the affirmation. I know it's a little extra to make an API just to get affirmations, but that's how I roll. And then we need to parse the response to pull the affirmation out of it. I'm pulling here because error handling is for chumps. So the next thing we're going to use Twilio's API to send the text messages. But first we need to get every number that's texted this phone number. So this isn't something you need to do if you were just building this for yourself. You could hard code your phone number. This is just for purposes of the demo. We need to initialize the Twilio client. I forgot that. All right. So yeah, now we're going to get the messages. This code gets all the messages sent to that number, and then we're going to loop through them. Using a for of loop because we're going to do some asynchronous stuff in the loop body, and we need to make sure that it's going to wait for it to finish. So we send a message. We send a new text message to the number the last message came from our phone number above. And then the body of the message is the affirmation. And then when we're all done, we need to have a call back to say, hey, serverless function, your job is done. You can rest now. So then I'm going to deploy this from the comfort of my editor. So if you haven't used serverless functions before, it's like you just write a function and then you can upload it to someone else's cloud. And they worry about scaling. They worry about routing, which is really nice for a lot of things, including small personal projects like this. So now that it's deployed for the magic moment, I'm going to push the button. And if you wouldn't mind making some noise when you get a text message. Awesome. Thank you so much. Now you've learned how quickly it is possible to get up and running with serverless functions and even hardware. So I'm really excited to like see what you might build. If you want to learn more about this build, I have written a blog post and there is my contact info. If you want to get in touch with me with any questions, thank you so much. Take care, be safe and have a great day. Thank you.