Platform
Docs
Solutions
ContactLog In

Use ChatGPT to Build Transactional Notifications with Node.js and Twilio

We’ll see you here on

March 2, 2023 @ 6:00 pm

Add to your calendar

Open YouTube link

Hosted by

A headshot of Shreya
Shreya

Developer Advocate @ Courier

A headshot of Lizzie Siegle
Lizzie Siegle

Developer Evangelist @ Twilio

Description

Automate transactional notifications designed by ChatGPT and sent across any channel, within your application. In this workshop, we’ll show you how to get started with the Twilio API and the Gmail API.

Transcript

Shreya:

Alright, and we are here. We're live with the amazing Lizzy and Craig from Twilio. Hi, guys. How are y'all doing?

LizzyA

So excited to be here.

Craig:

It's nice to be off mute. We we were, like, waiting for each other to go there. So good to be here.

Shreya:

And I was sort of just, like, panicking at the last moment. I'm like, Okay, the video is going to start. Right before we did, Lizzie was tweeting out a little get ready for the livestream tweet. And she literally asked Craig for like a pun on the dot. And he he just came up with it in like a matter of 10 seconds.

Shreya:

I don't know how you did it, but your brain… Genius! Craig, That was beautiful. Very quick. What was the pun again?

Craig:

I think it's “You better hurrier, f you want to learn more about Courier,” it was something in that space. It was just a rhyme.

Lizzie:

He just like, spit like out and I was like, straight backs,

Shreya:

I feel like if someone asks me something like that right before a livestream is about to start, my brain blanks instantly. It just doesn't work. And wow, I was very impressed with that. Anyway, if you guys for joining from the comments we're live both on YouTube and LinkedIn, so please feel free to say hi. Let us know how you're doing, where you're joining from.

Shreya:

And as we're building out this project with Twilio today, if you have any expectations, anything you want to see or learn about, we have the experts in town. So let us know and they'll help us kind of navigate the project as well before we get started. And my name is Shreya. I am a developer advocate Courier, and I'm the host of this weekly livestream workshop series called Decode, where we just build out cool projects and we talk about notifications because that's what we do for a living and we also have Lizzie and Craig joining us as guest hosts, and they're going to help us build out the project today.

Shreya:

Lizzie and Craig, Do you guys mind just introducing yourselves?

Craig:

Oh, to me. Thank you, Lizzie. Hi, I'm Craig. I am a developer educator here at Twilio, and been with Twilio about four years. I love Twiloio. I think it's really fun. I think it's really fun a place to build. Therefore I love my job because I get to help people learn how to do that and I get to build stuff and get people to build the cool stuff.

I love it so much.

Lizzie:

Oh Craig, that was so good because I agree. I’m Lizzie, She/her pronouns developer evangelist at Twilio. I say I've been here about six years because I was an intern, so technically kind of five full time. And I also….

Craig:

Take 6 years.

Lizzie:

I’ll take 6. I like to add a year to my age. I also love Twilio products. So I find them fun to build with. And then that's then fun to share with others. How to build similar apps, how to use Twilio, or just how to build in general.

Shreya:

I love it. And we have Ben Link joining us in the comments, who was our guest host from last week and he said “Gangster Greg with the rhymes I sense a new video series in the making,” that would be actually epic if this becomes a video series.

Shreya:

Rhymes that you spit out on this. No pressure at all, though. Awesome. So, yeah, today we're going to be building actually, let me backtrack a little bit. Last week when we were joined with Ben, he helped us sort of look into this e-commerce demo website that one of his coworkers had built out. And we sort of went into this website and we saw how Segment is really great at picking up user events and storing them and then giving developers options of like everything you can do with those events later.

Shreya:

And one of those options is sending like really smart notifications based off of your user activity. So for example, when you are when your end user is using your e commerce website, they're like looking at all these awesome products that you have, They add some stuff to the cart. Inevitably, a lot of people are going to leave stuff in the cart and forget about it.

Shreya:

How do you sort of like remind them, Hey, by the way, you remember you wanted to buy this one thing. It was really important to you. For example, I always buy stuff for my dad's birthday is coming up next week and I have stuff in my cart and I'm like, I know I'm going to forget to buy it on time.

Shreya:

So I need those email reminders just to be like, “Hey, remember, you need to get this on time so that it arrives on time as well”.

Craig:

Let's see, what's your dad getting through?

Shreya:

What's he getting? I haven't decided yet, but there's like a little watch, there's a tie, you know, the typical stuff, I need to be a little bit more creative there. But basically last week we built up some like automations where we were able to send users reminders, right? And if they were to have already checked out and bought that item, then those reminders would be canceled.

Shreya:

Those were sent out with email. Since we have our Twilio experts here today, I figured we could sort of do a similar demo, but instead focus a little bit more email, maybe even like multichannel experience, where you're looking at really personalizing those notifications if it's something urgent. For example, you know, you just made a purchase. That's something that I would want to know about.

Shreya:

That's a really good place to send an SMS because I want to make sure no one else is like randomly using my account and making these purchases compared to like a marketing email or something where maybe not necessary for an SMS. So we're going to talk about transactional notifications and before we get started, do either of you want to sort of like try to explain to us what transactional notifications are to you and maybe some great like places that you've seen transactional notifications, notifications either in your day to day life or at work or anything like that?

Craig:

Yeah, I could pick that one up. I think you did an excellent job there of that. That's a great transactional notification of, hey, there was a purchase that just got made this, you know, like you get these now, like more and more like something happened on your account. I want to make sure that's you like that when the bank does that. The bank's a great transactional notification as well something that happened on your account that you weren't actually using your phone for.

Craig:

And then you get this notification of like, hey, just so you know, somebody spent some money on your credit card. It's not typical. I love where AI is getting there. Right? Like the AI is bringing all of this like knowledge. I'm like, this is not normally what you do. You don't spend that much money at this place and you're not in Florida.

Craig:

Sort of like all that, that smarts. And then you get this transactiona notification. Your password changing is a good transactional notification. Lizzie, you got one?

Lizzie:

I like it when like stores and shops give you a promo code. They're like, Oh, you love this. Like, here's a promo code to give you like a discount to like, encourage you to actually buy. And I'm like, Oh, then when they don't send a promo code with just like, You love this, I'm like, Well, you're not really motivating me to complete the transaction.

Lizzie:

A promo code is very like, something on sale.

Shreya:

I also love promo codes. That's a really good example. Awesome. Thank you guys so much. So let's just dive right into building this out. There's going to be multiple steps to it, Craig, do you mind sort of like being our guide to the project?

Craig:

Yeah, let's do it. I like to learn on the spot.

Shreya:

Let's learn on the spot. So the first thing that we want to do is get this actual project set up. So I think, Craig, you already have a link to the demo. Charla, do you mind sending that link in the chat as well so everyone has access to it? If you were here last week, by the way, this is the same projects if you've already built it out, you can continue building on that one.

Shreya:

I'm going to share your screen now so you'll see this e-commerce Segment demo website and you can go ahead and clone it on VS code or whatever IDE you are using.

Craig:

Awesome. Is my screen looking okay? Yell “enhance” at me.

Shreya:

Yes, I love the fact that you just like automatically zoom in on everything. Micah is joining us from LinkedIn and he said that he loves it when the blood donation clinic sends him a text message letting him know that his blood went to someone in need. Okay, That's something that's really valuable, actually, because it incentivizes you to continue doing this good deed in the future.

Shreya:

It makes you feel like, Oh, yeah, I'm like, Actually, you know, you're doing something pretty big when you're giving away your blood. So that's really awesome. And here we have.

