Python-powered Chat Apps with Twilio and SendGrid Transcripts
Chapter: Messaging and workflows with Twilio Studio
Lecture: Using Liquid in the flow

Login or purchase this course to watch this video and the rest of the course contents.
0:00 If we look at our interaction, it was very vague. We said, Come over here and ask. You want a small,
0:09 medium or large size and we check if that's good We say, Great, you've made the right choice and if the wrong you've made the wrong choice,
0:15 it would be much better if we could be specific. And now that we know about Liquid, we can. So if we come over here, we can see where it says Great.
0:26 That's a good size. The send and wait for reply element that has got the data and it is called welcome. So what we can actually do instead of say that?
0:36 Well, say something. Concrete is a good size. So we say double curly ( {{ ) notice our auto complete is coming up here.
0:43 I get it to show on the screen with somewhat small resolution. And we could say widgets, welcome inbound. And as you type, you can see it narrows down.
0:55 So inbound body like this is a good size, and this is the same thing we're going to want over here as well.
1:03 So let's live settle. So this one has a good response, and we could say sorry such and such isn't a valid response a valid choice.
1:16 So let's go ahead and republish those changes or publish the new changes and try again All right, let's kick off another flow. So is it cake time? Yes.
1:32 Greetings from Cloud City Cake Company. What size of cake would you like cake time? I want a huge cake. Sorry. Huge, isn't a valid choice. All right,
1:41 fine. I'll tone it down. We'll have a small, great small is a good size. Now, of course, we need to ask them other information like,
1:50 Well, now, what flavor do you want to want? Chocolate, Vanilla, carrot cake kind of frosting. You want toppings on it? Like Sprinkles.
1:58 We're going to have a lot more of this interaction. But you can see already that we've got this really cool workflow and validation,
2:04 and we're using the liquid template language to actually grab data from one part and use it concretely as we interact with the subsequent part of our workflows.


Talk Python's Mastodon Michael Kennedy's Mastodon