Content
If you've been looking for an easier way to do web scraping or data extraction, then you may want to consider using Appify. . Appify is a diverse platform that you can use to build, deploy, and publish web scrapers in Appify world, these are called actors. You can then use these actors to extract data from across popular platforms such as TikTok, Google Maps, , LinkedIn, YouTube, and so much more. And when paired with ship, you unlock a new realm of automation. Let's look at a use case where we have a buildship automation that accepts a YouTube video, URL. When we execute this workflow, we'll use the Appify, get YouTube's caption node to extract the captions from the YouTube video, and then we'll use Tropic Claude to generate an engaging set of quiz questions along with their answers. We will then structure the quizzes. In JSON format, And then finally our workflow will return this structured version of the quiz we generate from here. We can take this and plug it into any front end of our choice to create engaging quizzes that we can share with our audience after every video we publish. . We're going to be building this from scratch. But first you'll want to make sure that you have an Appify account. Once you do that, you're gonna wanna go to the console, This is the YouTube actor that we're going to be using from Amplify to extract the captions from any video we give it. We'll make sure we leave a link to this actor in the description of this video. So we're gonna start from scratch and we're gonna create a new workflow and we're just gonna call this YouTube quiz generator. Our workflow will need to take in a video URL. So for that we can add a new input of type string and we'll just call this video URL. Next, I'm going to add our appify node for that. I'll bring up the Nodes library and then I'll scroll to the Appify Integration Group. And you can see currently buildship offers amplify data extraction nodes that you can use to scrape data from across YouTube. Instagram, Reddit and TikTok. We're going to be using the get YouTube captions node, so that will add the node to my workflow. The next thing you'll want to make sure you do is add your Appify API Key here. If you don't already have that saved in Buildship, you can go back to Amplify and then go to Settings API and integrations, and then you can copy it as personal API token and save it in Buildship. The only edit we need to do to this node is to change this hardcoded video URL. So we'll remove this and we'll use our video URL input instead. Before we move on, we can verify that this node works as we expect it to, and we're not running into any issues. We can test this individual node. And we'll need to enter a YouTube video, URL. , I'm just going to choose a random video from the bill ship YouTube channel. So I'm just gonna right click here and copy the video URL. We're go back to Buildship, we'll paste the video URL here, and we can test our node. We then get back the extraction results from Amplify. So we expand this. Notice the result that we get back is a list. And each item here is a particular timestamp in the video. , what we are going to do is join all the texts from across all the different timestamps. The getter. This way we have the full caption text that we can easily pass to an LLM. So to begin, we'll add a utility node. And we'll search for join and we'll add this extra and join by keynote. The easiest way to understand how this node works and why we added it to our workflow is to just put it to the test. So we'll copy it. The output of this get YouTube caption note that we previously tested, and I'm just going to copy the entire result. And now we can test this extract and join by keynote. So it takes in an array. So I am going to pace the results. And next we need to specify the key in the array that we want to merge. So remember for us, that was the text field, and now we can just test this node. As you can see, we get back the full captions of the video in one big chunk of text. And this is perfect because we're going to be passing this on to Claude to generate the quiz questions, multiple choices and answers for us using this as context. But first, let's just make sure we don't forget to configure the note. So for the array, we're going to use the value from the get YouTube captioned node. And then as we just saw, when we run the test, the key will be text. So at this point, we're going to have the full caption of any YouTube video we specify. And since we're building a YouTube quiz generator. We need to start generating the quiz. Buildship integrates with a number of popular AI models, but for this part of our workflow, we're just going to be using Claude from on Tropic, and we'll use the cloud AI chat node. The first thing we need to do here is specify our entropic API key. But recently in Buildship, there's a new way to do this where you can use your project credits And this way you don't have to go hunting for any API keys, Next we need to specify our instructions to Claude. So I'm just gonna paste a prompt that I prepared ahead of time. Basically, this is just telling Claude that it's a quiz generation expert for Buildship, and we're going give it the captions from a YouTube video. And then we wanted to extract key concept facts, events and create a multiple choice quiz for us. So that's the instructions. And next for the prompt, we are just going to use the output of the previous extract and joined by keynote. Remember that this node will return the full captions for the video. And so we can copy this and then we can test the tropic node to get a quick preview of what our quiz will look like for this video. Here's our result. We can expand this, you can see, we are getting back five questions. And then following the question, we get a list of multiple choices, and then finally we get the correct answer. We're going to take this quiz and return it in a structured format. And for generating structured outputs in ship, there's a couple of options, but since we've already used Entropic, let's use open AI for this. And here I am going to select the JSON generator node. And first I just need to make sure I select an API key, just as with the Claude node. I am going to opt for the use credits option here. For the input, we're going to remove this and we're going to use the result from the entropic node. The key input of this node is the schema. And this is where we're going to be able to define the structure of our quiz. I'm just gonna clear out what we have here. And now we'll start by adding a new field. , instead of using a string for the field type, we'll use an array because we have a list of questions. For the array item type, we're gonna change that from a string to an object, and then we can add a new feel in that object. And the first feel here will be of type string for the question. Next, we'll add a new string field for our choices. And then finally we'll add a string feel for the answer. That's the final step for our YouTube quiz generator. And now for the fun part, we can put this to the test. So I'm gonna test my workflow and then I'm going to pass a YouTube video, URL. This time I'll be using a ship video that covers how to test and debug your workflows. So I'm just gonna copy a video, URL, go back to buildship, paste that and let's give this a go. But I have a validation error. Get YouTube captions is not an object. Let's quickly fix this. I'm just gonna bring up the code editor and then I'm going to go to the input for this node, and then here we need to change the type from an object to an array. I'm going to save this. Go back to test our workflow and this time it should work. So, as you can see, our test is so, so as. We ran into a second issue for the J generator node. It looks like we're using an invalid model, so let's expand the advanced settings here. Instead of using this GBT version, let's just use the GBT 4.1 and now I will go back to test my workflow. I, And fingers crossed this time we should get back our generated quiz. Our workflow has completed. Let's expand the result that we get back. And here you can see that we're getting back a list of questions now in structured format. And each entry in this list has three fields. The first one is for the question, the second field for the choices, and then finally we get the answer. I am noticing that the field name is missing here. So let's go back to our Jason generator node and make sure we didn't forget to give our array a name, which as you can see, I did. So let's just call this quiz. And let's run our workflow one more time. Perfect. And this time around we can see that the quiz feel name has been added. Just like that, we're now able to automate the process of generating engaging quizzes for our YouTube videos. The great part about this is that our quiz is in the structured format, which will allow us to easily create a website for this. Using any AI builder of our choice, such as Bolt, lovable Tempo Labs, you name it. That's all for this video. We'll cut you in the next one. Happy Bill Shipping.