Craig:

Sorry and It did an smart autocomplete for me. And I was like.

Shreya:

Oh, no, no.

Craig:

There we go.

Craig:

alright, so I'm going to go into this e-commerce Segment demo site that I cloned down and I'm going to open this up in Visual Studio Code. Where we want to hang out and I'm going to make sure that this is enbiggened as well.

Shreya:

Fantastic. Alright. And the next step is if you could open your browser, we're going to head over to app.Courier.com and then we're just going to go ahead and create a new workspace. I think you're going to need to sign up since this is your first time.

So go ahead.

Craig:

This is always the question. It's a dev. I'm going to do GitHub, I'm going to do it right out of my Google.

Lizzie:

Let's go connected integrations on the side.

Shreya:

Yeah, yeah.

Craig:

I missed that. I'm curious, I'm going to address your that was kind of a weird URL there, but I trust it. I trust it.

Shreya:

alright. Oh, you already have some workspaces that's great.

Craig:

I know these people.

Lizzie:

Who dat? Who?

Shreya:

Oh, my God.

alright, so let's go ahead and create a new one, because I don't think that Jeff is going to want you to start poking in his workspace.

Craig:

Yeah, he probably (unintelligable)... I'm sure I'm. I'm positive. I do want in there. Yes. Alright, let's get me set up. Oh, that's cute. I like that.

Look at that.

Lizzie:

Hi, Craig. As soon as it…

Shreya:

Go ahead. Sorry.

Craig:

Oh, that's magic. That's real nice. Oh, that's real nice. That's clever. What do we want to call this thing? What do we. What are we doing? We're doing e-commerce?

Shreya:

We're doing transactional notifications today.

Craig:

It transactional.

Shreya:

It's a terrible name for a workspace, but that's all I could come up with on the spot.

Lizzie:

That’s a lot of letters, characters, yeah.

Craig:

Yeah, it's...

Shreya:

Yeah, It won't actually show up in your email. And then Micah is saying “Two Twilio superheroes”. That's right. What is Dpro sorry?

Craig:

He has one of the workspaces there. That's David Prothero and he goes by Dpro.

Shreya:

Nice.

Craig:

What do I do? This is a great question and maybe some feedback. I am a marketer and an engineer…I'm just kidding I’m not an engineer.

How did you hear about Courier?

Shreya:

That’s the question engineer/developer advocates.

Craig:

I heard about it doing it live. That's how I heard about it. Here we go.

Craig:

I heard about it I think Shreya because I saw the thing on that episode of Decode with Ben Link and Segment.

Shreya:

Oh yeah, you were in the chat. I remember that.

Craig:

That’s what I should have put on there. Ben shared that. Yeah. Thanks Ben!

Craig:

Let's go ahead. Let’s customize our experience.

Shreya:

I was just going to say we like SMS over here as well, so I'd go ahead and add that in. This is sort of just Courier learning from you and seeing what you enjoy using. Since Courier is a multi channel notifications API, you can decide whatever you prefer. Awesome. I'm going to go with SMS in chat.

Craig:

Yeah. I can send to Slack, huh?

Shreya:

Yeah. Slack, Discord, MicrosoftTeams everything. Alright.

Shreya:

Let’s go with Node.js today.

Craig:

Okay, I was going to say, if I'm going to fall on my face, let's do it in JavaScript.

Lizzie:

Oh, Craig, that was beautiful.

Shreya:

Alright. And if I had to choose one, of course, I'm going to go with Twilio..

Craig:

I mean, I'm looking at the other ones, but yeah, I think I'm going to choose Twilio. I think that makes a lot of sense. alright. My account said. Alright, so let's talk a little bit here about my account said. And so I have a demo account that's up and it's in demoville here.

Craig:

I’ll show you. I clicked the wrong button here. I need to go back to the want to go to the home here. The demoville dashboard. And then here we have this thing called an account said, which is a string identifier. And it's this here. And I'm assuming that when I paste on this screen here, this off token that it's going to show my super secret off token.

And if we could make sure that that doesn't happen.

Shreya:

alright, I'm going to remove it from the screen really quickly.

Craig:

I'm assuming it's a free and do I need to have a messaging service or should I actually build that now?

Shreya:

Yeah, you can build that now. Whenever you've pasted your auto token and let me know. Or do you want to go first.

Craig:

Let's do the messaging service set and then we can come back.

Shreya:

Let me know. Yeah. Awesome. Added that back to the screen.

Craig:

Okay. Sweet. So we're back here. What it’s asking for there is a messaging service set, and I think what this is assuming is that if you are a Twilio user, you probably know what this is. As it turns out, when you build these messaging apps, it turns out that you end up needing to scale them and when you do a best practices to have one of these things that we call a messaging service.

So I'm going to I'll go build one of those. Am I going in the right direction here? Shreya.

Shreya:

You're doing perfect. That's exactly what it is. Yes.

Craig:

Awesome. So we're going to build this messaging service. And what's really neat about this is that with Twilio, you can buy phone numbers, right? So you could buy these phone numbers and they're yours and you can use them to send out text messages and you end up buying a lot of them because it's fun.

Craig:

Like I said earlier, like this is super fun. You end up building a bunch of stuff and sometimes you have a lot of numbers and you want to configure them because you want to send out to a global audience. And so what we're going to do is we're going to build this messaging service and it's going to kind of hold all of the options and the configuration and all the bells and whistles that you can do at one little place so that we can talk about it with a unique ID.

Craig:

So that thing was asking for a messaging service SID and that's what this is going to generate. When we're done, I'm going to build this messaging service and then we'll put a phone number into this messaging service. We'll put what's known as a sender because you can send from all sorts of different things, but we'll put a phone number in here.

Craig:

So this is for our transactional notifications and we're going to say Courier notifications. I think this is probably what you should do is my guess. So when you build this messaging service, one of the things that we do is we ask what your use case is because we can help you send more messages. That way, if we know what it is that you're building, we can help you send more things.

Craig:

So let's see what we're going to do is we're going to.. It's not going to be two way, right? Is it Shreya? Are we going to do two way stuff?

Shreya:

You know, today we're just going to be doing one way stuff.

Craig:

One way, so we're just going to notify my user. So we're just going to send a one way message to our users on it. I’m going to create this messaging service. So here's a place where I could add these different senders. Where I got a phone number, I could add a shortcode. That's the little… I could do an Alpha Sender or WhatsApp as well.

Craig:

So I could put all these things into this messaging service. I'll put a phone number in here later. I think we'll go through that later. So for right now, I'm just going to keep going through this. There's some configuration stuff, like I said, so you can have one place to configure it. And then there's also this compliance info because the regulation landscape is bizarre when it starts coming to messaging and things.

Craig:

And one of the things that recently popped up is this thing where Courier wants to help people who are developing applications on these platforms to be able to send messages better. So there's this thing called the A2, P10 DLC, which to Ben's point of like sounding like the gangster rapper, it kind of sounds like that's where I could maybe I could start with something like that.

Craig:

But this is application. So U.S., a United States application, two person, ten digit long code, that's your phone number in the U.S. and this is you register it so that people know who you are. So it helps to stop spam, right? So that's what they're kind of after there. And you could build this sort of thing.

Craig:

But this helps. So if we know what you are, you can kind of associate it with this messaging service. And once we have all this information for you, we can help you jump through all the regulation hoops. That's all that stuff. So there you go. So now I've completed this. I'm going to view my new messaging service because all of that to say we wanted to get this messaging service SID, which is a string identifier.

Craig:

So I'm going to grab that here and hop back over to Courier and I'm going to pop my messaging service SID there, which starts with this MG. You'll see my account SID string identifier that starts with AC. Alright, now I am ready to pop in my auth token, which I don't want anybody to see, because that is the keys to my Twilio car.

Shreya:

And no worries at all. We've removed it from the screen.

Craig:

Awesome. Thank you.

Shreya:

And while considering that this is sort of like a unrelated topic, but I saw your project, Lizzie, this ChatGTP project that you were working on earlier, GPT I always mess up those letters, the order of those letters. Could you tell us a little bit about it? That was a really cool thing.

Lizzie:

Yeah, I guess like a few months ago when ChatGPT went viral. I was all, Oh, my gosh, I love that. And you know what would make it even better? If it was over SMS. But it's like a question you probably should ask yourself if you work at Twilio.

Shreya:

I was going to say, that's such a Twilio thing to say, Well, how do we make this better?

Lizzie:

I was in the browser, I was all, oh, they have an API. You can probably make it over text message. And then I use the open API. The open air API uses the same machine learning model as ChatGPT, although yesterday or two days ago they released an even better model that they call the ChatGPT API.

Lizzie:

I was all do I have to update my blog posts now, but it's like pretty much the same thing. Just a slightly better model. But yeah.

Shreya:

Yeah, every engineering launch or update is like, oh, it's the same thing, but just slightly better.

Lizzie:

Yeah. So I guess like the app uses NodeJS and Twilio servos functions on the back end to host the app. So you can text in your Twilio number, text it a question, text it like give me a haiku about Courier and Twilio or something, and then I will text it back. So it's like, exactly, ChatGPT but SMS.

Shreya:

Nice and it's an open source project and you can just sort of like get it up and running as quickly as you need to. What I love about it is like sometimes I'm going over to like ChatGPT to actually ask questions and it like, isn't working because it's down. There's too many people using it or something. I love the idea of just like being able to pop up your phone and just asking questions to a number that you already have set up anyway, I'm going to go ahead and bring your screen back.

Shreya:

Craig, you've added all three of the keys that you were asked to and now you can go ahead and start testing it. So you can just copy that little code snippet on the top, right? Assuming that you're using a Mac and then open up your terminal and paste it in there. Yes.

Craig:

How did the Tier X feel about after a set of bicep curls, Dinosore, Very well done, very well done. I love it.

Shreya:

So did you actually end up getting that text? I feel like that's a really important part of this demo.

Craig:

I also went and put my phone number into that. Yes, I did get it. I did. I did get it. And I got it from a number that I bought because I noticed that it was going to need to have a number. So I built that messaging service. I also got a phone number and put it.

Shreya:

I was going to ask if that's your real number of that's a demo number, if we could show that on screen.

Craig:

Yeah, that was that was my real number. So anybody who wants to can get it.

Shreya:

We’ll edit it out afterwards, guys, act like you didn’t see.

Shreya:

Awesome. So now that we have our little dancing head pigeon, we can go ahead and continue. Let me try to remember what the next steps are. alright. We already cloned the project so we can start setting up Segment. This is a part that is the same as what we did last time. Let's head over to Segment.com log in and make sure that the local website that you have is connected to your Segment account as well.

Craig:

alright, here we go. Let's see how we do here. So, okay, I could have had this set up a little bit better than I did, so I'm probably going to need to… I guess it's okay to do my security code on the screen here.

Shreya:

I have removed from the screen while you're doing that.

Craig:

You are so polite.

Shreya:

You don’t want to you know know, risk anything on anyone getting into your Segment demo.

Craig:

Yeah. Yeah.

Lizzie:

It it's not a live demo without a few leaks.

Craig:

Right.

Shreya:

I actually feel people are pretty respectful for the most part, though. I've leaked my API keys way too many times and so far I've been safe. So yeah, that's good.

Craig:

So I'm getting an.. Let’s check here. Oh, I'm getting an email. I've got one e-mail.

Shreya:

Oh, while you're doing that, just like adding on to your project hype Lizzie, you did a workshop, I think, for that same project at a meetup recently. How did that go?

Lizzie:

Oh my gosh. Craig was there too. It was.

Craig:

So good.

Shreya:

Everyone was there. It was huge.

Lizzie:

Yes, it was called developers and dumplings. Some people will say devs and dumps, I say developers and dumplings and yes, I added some slides, made some slides and had people text in to test it out, showed how I built it and based on what people text it in. One person got a stuffed plushie dumpling. Yeah.

Shreya:

That's awesome. I love that. I think I saw that on Twitter. It was adorable.

Craig:

How many dumplings ended up being there? There was a lot of dumplings. There were a lot of different types of dumplings too.

Lizzie:

For a second, I thought you meant like people…

Shreya:

Yeah, I was like, you call people dumplings? That’s adorable.

Craig:

I do now! Then it's just dumps and dumps.

Lizzie:

Like it was 75ish people and 75ish devs and $1300 worth of dumplings.

Shreya:

We have a comment from Dominik saying: “Devs and dumps needs to be on other days other than Tuesdays”.

Lizzie:

We are working on it Dominik!

Shreya:

There needs to be an all day every day devs and dumps party honestly.

Lizzie:

It really should.

Shreya:

24/7. How's it going on your end, Craig?

Craig:

I'm trying to get my multi-authenticator app to log me in and… Oh my gosh, I just got in.

Shreya:

Oh, nice.

Craig:

I am here now. I don't necessarily thet might have had a different sort of workspace setup, so I'm not sure how far we're going to be able to. We’ll try it.Speaker 5

Try.

Shreya:

We'll yeah, we don't we don't need anything too fancy. All we need to be able to do is go into our connect. I think it's under connections to our sources and then we can hook up our website to our sources.

Craig:

Okay, So we're going to my website.

Shreya:

Yeah, go ahead.

Craig:

I've got my website down. Do I need to start my website up?

Shreya:

Yeah, it's probably a good idea.

Craig:

Okay. I will assume that I need to do NPM install.

Shreya:

Yep. That is correct. Glad you assumed that because I forgot to do that the first time and then I panicked when it wasn't working. We are running into some errors. I'm checking why that's happening.

Craig:

Boundary at the root so upstream dependency conflict. Oh let's try to get it…

Shreya:

When in doubt just try it again.

Craig:

Yeah it's a little hard to see.

Shreya:

Absolute worst case. I could just try to pull up the project on my end, but let's try to see if we can fix this.

Craig:

So it's having a hard time finding react. That’s what that looks like at 16. I don't know why that would be. I'm not doing anything, but let me look a little bit. I haven't looked at this at all, so.Let's dive in a little bit and just see why can't it find? Whenever I do see a yarn.dot lock.

Craig:

Let me just yarn. Oh I don't even have yarn.

Lizzie:

I don't think I have it either. Whenever someone says dive in I always imagine like actually diving.

Shreya:

Running… This is gonna take a minute.

Craig:

So this is frustrating, but like, imagine how hard this would be. Like everytime I run through something and it takes time like this, it's like, oh, it's taking so long. But like, imagine what it's doing and like how hard it is to be able to do what we're doing.

Craig:

We're like, we're going to have this like totally random framework that's totally moving on its own pace and doing its own thing, and we're going to do this thing over here. It's incredible. We live in an incredible world that we get to complain about sometimes. But like this used to be a lot harder to do.

Lizzie:

It sounds so empathetic.

Shreya:

I know. Like, Go computer, You're doing great.

Craig:

I'm proud of you, Yarn. You tried really hard there for a bit.

Like, even.

Craig:

Better. Yeah, I know, right? And you tried to push the effort. I'm sure NPM was like, Oh, man, I have to do that now. I'll do that. You know, like there was all sorts of, like, stuff, like a recoil as an incorrect dependency. So we're at the same thing is a warning here, not an error. Okay, so maybe we're going to be alright.

Craig:

We might be alright.I don't knowa ll the drama and the beef between the R and NPM crew, but I'm sure there's some.

Shreya:

There's always some drama.

Craig:

So that's how competition works.

Shreya:

Oh, alright.

Craig:

So I can install the thing. Anybody know what I do to run it? Yarn, Run?

Shreya:

No idea.

Craig:

Oh… Yarn start!

Shreya:

Do we need to do build first?

Craig:

You're right I should read what It says. Yarn build still.

Shreya:

Yeah…yarn build.

Craig:

Yarn build? Alright, build and build.

Lizzie:

Why is it next.js?

Shreya:

Command failed. This is always fun. “Ahoy fam” says Niels. Hi Niels how's it going?

Craig:

Neil’s, hey! Will you fix this for us?

Craig:

alright. So am I running? Is my node doing a weird thing maybe?

Shreya:

You know what I always love is when we have the highest viewership, when things aren't going well during a livestream.

Craig:

I think that people like to watch this. This is like America’s Funniest Home Videos right?.I don't know. What do we want? What do we want to do? Let's check 14, I feel like 14 and then we'll try it all over again.

Shreya:

While you're doing that….

Craig:

Okay so it says all I need to do is rm rm star. That sounds… That's not going to do anything good. Well, that's better. It's not good. It's going. It's working. We're building.

Shreya: What did you end up doing?

Craig:

And so I was using I was using a version of Node that the person who built this library was not using and apparently, like underscore hash is no longer available in the version of Node that I was using.

Craig:

But so that's built. And now we're going to do a yarn start.

Shreya:

We're getting some very great advice from Neil in the chat, “Sudo rm-rf/*”. If you want to check it I’m going to remove your screen from the screen tag.

Craig:

Yes, you know, I tried that earlier when you suggested it and my laptop got really hot. Troll.

Speaker 5

So you.

Shreya:

He said “Jk lol”. Awesome. Let's go ahead and pull that project back up. Okay.

Craig:

So we're ready. I'm on on localhost. Welcome to my house.

Shreya:

Awesome so this is the Segment e-commerce demo website. And now what we want to do is go over to our Segment sources and add this in. Neil said “Disclaimer, I’m not liable for this code”.

Shreya:

alright.

Lizzie:

Let's always add that disclaimer an app. Like, JK LOL.

Shreya:

Alright. What’s said has already been said Neils, it's too late now. Let's go ahead and click JavaScript. Since we’re working on Javascript.

Craig:

Help me out there Shreya.

Shreya:

You can filter through it. Yeah.

Craig:

You might be. I'm new to the Segment stuff. I mean I've loved watching it and I have done a couple of things, but just so we're on the same page, I think you might be Shreya, you are a week more advanced than I am in here. So we're going to call this…

Shreya:

You can just call it transactional notifications just to keep it. Again, we're really bad at naming things because that's just how things are.

Craig:

I'm going to put a label of label on it.

Shreya:

Yes.

Craig:

Go into the local host. Yeah?

Shreya:

Yes.

Craig:

Do I need to…?

Shreya:

I don't even think we need to add a URL right now you can I guess, but we can go ahead and add the source.

Craig:

Yep. Alright, here we go.

Shreya:

I'm also just hoping this works because I barely remember what we did last time. alright, We do need to add this snippet into our project. No, no, no, we don't. I think. Let me try to remember last week's livestream. I believe this part has already been done in the demo application that we have since a Segment expert built it.

Shreya:

But if you are building your own project, you need to make sure to follow this step as well. So let's see, we need to go into debugger on that Segment page and on… Let's go to settings.

Craig:

Settings.

Shreya:

Yes.

Shreya:

We need to get the right key. That's the main thing. So let's.

Craig:

Is this going to be? I'm unfamiliar with what's going to happen when I click this.

Shreya:

You'll get a right key, which is private, but you can delete the source afterwards. So you should….

Craig:

Oh it’s going to generate a specific one for I'll look at you. Thank you for knowing. For knowing that. Analytics JS is what I want? I guess?

Shreya:

Let's go. Ahead and try that…

Shreya:

You know, I'm definitely missing some stuff, but we'll. We'll poke around and find it some where…

Craig:

Yeah, we will. So like API keys it sounds like what we’re after.

Shreya:

API keys.

Craig:

And this is going to be specific to the source that maybe we could take that screen off and I can.

Shreya:

Yes, go for it.

Craig:

Thank you.

Shreya:

Lizzie says: “That’s giving: Here’s some advice, but that’s just what I would do not saying to do it”.

Craig:

alright. So I'm going to copy these off and put them in a place where I can see them.

Shreya:

What did you end up finding? The right key in there?

Craig:

There is a right key.

Speaker 5

And then okay, so what I'm going to have is just…

Shreya:

Save that right key in your config.js file I think.

Craig:

Oh, there's a config.JSON and I see Persona's API key analytics right key and that's where I'm going to… We can show my screen real quick because I haven't put it in there, but awesome, let's do that and then we'll drop back. So I've got config.JSON open and there's this wonderful object here that has this API as, the key and there's this analytics right key.

Craig:

And on my API key, this is where I'm going to drop that. I am assuming that what that's going to do is it's going to give this config.JSON going to load when we load the web server up and it's going to have access to this analytics right key and therefore I won't ever leak this on the thing.

Craig:

Dom who's on the clock, showed me this cool thing called Cloak, which I'm going to turn on. Okay, So, so it should, I think it will cloak the screen, but.

Speaker 5

Oh, that's cool okay.

Craig:

Yeah, a nice little plug in. I haven't use it enough yet to be comfortable to know exactly if we're safe. So let's, let's the take my screen off again and I'll go grab my right key and I'll put that in there.

Shreya:

alright. Your screen is off and yes.

Craig:

I might. There's also a source idea that I might need. Do you know if that's true?

Shreya:

I don't think so. We didn't do it last time, so let's just try it without it. And then if things go horribly wrong, we can come back to that.

Craig:

alright. alright.

Speaker 5

So I have what you might need do is rebuild your website.

Shreya:

Yes.

Craig:

One second, Yeah. Let's take my screen down. I think I left the… over here.

Shreya:

Go off. I haven’t added…

Craig:

Okay. Oh, yeah, delightful thank you. And so I've got I've got that added and I am going am…I am going to start your build is what I'm going to do again.

Shreya:

Dominik said cloak should be mandatory for every dev and I'm so glad that you brought it up because I didn't know that it existed and I'm glad that I do now. Is it just like an extension? What is it? Or an application?

Speaker 5

Yes.

Craig:

Yeah. So it's like a it's a visual Studio code extension. And I think I think that Dom can correct us in the chat because Dom, you're part of the show now top. If you are on a page like a .EMV file. Right. It willl just kind of blur it out for you. I don't know if it's like using a regex on like what looks like API keys or if it's using a file type.

Craig:

But whe he showed it was like, oh my God, I needed this forever, you know, because like, how many times have we leaked our phone numbers or other stuff or especially our API keys, which is of course the most dangerous.

Shreya:

That's great. Yeah.

Craig:

But like you said, a lot of people are very nice about that when you do it. So. So we're built.

Shreya:

Right. We're built. I'm going to add your screen back in right now.

Craig:

I'm going to restart it.

Shreya:

And what we should see when you have… When are you going to restart?

Craig:

Yep.

Shreya:

Okay.

Craig:

I built and I restarted. And if I go, you want me to go to my my local host right?

Shreya:

Yeah. Go here and just click on stuff. Just start shopping.

Craig:

Let’s shop for your dad.

Shreya:

What would I get for my dad for his birthday?

Shreya:

There's nothing.

Craig:

I've heard about this problem. Okay?** **I don't know what's going on?

Craig:

You just started a database. Where's the stinger coming from? Oh, there it is.

Craig:

Okay, There you go it just took some time. Let's see what dads like slippers. I don't know if your dad's a slipper guy, though.

Shreya:

That's true. I feel like all dads are slipper guys.

Craig:

I like a flip flop I don't know about slippers.

Lizzie:

Flip flops can be slippers, though.

Shreya:

You know, that's where I was going. I was sort of thinking of the larger umbrella.

Craig:

Oh, really? Is this like a hot dog thing? You know what I'm talking about?

Shreya:

I have no idea what you’re talking about.

Lizzie:

Is a hot dog a sandwich?

Craig:

Is a hot dog a sandwich? Is a flip flop a flipper, a slipper.

Craig:

It's too hard. You can never have this. Ooh.

Craig:

Very nice. I think this. This is nice dad wear that I like.

Shreya:

I like that you know nothing about my dad, but you're like, this is going to look great.

Craig:

I think it would look great on it. He's got pretty big feet, right?

Shreya:

Sure.

Craig:

I told you. I knew it, I knew. alright. So he probably likes the blue, am I right?

Shreya:

Is a hot dog a sandwich. I think that's what you were talking about yeah. A hotdog is a taco.

Craig:

This is really great. But we want to take this off, too. There's a there's a cube thing that Brant Scully likes to do, Brant he's at Twilio too. Is a pop tart a ravioli ? That's the great question.

Shreya:

Yeah.

Craig:

There's a cube rule and that tells you that. Yeah. Can I do it real quick? Is that okay? Can we get a little silly just for a moment?

Shreya:

Oh, yeah. Go for it.

Craig:

So, Cube rule, hot dog Cube.

Lizzie:

Cube rule.

Shreya:

Of food identification.

Craig:

Yeah, are hot dog sandwiches? And so, like, these are classic sandwiches. Am I a sandwich? And so you don't know you're excited? Yes. It's really nice. Great. Because there's your pop tarts are ravioli. Right. And then, and then pop tarts gets in the game right.

Craig:

And it talks about this is really it's really smart and really and not part of what we should be doing at all.

Lizzie:

Structural, appearance, ingredients...

Craig:

It's so good. And it really does help with the debate as it happens.

Shreya:

Yes, it's a very important debate. I'm glad you brought that up. Yeah, also that form of content, just that format with the screenshots, the tweets, that is perfect. I would just gobble up any content in that format. Awesome. So what we** **want to see is we just want to make sure right now that Segment is able to actually see the stuff that you've been doing on this website. So let's head back over there and head over to the debugger that Ben told us to look at. Yeah. Transactional notifications.

Craig:

Alright, debugger.

Shreya:

Yes. Awesome.

Craig:

That's me.

Shreya:

That's you. That's everything you've been doing. Yeah. You've been clicking on some things. Sweet. So the next step is actually making sure that we're now able to send notifications based off of these events that you're doing. Right. Because ideally, once you leave your stuff in the cart, we want Courier to be like, Oh shit, he has stuff in his car, but he hasn't done anything with it and so now we need to remind him.

Craig:

I mean, quite literally, these are the shoes for your dad Shreya. This is the example that you gave in the beginning.

Speaker 5

Yeah, Yeah, exactly.

Shreya:

I needed that reminder.

Craig:

And you're going to get this for your Dad’s birthday and we're going to help you with Courier.

Shreya:

We're actually going to buy something by the end.

Craig:

Not like I hate these shoes.

Speaker 5

What would you do? Do what you got to do. For the livestream? Oh, let's head over to Courier and make sure that now we have access to these events in there. Sure. Let's just click. I'll do this later.

Craig:

Oh, this later?

Shreya:

Yeah, because we already have Twilio set up. Yeah. And we can head over on the left menu if you click on channels and then you can.

Shreya:

Yes, that's a good idea.

Craig:

That's probably too big. But I'm going to click on channels over here.

Shreya:

And then just find Segment. It should be somewhere in there. You can just command f it or you can filter.

Craig:

I'm sorry, where?

Shreya:

On the right where you see search. You

Craig A

Oh, okay. I’m sorry.

Shreya:: If you just type Segment in there. Yeah we can close that.

Lizzie:

What does it mean, “Send to the best of?”

Shreya:

Oh send to the best of. So when you have multiple different providers, you can either select the say that you want to send to all of your channels or you send to the best of your channels. So let's say you had like send great in Twilio in there it would try to send would send great if something went wrong, let's say your API key was configured wrong or something, that it would automatically go to Twilio after.

Craig:

Wasn't playing a judgment. I was like, We're going to Twilio over Sendgrid, right?

Shreya:

Oh yeah. It actually just like has its whole like, I prefer Twilio…or No, it doesn't do that. I don't know where I was going with that.

Craig:

We’d be happy to write that if you…

Shreya:

Assume and then let's go ahead and copy our Courier API key from here head over to Segment again. And now we're going to add Courier as a destination in here. So if we go to destination sweet awesome add destination on the top right. Neil said”I have some opinions."

Craig:

Alright. So…

Shreya:

Awesome and we can go ahead and can you try to search for Courier. And if Courier doesn't show up, then I think there' something…

Craig:

We've got some people to talk to.

Shreya:

Now, we got some people. We got to make some calls.

Craig:

I'm jumping ahead. You gotta tell me.

Shreya:

You know, you're good. You did the right thing. Yeah.

Craig:

That was intuitive. Just intuitive. So i configured Courier, which is what we want. Yeah. And I've got my…This is what we built. This is the the the jammy and the destination name.

Shreya:

Oh, God.

Craig:

This is for me to do, yeah

Craig:

Exactly. Oh actual notifications. Yes. We're never going to call destination just in case it gets confusing because like...

Shreya:

So what this is going to do, Do either of you want to take a stab at what this does?

Craig:

Yeah. Or Lizzie, you want to do this? You've got more more skills talking about the segment.

Lizzie:

I've been wondering because like, this looks different than what I did. I think like either the console updated or like, well, I never use Courier in it, so maybe that was it.

Shreya:

Yeah, that's a really fair point.

Craig:

So I guess I can kind of take a shot at this.

Shreya:

Please do. Please do.

Craig:

And then Ben Link is in the chat or he was, maybe is in a meeting slightly paying attention to what we're doing. But so what happens? We got a source, right? So the source is the website and the source is going to track events and it can send to other places. And it's kind of neat because like a bus, right?

Craig:

So, it sends these events and then it can send to different places. I could send this to my data warehouse, I could send this to all sorts of marketing things. So like now I'm starting to get out of my realm of like marketo, I'll say the word marketo. Lots of the stuff that people talk about. So you could send you can send information into your salesforce.

Craig:

That's it. That's a destination. And what we're going to do is we're going to send these events in to Courier, and Courier is going to do stuff with that. That's the the destination. How’d I do?

Shreya:

It was very eloquent. Yeah, go ahead.

Lizzie:

I like the bus metaphor. Craig, I was wondering if Courier was the destination or like a middleman. Middle, middle person, I guess.

Craig:

I think it's one of the bus stops.

Shreya:

It, it's. Yeah, it is. That's correct. It is a destination. And what's going to happen is that once we add our API key in here Courier is going to be able to access all of these events and then through Courier you'll be able to send notifications based off of this event. So you might say, Oh, if someone clicked on this product, that event will be accessible in Courier.

Shreya:

I want to send a notification when someone clicks on a product or something like that.

Craig:

It's like a like a handler, right? For in it in JavaScript town, like if you're like an on click handler, you can put a bunch of stuff to say, like listen to when this click happen. So basically we're saying like, Hey, when something happens on this, it’s specifically in the source that we did, when something happens on this website, this is an event that's happening and I want all of these things can listen to it.

Craig:

I want to send it to all of them. And then Courier is going to do stuff with them.

Shreya:

And I think Lizzie actually did bring up a really important point, which is that Courier as an API is not the one that's actually sending out the message. It would be Twilio that's sending out the SMS or some that's sending out the email. That's what you were trying to get at. Yeah.

Lizzie:

I think of Courier as like a partner.

Shreya:

Yeah, we're a partner.

Lizzie:

Like Twilio is in there. Yeah. Like, yeah.

Shreya:

Yeah, exactly. That's the actual first step that we did was set up Twilio. We got those API keys right in the beginning as well, and you can sort of decide how you want to do it. Ben gave you a five out of five stars.

Craig:

That has made my month. I thank you Ben. If Ben says you did a good job, Ben is so good at doing this so… thank you.

Speaker 5

I know I'm like the best thing.

Shreya:

I know I'm like struggling to keep up with everything he did last week.

Shreya:

I'm like, Oh, we click on… What? On that?

Craig:

Is my screen down Shreya?

Shreya:

It's there. I'll remove it.

Craig:

Okay, thanks.

Shreya:

You're going to go ahead and paste your API key in there and then see that.

Craig:

I did it. It’s saved. So it's it's back. Yeah.

Shreya:

And then let's play around with that website again.

Craig:

Okay. Alright. So, you know, the.

Shreya:

Previous events aren't going to show up, but now everything that you do should.

Craig:

Be okay. This is such a dad shoe. That's such a dad shoe. It's.. Is it like a snake? Is that like snakeskin? Is that what I was trying to do?

Shreya:

It does sort of look like that from afar. I don't know what it's trying to do.

Craig:

Yeah, I get that.

Shreya:

I think my dad would disown me if I got him that though.

Speaker 5

So we're going to put it the cart, you think about it.

Craig:

Go, go, Swift, Go, swift. Joe. I don't know.

Lizzie:

I guess there should be a Tafter the S. Yeah.

Shreya:

I think they were kind of trying be funny, but they don't have Craig, you know.

Lizzie:

I appreciate the attempt. It was a valiant attempt.

Craig:

I would call these Nike skin like that's what I would do. Like frog skin.

Craig:

Or you know, Snike’s.

Shreya:

Nike's taking notes in the live stream like…

Lizzie:

Alright.

Shreya:

Let's head over to Courier. And now we're going to this is hopefully where the magic happens. Let's go to automations and then create. Oh, did the events show up over here? Maybe reload this page?

Craig:

Oh, look at you thinking ahead. Let's see. alright. So I'm going to go to to my destiny thread. I should be able to see it there or no, Do I see it in sources?

Shreya:

Ideally, you should see it end Courier if things are working out.

Speaker 5

Oh, wow. Oh.

Craig:

Sorry. So then lead me. Where am I going?

Shreya:

Let's try reloading this page.

Craig:

Okay.

Shreya:

Oh, this happened last time too. Oh, my God. I made the same mistake. Okay. When we added the API key in Segment, there should be a little like a toggle thing that we have too. So on transactional, yes. On this page where it says transactional notification destination. If we click on that and then also remember that. Yes.

Craig:

I booped it. It’s been booped.

00:51:

Shreya:

You did it. alright. Let's play around with the website a couple more times and then maybe actually click on the cart, since that's a thing that we're going to want to see later.

Craig:

Dad's getting some shorts! And I don't want to check out. I just left them in the cart.

Shreya:

Okay, cool. Now let's head over to Courier again the channels page and to did anything show up? Scroll down?

Craig:

This is.. Am I on the right?

Craig:

Yes. Okay, look at that. We did it.

Shreya:

The magic of making sure things are active. Sweet. So now you can see how Segment was able to track those events and then send them over to Courier. Since we added Courier as a destination, let's now try to… Oh, this is where ChatGPT comes in. So let's go over to the designer first, because before we send notifications we need to actually create them.

Shreya:

But you know, we're going at it quickly. We're in a live stream. We have not that much time left. So we want to just build a notification quickly and then get to the automation. So if we click create notification and the first one that I want to ask you to create is a cart checkout reminder. Oh, let's go back.

Shreya:

This is the automated template that everyone gets when you first click create. But we want a blank one. And yeah, let's click create notification again. Awesome. So this is what a normal create notification workflow should look like with click cart checkout reminder and then use AI to generate notification content.

Craig:

No way. What does that mean???

Lizzie:

What’s that mean on the back end?

Craig:

I love that button. That's such a good button to click. Oh, my gosh. alright. What is general notifications. Right? I'm sorry.

Shreya:

General notifications is just okay. That's side note. Just like, forget everything we're doing right now. When we talk about like, user preferences, we want to make sure that users are able to sort of decide when they want to get notifications and which channels they want. And so within Courier, you can create topics and say, Oh, these are marketing notifications, these are urgent notifications.

Shreya:

So right now this notification has been pulled into a topic called general notifications. You can change that name to whatever you want to later.

Craig:

Gotcha. Yeah, is this AI right there?

Shreya:

That is AI generated right there so you can go in and edit things if you want to, but you don't have to start from scratch. Is that a smiley?

Craig:

I was going to…

Shreya:

Very important.

Lizzie:

I'm curious what Craig's most used emojis are?

Craig:

Oh, yeah.

Lizzie:

It would be a burrito.

Craig:

Muscle rocket, the popcorn.

Lizzie:

The shrug.

Craig:

We need to add a channel, though. We don't want email right?

Shreya:

No we can change the text. So let's go ahead and add SMS.

Craig:

SMS. That's what I want. I don't need to search. It's already there. The best of the best. And it's got SendGrid integration too,Twitter and Slack. That's awesome, alright.

Shreya:

So now we can click on SMS on the left and make sure that our SMS is actually designed correctly as well. So you can just drag and drop all of these little.

Craig:

No… All these little AI widgets?

Speaker 5

Yeah.

Craig:

Your customer name.

Shreya:

Can drop into.

Craig:

Message body. I gotcha. Dear customer name burrito. Look at that. It remembered my burrito. We wanted to remind you that your dad's birthday's coming up and you left stuff in there sincerely store. That's fun. That was so fun.

Shreya:

I'm glad you're having a good time.

Craig:

And as a developer that didn't feel too like hand wavey. I love it.

Shreya:

Awesome. And let's go to the top. Let's publish this notification. Oh, right there. Yeah.

Craig:

I got it right with this published.

Shreya:

And what we can do. I think there's another one that we can create, which is like a thanks for shopping with us if someone happens to complete the entire workflow. So do you want to go back and create another notification template for that so we can go back?

Craig:

Do you want me to?

Shreya:

Yeah, I do.

Craig:

I absolutely do. I can show you. So I'm going to go back to my channels.

Shreya:

You can go back to the designer directly.

Craig:

Now we're going to need some help. Designer. Oh, designer. It's highlighted. I wasn't seeing it. I’m going to create a new notification. And this is for like….

Shreya:

Thanks for shopping with us, just like completing the work flow.

Craig:

Thanks for shopping notification and I want that.

Lizzie:

Has anyone ever not checked that box?

Shreya:

It's actually a new feature. We only released it a couple of weeks ago.

Craig:

Well, is it based on these words that's here? Is it going to do it?

Shreya:

It should!

Craig:

Can I do it? I don’t want to… I'm going to make it…

Shreya:

No, I think it'll do it. You should go for it. Let your creativity take the wheel.

Craig:

Thanks for thinking of your dad.

Craig:

Because it's the birthday. We're getting a birthday present notification. So like, you'll need a little bit more to get this notification. Oh, my gosh. Look at this AI. Yeah.

Craig:

Your dad is very lucky to have a child as caring as you are. Look at this Shreya! Beautiful.

Craig:

Wow. Okay. alright. We're going to add an SMS. We're going to send this as an SMS. That's we want to do, because as soon as you get it, we want to tell you that you're great. And I'm going to click on that that and I'm going to say, Dear…

Lizzie:

I love the drag and drop!

Craig:

It feels really good. I know that you're jealous that you're not doing this right now everybody, but I just wanted to take some time. This is thinking of your dad, especially. I cannot not let AI say that to us. I was going to say ps thanks again. I'm going to put it all in there.

Shreya:

Just put everything in there.

Craig:

I love it. It's like PS Thanks again. And I can add stuff. I can add stuff if I want to.

Shreya:

You can add stuff you can ad images, you can add links.

Craig:

I cannot imagine. Even though this has SMS you can make this in SMS. Beautiful. Awesome. I'm going to get rid of this because I don't want to break anything.

Shreya:

We can publish those changes. Sweet and then what we can do as head over to automations. So now that you have your notification templates, you know what they look like. Now we want to be able to actually create an automation that takes the Segment event and sends out these templates. So yeah, let's go ahead and create one.

Craig:

Let's do it. I saw this on Ben’s.

Shreya:

Yes. Unfortunately, we don't have the black and white mode because it's not out yet. That was just like a sneak peek for last week's livestream. So let's go click on the right in the middle of the page. Do you see the word that says Star or Yeah, you can change the template name. Go for it.

Lizzie:

Nice.

Shreya:

And then we can click on start and that's where you decide what your trigger is. So our trigger is going to be Segment and it's going to be a track event. So in the second list of options, if you click on track and you can…

Craig:

So this is, this knows because of the source that you hired up for specifically for a Segment if there is other things that would.

Shreya:

Well this will show up automatically so not necessarily just because you added Segment this is just an option available to anyone when you click on track, that's the part that shows up. So hopefully there's a drag and drop and these events are only showing up because of your Segment.

Craig:

Wow, that's neat.

Shreya:

Yeah.

Craig:

So we're going to product added is what we're going to shoot, right first? Is that right?

Shreya:

Product added I think, yeah we can do product added.

Craig:

Because I haven't checked out yet that's why, is it using the events that have been sent it since I haven't checked out that's why we can’t see that there yet.

So, we will do product added to the cart and then that's what we want to say, that the shopping cart one.

Shreya:

And we can go ahead and click on… Actually just try to try to do what you think is intuitive. I want to know how...

01:00:

Craig:

So audience events trigger this automation.

Shreya:

Well, you already have a trigger set up, so we don't need this. We can just click on the little minus sign and then you want to click on new step.

Craig:

Oops. Oh, I clicked the wrong one. I clicked the wrong minus. alright. Okay.

Shreya:

Awesome. And then click on new step. On the middle of the page. Sorry.

Craig:

I see. I see.

Shreya:

Sorry there’s a lot going on there. And then we want to send the notification, so we'll click on the first option.. Awesome. And we should be able to add a template ID. So you want to go into your designer, you can open it and in new tab if that's easier.

Lizzie:

Not the template ID on the left.

Shreya:

That’s the template ID for that automation template we want. That's a great question.

Lizzie:

That has multiple templates.

Shreya:

Yes, exactly. And we can click on the little settings icon next to cart checkout reminder almost said chart check out reminder, but copy that notification ID.

**Craig: \ **This notification ID. Okay.

Shreya:

Yes, paste it in the template.

Craig:

The template. Okay.

Shreya:

And you want to send this to just whatever phone number that you want to add in. So I'm going to take it off the screen.

Craig:

I don't want to send it to the…

Shreya:

You can actually send it to the user…

Craig:

Get something in Segment, but I haven't even sent my phone number.

Shreya:

Let's try it. Let me see if I can remember what we did. I think it was refs.data.dot.user_ID

and it might not be underscore it might be a capital I. But yeah, I think it was fine.

Craig:

That was the thing.

Shreya:

That was the thing from last time. Sweet.

Craig:

I don’t know If I'm signed up in my local jammy that way, you know?

Shreya:

I think it should it should be based off well we'll just try it and see. So right before refs.data you're going to want to add quotes around that. And let's also add I think it's a user underscore ID : and then refs.data.userID.

Craig:

I feel good.

Shreya:

And then let's close the quotes after a user ID and then reopen them before refs.

Craig:

We're making a JavaScript object with a key is user entity. That's the…Gotcha. Okay. I thought that that felt a little strange. I feel better. That's okay.

Craig:

So this is this is like pulling who this is. This is inside. The refs is inside of Courier but it's what's being passed across from Segment.

Shreya:

This is yes exactly. Let's try publishing this. What does it say? Invalid field definition. So we're missing the quotes around user ID as well.

Craig:

Oh, yes. So, Json, it's Json. alright. I feel better about everything.

Lizzie:

Now let’s send this message.

Shreya:

And we'll need to go up and publish this. If we scroll to the top sweet, and then click on invoke. Once we invoke it, that's when this thing is live. And then once your user is interacting with the actual website, it should work. Click, create, test event. We can just create test event. We don't need any test data.

Shreya:

Oh, you need a charger.

Craig:

I need a charger. Let me go get a charger. Is that okay? Are we okay?

Shreya:

It's okay. Yeah yeah yeah.** **Go for it. We're good.

Lizzie:

Shreya we should like, do a dance or something.

Shreya:

Do a dance or something???

Lizzie:

You have a guitar of the background. That's perfect. God.** **I didn't know you played.

Shreya:: It’s a ukulele, but it's just an unusually sized ukulele, so it just looks like a guitar from far. But it's relatively small.

Lizzie:

It's cute.

Shreya:

You know what I did? I got this in like November of 2021. I want to say when I moved to SF., I was like, wow, I want to learn how to play the guitar. And then I bought it because I didn't want to invest in a really large instrument. And I said, if I learn it in a year, then I can tell myself to get an actual guitar.

Shreya:

And I didn't learn it in a year. I only learned like four chords. And then, Hey, Craig, we're just talking about ukuleles. And now I just play every single song, especially every single Taylor Swift song with just the four chords. So it sounds terrible.

Craig:

Let's hear it. Let's hear a Taylor Swift song.

Speaker 5

I'm really getting paid enough to do that. Embarrass myself, no!

Lizzie:

Hint hint.

Craig:

No, almost got this thing charged. But we're close.

Shreya:

So Seth gave us some really good advice that's going to be useful. He said that we want to change up our Json, so let's head back into the designer

Craig:

Thank you, Seth. Alright. I am heading back to the design. Which was?

Shreya:

The cart check out?

Craig:

No. Okay. That guy?

Shreya:

It was. It was in the automations page.

Craig:

In the automations.Alright. Yes. This jammy here is what we need.

Shreya:

Do you want to just copy it from the comment?

Craig:

I would love to, but I'm going to copy it from I see the comment. Yeah.

Shreya:

Oh yeah.

Craig:

I see the comment. So that's the whole to that, to the object. Right?

Speaker 5

Yes.

Craig:

User ID, $ ref…Data…UserID.

Craig:

So is that jammy, close that jammy let's go… You don't need a trailing comma. I think we should we’re good. That feels… No. Doesn’t like it.

Shreya:

Something's wrong with that. I don't know if we should be adding.

Craig:

It’s Json?

Shreya:

I think we need to add those quotes in…

Craig:

Bringing the quotes back.

Shreya:

Yeah. Let me see if Seth is available right now. He might have a meeting though.

Lizzie:

So many meetings.

Craig:

So everybody check my code.

Shreya:

Oh, sweet. He can join.

Craig:

I wonder if this might be enough to jam me here. I'm like, okay.

Lizzie:

Oh, good.

Craig:

I see what's already right? Talking about field action.

Shreya:

Alright. We have Seth joining in and helping us out with this part. Hi, Seth. How are you doing? You want to introduce yourself real quick?

SethA

Hey, Craig. Lizzie, great to meet you. Yeah. Seth at Courier was just checking you on a live stream and saw you try to work with some of the rest of the automation. So you actually got everything almost all the way here. It's just going to be user_ID for the key there into. But you got all the stuff cleaned out.

Craig:

Okay, awesome. I'm being told that I have an invalid field definition. I'm going to trust that it knows oops, I'm quick and save and I don't mean it, should it, Json?

\ SethA:

That's correct.

Craig::

Look, I'm going to. Okay, here we go. Thank you. Awesome. Thank you. Nice to meet you Seth.

Lizzie:

Oh, by the way, nice to meet you Seth.

SethA

Nothing like crashing the live stream, right?

Shreya:

I’m glad you were able to.

Craig:

Oh this is like… Peer programing. This is amazing. Let's do this all the time.

Shreya:

Awesome. So we can go ahead and invoke this. Now. We also have Rishab joining us in the comments saying hi. Hi Rishab!

SethA

Hi.

Shreya:

And we can invoke this. I think we should publish changes first and then invoke it.

SethA

Just cross our fingers.

Craig:

They have them published.

Shreya:

Maybe cancel it and then reinvoke it just to be safe.

Craig:

What is this? Is this deploying?

SethA

Go ahead and cancel that one that’s running.

Craig: \ Is that what invoke means here? What does invoke mean?

SethA

Run

**Lizzie: \ **Will that run the curl request?

SethA

Exactly. Basically behind the scenes runs that command for you.

Lizzie:

And it knows your auth token because it saves your auth token here?

SethA

We do it on the backend. Okay not actually saving the auth token, we mimic it basically.

Shreya:

Oh one thing I do want to make sure is that we have a user in your Courier account saved with the same user ID that we're sending this to. So what you're going to want to do before we test it out is head to the users on the left menu and add a new user with whichever phone number you want to save this, send this to.

Craig::

Yeah.

Shreya:

Alright. Are things going slow? Is it just my wifi or?

SethA

So things are.

Craig:

Back canceled, stopped and refreshed. (Garbled robot speak).

Lizzie:

Craig is freezing up.

Shreya:

Oh, okay.

Craig:

I'm. Yeah, I'm going to refresh this. You feel. I feel like it might also be my computer.

Shreya:

I think it was his computer. Okay. alright.

Lizzie:

So thought the office wifi would be good.

Shreya:

I think. Well, his laptop was, like, almost out of battery, so it could just be that it was struggling to keep up over there. Yes.

SethA

Time for ukulele interlude, right?

Shreya:

No, Seth, we're not doing that.

Shreya:

Awesome. Craig's back. Hey, how you doing?

Craig:

Good. Sorry about that. I don't know what that was. That was… I think I did something memory wise on the computer. Hello? Leak or something. So here, here's the page. So here's a I’m the user.

Shreya:

Oh, you're going to need to screen share again real quick on streamyard.

Craig:

Oh, oh, oh. Okay.

Shreya:

Yeah. It's sort of just like removed all of your screens.

Craig:

Okay, Awesome. It's got to come in. Here comes. Okay, there it is.

Shreya:

Yeah. Go ahead and open up Courier and then I'll add it back in.

Craig:

Alright, Here we are at the user screen, which you asked me to click on before it all blew up.

Shreya:

So we can create a new user. And I think the way I have it written out right now is Courier test. So let's just add Courier test. Normally when you're building out a proper website, you're going to have like a proper authentication system built in this demo website doesn't. So we just sort of have, you know, whatever. Can you capitalize C and T.

Shreya:

Awesome. And then I'm going to remove your screen from the actual stream itself and then you can go ahead and add phone number you want to be able to send these messages to.

Craig:

Very slow, I hope that my streamyard is not the same again. I don't know what's going on.

Craig:

I don't know if it's my battery is charging. That's what's happening. I will put my phone number.

Shreya:

Absolute worst case. We might even want to just put this stream on pause for today and then come back. Craig, how do you feel about?

Craig::

I can hear myself being delayed? Uh.

Craig:

Go around to the office. Sorry, I'm coming. I'm trying to come back. I'm trying to be here. You hear me?

Shreya:

Alright? Yes, I can hear you. Do you want to stop screen sharing? I feel like that might be part of what's eating up the connection. Awesome. How about we just take a break for today? We'll put this on pause, and then we'll reschedule the rest of this live stream. Since we're almost out of time anyway, thank you so much Seth for joining us at the very last minute and making sure this automation works.

Shreya:

It's sad that we weren't able to see it kind of actually in action, but we'll make sure to next time.

Craig:

This is a cliffhanger. This is a cliffhanger. We just said. We said it's this is what this is good that you have to come and see what happened, what's going to happen. I love that. That was really fun. Shreya, that was really fun. The set up there was really fun. And I think I know what's going to happen. I feel it.

Shreya:

Thank you. You feel it?

Craig:

When is your dad’s birthday though? That's the thing. We have to get this done before your dad’s birthday.

Shreya:

That's right. So we'll be we'll be back before March 7th. We'll see you guys probably early next week. I'll schedule this out. We'll tweet about it, make sure everyone knows. Richard says CSPAN,..... Awesome. Lizzie and Craig, is there anything that you want to say? Any last thoughts before we leave?

Lizzie:

Craig, any videos to plug?

Craig:

Yeah, sure. There's we have a Twilio? Can I put it in the comments?

Shreya:

Yeah. Yeah. If you put in the private chat I can add it.

Craig:

Oh you put it forward. Okay. Yeah. So, so we anything you want to learn about Twilio. We have a level up program. Anything there that you want to do if you thought that like, well that's neat. I didn't know I could send text messages or you send email and things like that, so come check us out. We got all sorts of educational stuff there.

Craig:

Fun stuff like this is a very fun trip. Thanks or thanks for having us on here. I think we have very similar fondness and I love the app, that drag and drop and the AI! Oh! I love a checkbox that says “Let AI do it for me”. Oh.

Lizzie:

Well, it should auto check.

Shreya:

Yes. Seth don't know if you saw that part of the livestream, but they were very impressed with TJ’s ChatGPT.

SethA

We have some more stuff coming in the next few weeks, months on there as well, so hopefully we can we can stream some of that stuff as well. But yeah, excited to see a bunch of it.

Shreya:

Alright, we'll see you guys next week. Bye!

SethA:

Thanks for letting me crash.

Build your first notification in minutes

Send up to 10,000 notifications every month, for free.

Get started for free

Email & push notification

Build your first notification in minutes

Send up to 10,000 notifications every month, for free.

Get started for free

Email & push notification

Platform

Users

Content

Channels

Sending

Workflows

Preferences

Inbox

Workspaces

Observability

API Status

Changelog

© 2024 Courier. All rights reserved.