Transcript for:
Automating Social Media Analysis Process

In this video, I'll show you an automation that can spy on your competitor's social media and download all of their TikToks to Airtable with the captions and all of their stats, including the video transcriptions that we can use to generate new viral scripts based on their video. I'll show you how to build out the entire Airtable database. and the make automation step-by-step from scratch. And we'll use this new tool I've been playing with that is loaded up with all sorts of automations. Today, we'll be using the TikTok scraper, but you can just as easily connect this with Instagram and many others. First, let me show you how this works using a blank database. I would add the social profile name. In this case, it is going to be TikTok. I have added these other channels here so that we can expand the program. For now, I'll click TikTok. Then all you have to do is click run now. That's going to trigger this automation here, which is going to call Appify. It calls this TikTok profile scraper. You can see it running now. Once that process finishes, it's going to call this make automation and then save those videos back to Airtable. Notice it also grabbed their profile information. But if we jump to videos, we'll see that those videos were pulled in with the cover and a link to the video, which you can play right from Airtable. and then we have the caption and all the stats and the transcription and then once we've picked a video that we want to remake all we have to do is click here generate script which we'll call this make automation and in this case we're using cloud to generate the script which it then writes back to google docs and then updates airtable of course you could replace this with chat gpt if you want and then we can just click into scripts where we can open that directly from this button which will show us the new script that we generated based off of that video. So next, I'm going to show you how to build the Airtable database. These three make automations. Step by step, we'll build out each one of these modules and we'll test each one. We'll generate the scripts using AI and then we'll be done. Now, if you want access to the make.com blueprint, so you can simply import them and have the automations completely built out and access to the Airtable base, make sure to jump into the NoCode Architects, a brand new, really active community where you can get access to a bunch of automated templates, including the one you're seeing today. All right, so first up, I'm going to go ahead and build out the Airtable base. We'll pick the workspace and start from scratch. Go ahead and close this window here. Going to rename the base, social spy and viral scripts. I'll change the color and I'll rename this first table to users. I'll rename this column here to username. I'll change this column into a single select field, single select. We'll call it channel. And here I'll go ahead and add a few options, TikTok, Facebook. YouTube and Instagram. We'll go ahead and click save. I'll update this column here to run now. We'll make it a checkbox. Click save. I'm going to go ahead and delete this column for now. Then I'll go ahead and add another column here. We'll add an attachment. We'll call this profile pick create field. And then I'm going to move this over to this section here, which will freeze these three fields here when we are scrolling along the bottom. Then I'll resize these a little bit. I'm going to go ahead and put in my username here to get started. TikTok. I'll leave this blank. Then we'll go ahead and continue adding our fields. We'll need a nickname. We'll have a field for the signature. I'll make this a long text just in case and something for the bio link. We'll make that a URL, create field. We're gonna add a number field here for followers, no decimal places, and we'll turn off the thousandth separator, create field. I'm just gonna duplicate this one just because we have a bunch of number fields. Duplicate, rename this one to following. We'll duplicate again. rename this one to friends duplicate again this one will be total likes we'll go ahead and duplicate the next one for total videos then we need to add a single line text we'll call this run id that's a column i'm going to go ahead and hide then i'll create another column platform id single line text again and we'll go ahead and hide this one then we're going to add another checkbox called verified checkbox go ahead and create the field then we'll add a record id this is going to be a formula go ahead and start to type record this is going to come up down here record id just need to add the closing parenthesis go ahead and create that field hide this one then i'm going to add a last modified time right here go ahead and create the field it'll automatically give it a name i'll go ahead and hide this one as well and then next up we're going to add a linked column link to another record and in this case we're going to create a new table we'll call this table videos and we'll call the new table videos and we will allow linking to multiple records create the field now i'm going to jump over to the videos table just to add a new column that we need to finish out the users table add new column video created time this is going to be a date we're going to include the time create field now we can jump back to our users table and we can add a new field we're going to call this the last video created we're going to scroll down to the roll ups we'll link to the videos table here for the field we're going to use the video created time and then here we want to remove this and type max values and create the field what this is going to do is in our users table it's always going to show us the most recent video created time from our video so that we can always grab the most most recent video when we run our API call. Then finally, we're going to add one more formula here. We're going to call this the oldest. post date and we're going to reference this last video created field i'm going to copy this formula in from my other air table database and you can pause the video and just copy it exactly as i have here go ahead and create the field now one thing about this field that i did want to mention is that the way the api with appify works is that we have to tell it what is the last date that we should pull videos from so if we were to come over here and put in a test row here which we'll delete and we'll link it to stephen g pope and we'll put a created time in here for six four if we come back to users we're going to see here that the last video created was on 6 4. and now this field here is showing us that date but if we go back to videos and remove this row here which means that we've never downloaded a video for stephen g pope then this function here is going to default to not going beyond june 1st on 2024. so if you want to go to an account and download all their videos from say january 1st of 2024 then you would need to change this date here and then after you run that automation a single time it's going to have the last video that we have in the database and then it will start from there automatically so now we're done with the users table if we missed anything we'll just fix it when we build out the automations keep moving along here i'm going to rename the name table to id for user this can only be linked to one specific user so i'm going to edit the field rename it to user and turn off allow linking to multiple records i'll go ahead and confirm that change i will hide the field next to the user field i'm going to go ahead and create a column to the right, generate script, and this will be a checkbox, create field. Again, I'm going to add another field to the right. We'll call this the cover, and this will be an attachment, create field. Next, we'll add another one to the right. We'll call this media. This is where we're going to download the actual video. We'll make this an attachment, create field. Again, we'll create another column to the right. We'll call this caption. We'll go ahead and make this a long text, create field. Then we need to add several more columns for likes and shares. this is going to be a number again i'm going to change the decimal places to zero i'll turn off the thousands separator i'll create the field i'm just going to duplicate these fields because they have those same settings i'll change likes copy to shares again duplicate field rename this one to views duplicate field rename to saves duplicate field rename to height this will be the height of the video duplicate field this will be the width of the video Save. Duplicate field. We'll rename this to duration. Save. Duplicate field. We'll rename this to comments. Again, save. Next up, we'll add another field to the right. We'll call this SRT. This is where we're going to download the transcript. It's technically an SRT file, so I'm going to call it that long text. Create field. We already built out the video created time. Now I'm going to add a last modified. Last modified time. Create field. Now I'm going to go ahead and add another formula for record ID. I may not use this, but I add a column called record ID in every single table that I create just in case I need it. Formula. Again, you can just type rec. It'll pop up down here. Add the closing parenthesis. Create the field. This is an internal record ID that allows you to identify row and air table. I'll go ahead and hide this. And then I need one more column, which is going to link to another record. In this case, we're going to create a new table. We'll name the field to. viral scripts and then we'll name the column scripts and we'll allow linking to multiple records create field that's going to create the new table i'll jump up to the table and we'll just finish this out real quick i'm going to rename this to doc id save i'm going to go ahead and hide the video column hide then i'm going to add a link url doc link create field i'm going to go ahead and create a button we'll call it open url i'll change the label as well to script the action as open url and we'll reference the doc link should pop up you can just select that and then create the field and then i will go ahead and hide the actual link and then i'm going to add one more column which is a created time right here include the time and create the field i'm going to rename some of these views here all scripts come back to videos going to rename this view here to all videos i'm going to go ahead here and create another view here that's going to help power our automations generate script create new view Then I'm going to update the filter, add condition where the SRT is not empty. I'll add another connection and the generate script checkbox is checked. Then I'm going to jump over to the users table. Going to rename this view here to all users. Then I'm going to create another view again to trigger our automations. Run TikTok. I will create the view and here for the filter, I'm going to add a condition channel is. tick tock and one more condition and run now is checked so with that we should have everything thing that we need in Airtable. If we made any mistakes, we'll fix it when we're building out the automations. And if you're enjoying this video, make sure to like and subscribe to the channel. It tells me what type of content you want more of. All right, so now that we have the Airtable base built out, we need to build out this first automation, which waits for a new row to enter this view, which then calls the TikTok profile scraper on Appify. And then it will update the Airtable row with the run ID from Appify from the TikTok profile scraper. So I'll go ahead and create a new scenario from scratch. I'm going to go ahead and go to Airtable. Now there are really two ways to set up this trigger here. I like to use watch responses which is really creating a webhook. I'll go ahead and click save and then I can copy this address to the clipboard and I'll go ahead and click ok. I like to use this because it is an instant trigger. I can come back to Airtable and I can add an automation. I can add a new trigger and we'll trigger on when a new record enters the view. I'll go ahead and select the table, users, and the view. run tick tock then i'm going to add a quick automation here update record i'm going to select the table users the record id is going to be the record id from the triggered row so we'll add that here we'll add the record id and then i'm going to go ahead and update the run now field and I'm simply going to uncheck it. And from here, I'm going to add a script. Now keep in mind that this does require a paid Airtable account. I'll come back to this automation in a second, which shows you how to get around that. If you don't wanna use a paid Airtable account, although I do think this is the best way and I'll explain why. Now I'm gonna copy this code in here from my working demo. You can pause the video and copy this or you can join the no code architects and just get access to the base with everything in it. I'm gonna jump back to our make automation and recopy this URL here from the clipboard. and i'm going to add it here and then over here i'm going to add an input variable i'm going to call it record id and do pay attention to the case here and then for the value i'm going to pass in the air table record id i'll save this it's sending the record id of any row that enters this run tick tock view to this web hook here and then i can continue on with the automation so i'm going to come back to data i'm going to come back to all users i'm going to go ahead and click run now If I come back to run TikTok, we're going to see a row here. And if I jump back to the automation, I'll rename the automation to run TikTok download. I'll go ahead and click the trigger and we'll choose a record so that we can test because I have a record in that view, I'll be able to select one. I'll go ahead and test this step here as well. Run as configured run test. If I jump back to the data, we should see that that row left this view here. We basically unchecked the run now checkbox. Jump back to the automation. Jump over to the script. I'll edit the code and I'm going to jump over to make. I'm going to go ahead and run this once, jump back to Airtable, and then I will test this script, ran successfully, jump to make. We now see that it was able to capture that record that we sent from Airtable. And now we can continue building out our automation with the specific record ID that we want to use with Appify. Now, the reason why I use this method is because, number one, it's an instant trigger. you can see that here by this lightning bolt and so what that means is make is going to run this automation instantly whenever it gets this request from air table now there is another way of doing it you can use a different type of module from air table it is called watch records in this case if you haven't already added a connection you'll need to add a connection to your air table base i'll go ahead and use oauth i'll name this social spy demo save it's going to go ahead and create the connection add base social spy. Here's the demo that I've been working on. I'll go ahead and grant access. And then we would go ahead and pick a base and a table. In this case, it would be users. And then we would pick a trigger field, which would be last modified and a label would be username. And then for the view here, we would pick run TikTok. And then we could go ahead and click OK. And then we can go ahead and choose where to start from now on. And then I could move this lightning bolt over to Airtable. But now you're going to see this little clock here instead of the lightning bolt. And so the reason why I don't like this is because what you have to do is you basically have to set this trigger to run on a interval where every 15 minutes or whatever interval that you set here and then every 15 minutes it's going to check your database to see if a new row has appeared here. And the main problem with that is that if you put this on one, it's going to use one of your make operations every single minute all day long every day to check to see if there are new rows here. now if you're just playing around and you just want to build this and experiment this isn't an issue in fact you could just put this at 60 and then you could just run this manually just for testing to build this out to see how it works so that you didn't have to upgrade air table to a paid plan however i think long term that's really not the best solution it actually wastes a lot more money than just using a paid air table plan and using the instant trigger so for this video i'm going to go ahead and continue forward with this but just in case you want to do it that way that is how you would do it go ahead and create this watch record trigger and then basically you'll follow the rest of the steps as i build them out here so next up i'm going to go ahead and get the record that i passed to the webhook again here i'm going to use air table get Record. If you don't already have a connection, you'll add that here. I already added this connection here when I was showing you the alternate example. So I'll continue forward with this. I'll select a base. I'll select the table and I will use the record ID from step number one record ID. I'll go ahead and click OK. Another reason why I like to use these scripts here as well is because it makes it easy for testing. Before I add the next module, I want to run this. So I have all the data from Airtable. I'm going to go ahead and run once. Jump back to Airtable. I'm going to test this script again. Jump back to Airtable. it's going to pop through and then get the record now i have that data that i can move on with appify going to add that next step going to type appify here we're going to run an actor you'll need to add your own connection you can add it here It's going to ask for your API token. Once you create an Appify account, you can jump down to your settings, integrations. And this is where you can create a new API key here. You'll just want to copy that into this section here to create that connection. I already have one. Next, you're going to want to select an actor. Now, in order to get something to show up here as an actor, you'll want to go to Appify and you'll want to go to the store. You can go ahead and type TikTok profile scraper. This is the one that I'm using for this demo. It does have a fee of $5 per thousand videos, but when you sign up with Appify, you do get some free credits. I believe you get $5. When you select a new actor from the store and then you star it, you might need to run it once to get it to show up here. Notice here for the Google Maps scraper, beyond just starring it, I had to actually try to run it one time. You just need to do something with a given actor to make it show up in this particular view here. I'm gonna continue forward with the TikTok profile scraper. I'll exit out of this actor and head back. to the tick tock profile scraper just wanted to show you how to get a new actor into this drop down here now we can continue on for run synchronously you can go ahead and put no for the input json i'm going to copy this in from my working example you'll want to pause the video and copy this verbatim or jump into the no code architects where you can get access to the whole blueprint with everything included because i cut and paste this from another automation these are broken so i'm going to go ahead and fix those here i'm going to put the oldest post date and for username i'll fix that as well here we have the username and again this is coming from the row here in our database you should have already added this here so what this is going to do is it's going to use this oldest post date as a variable so that the automation won't go beyond that date and again we talked about that a bit earlier if we look at this formulated field it's grabbing the most recent last video created date if there are any in the videos table otherwise it's using a hard-coded date that you can add if there's no videos so if this is the first time you've run the automation you can set this to any date that you want to go as far back as you want while you're testing i encourage you to keep this relatively close to the current date so that you don't burn through a lot of your automations and then here you select how many videos you want to pull for each call again i suggest doing something very small i'm going to go ahead and pick two and then once you're done you can go ahead and click okay and then finally we just need to update the air table row with the run id that comes from appify i'm going to go to air table update record choose an account i'm going to use my social spy demo account because i'm doing an update i will have to update the permissions go ahead and click continue select a base make sure to pick the correct base grant access select the base select the table in this case users now what we need to update here is the run id i'm not sure we have that data yet What we're looking for here is the default data set. So we'll grab that. It looks like it's there. Pre-filled it for us. If you don't see it there, then you'll want to run this automation and trigger Appify so that it gets this data. We also need to update the record ID from here and we can go ahead and click OK. All right, so now we should be able to test this automation. And again, if for some reason this data here that we were looking at in the Airtable section here, if that wasn't here, then you would just need to trigger this automation so that this Appify module ran. and that would give you the data for this next step here and it's really going to be the same thing that i do right now so i'm going to go ahead and run this automation once i'm going to head back to airtable where i can trigger this automation again we still have that test record here from this initial view and so i should just be able to test this action again from here to trigger it in make you see that record come in it grabbed the record from airtable it called appify so if i jump back to appify we should see something running here just like that and so we can see the data that comes back from appify including that default data set so again if for some reason that data wasn't available when you created this update record it would definitely be available now and then we updated the air table record with the data set id that we dropped into the run id so if we jump back to air table and we look at the data and we open up this row here we should be able to scroll down there's some hidden rows you'll have to open that up and now we have our run id that came from appify so we're in good shape so at this point now we can go ahead and save this automation we can give it a name i'm going to call it air table to appify demo again i'll save it and then i'll go ahead and turn it on for now so that the next time we run it it just goes automatically and now we can go ahead and build out the next automation that's going to get the data back from Appify so that we can add those videos back to the video table. In order to build out this automation we're going to come to Make and we are going to create a new scenario and then we are going to go to Appify. You can go ahead and click Show More. You want to make sure you select Watch Actor Runs and what this really is is just a web hook in disguise so you'll want to create the web hook and you'll want to select the actor that we've been using here the tick tock profile scraper go ahead and click save here it's going to expose an address go ahead and show address copy address to clipboard and click ok then we can jump back to appify and we're going to go over to integrations it looks like it actually already creates that for us so we don't have to add it manually and it should automatically be enabled you can go ahead and open it up let's go ahead and change the event type so it only runs when it succeeds We'll turn off run failed, run timed out and run aborted. Those are other events that you could add later. And notice it already has the URL here. So if I open this up and show address, it ends with 7AL and we have 7AL here. So that's good. back to integrations again just make sure it's enabled and don't mind that i already have two web hooks here these are here because i was testing and previously building out this same application so from here i can head back to make i can go ahead and click ok and just leave this here i'm going to go ahead and save this i'm going to rename this to appify to airtable demo again i'll save it again i'm going to go ahead and run it once and then i'm going to go all the way back to airtable back into the automations and again we already have that test row that was already set up and so i should be able to just test actions again if for some reason you needed to test that again of course you would just come back to data go back to users and check the run now checkbox i'm going to go ahead and test the action so now if i jump back to my air table to amplify demo automation we can see that that just triggered if i jump back to amplify we can see that we have a run that is going right now as soon as that is finished it will call our webhook here which is waiting for a response crawling those pages it's going to grab two results based off of the request we made here and it looks like it just sent our result back to our make.com automation so now we can continue on and build everything out and you can see here status succeeded so the next thing we need to do is we need to get the data set i'm going to go back to appify get data set items go ahead and select your connection the data set id is going to be the default data set from step number one default data set id for data transformation you can turn this to none for format you can leave it on json limit to a 100 and then we can go ahead and click ok next up we're going to search our air table database search records again you'll want to select your connection i'm going to go ahead and use the one that i already built the social spy demo for base we're going to pick the base table we're going to pick users you can go ahead and select all for the output fields i'm going to go ahead and copy this formula from my previous example username equals and then we need to use a value from this here which we don't have yet so i'm going to go ahead right now and just click ok even though this is a broken link i'm going to save my automation i'm going to go ahead and run once again i need that data here so that we can continue on i'm going to jump back to air table i'm going to go ahead and trigger this process one more time jump back to appify we should see that running now just going to take a couple seconds to grab those two results looks like i got those two results and then it's going to trigger our automation here now we've got that data here so we can fix our search i copied this in previously from my other automation so it looks like it was able to fix itself if you were typing this in manually you would just want to make sure you use the curly brace username close curly brace equals and then here you are going to use author meta data here and the name just like that. Then you can go ahead and click OK. You can save your automation and you can go ahead and run that one more time just so you have data here in your Airtable automation. From here, we're going to go ahead and add a router. I already have the Airtable data here myself because when I copied in that formula, it automatically fixed that variable that I had copied and pasted. But again, if you don't have this data, you might as well run the automation one more time. I'm going to go ahead and continue forward. I'm going to add a router here. We are going to have three different routes so I'll go ahead and add that third route. For this branch here we're going to add a filter. We're going to go ahead and make sure this video meta field exists. And so again you have to have a successful run here of Appify where it was able to find video results so that we can build out this filter here. And again I'm using the video meta variable and I need to change this operator to exists. so just making sure that we have video data before it goes down this path go ahead and click ok next up we're going to go ahead and add an iterator open iterator for the arrays section here we're going to scroll down and look for the subtitle links go ahead and click ok now we're going to go ahead and add an http module this is going to allow us to download the transcripts we're going to go ahead and get a file here for the url we're going to add the download link go ahead and click ok before i continue i want to make sure we add a filter here so go ahead and add a condition for language here we can use text operator equals and we can drop in that language. You can go ahead and click okay. Now the final thing we need here is another step to set a variable. You can go ahead and type variable and then you can set variable. The variable name is going to be SRT. Basically we're downloading the SRT file here and adding it to a variable and for the variable value go ahead and click into the box and click the data go ahead and click ok you can go ahead and click save again next up let's add the router here as well again we're going to want to make sure the condition of video meta data and we'll change the operation to exist so again we're making sure that this variable from this output exists before we continue on on this path go ahead and click ok now we're going to go to error table create a record again pick the connection and the base in this case we're going to pick the table is videos for the id go ahead and click into that and use this id here from the appify results for the user go ahead and add a new item for record id you'll want to use the id from the search records. Now we're going to go ahead and just continue to fill out some of these fields here. For the cover, go ahead and add an item. For the file URL, we are going to use original cover. You can type original to find it. You can search here. I put orig. Now we can see the original cover. Move on to the media. Go ahead and add an item. For the file URL, you can search for media and then you'll add the media URL. Make sure you grab this inner value here that's marked with a 1. Click into the box. Click 1. Then let's just continue forward. Now we're going to add the caption, erase the search. That's going to be the text and just do a search. Put in the text for the caption for likes. You're going to want to look for digs, dig count. Next, move on to shares and type share, share count, move on to views. We can put in play and we're going to use the play count for saves. We're going to come to the search. We're going to type collect, collect count for height. We'll come to the search. We will type height for width. We'll select that. go into the width grab that width for the duration go to the search start to type out duration you can grab the duration for comments come to the search you can type comments comment count made a mistake here so go ahead and save this right here we need to add another module so i'm going to extend that here add module we're going to get variable srt which is what we set right there now if i jump back into air table scroll back down for srt i can use that variable here srt for video created time you can use the create time iso make sure you grab that one not created time create time iso and i believe that is all of the fields that we need we linked it to the proper user that is coming up in our search got the cover the media and all of these different fields here covered we can leave the viral scripts alone for now go ahead and click ok and one thing i'm going to do here is come back to this search here i did forget to put a limit here so i'm going to change that from 10 to 1. Then I'm going to go ahead and come down to OK and click save. I'm going to go ahead and hit the little auto align magic there. And I'm going to go ahead and just see if this is working. I'd like to see that all of these different filters are working and that we actually get all of those new rows for all of the different videos for this particular user, which is me. So I'm going to go ahead and run this once. Going to jump back to Airtable, back to our automation, and I'm going to test this record. we can see that the request just went to appify if i come to appify we have a new request running when that finishes up it should call this new automation and run and we'll see if everything worked so for whatever reason this looks like it's taking longer than it should i'm going to go ahead and abort this one and just come back to air table and trigger it again Now it's running again. Looks like this time it's working. It got stuck in this last one. I'm not exactly sure why. It would have eventually errored out, but it was just a lot easier to start over. Looks like it's got those results. I'm gonna go ahead and make sure this is running again. It looked like it had been triggered automatically before when I aborted this previous tasks. Looks like it was successful. Jump back to make. We see this coming in now. Looks like it found two different videos. If we open this up, we've got two videos, which makes sense because that's how many we are asking for in this Appify call here. went down this path because the video meta data exists and it's processing two different videos it grabs the crt transcription for both videos sets the variable then it comes down this path again because the video meta data exists then it grabs that srt variable that we set in this step here and then creates the two video rows if we jump back to air table come back to the data it looks like we have now two videos that are associated with this particular user and if we come to the videos themselves we jump back to all videos we now see that we have two videos here that are linked to the proper user we've got the covers we've got the media itself if i open this up it should be the video i'll mute this but i should be able to play it Perfect. We've got the caption, the likes, the shares, the views, the saves, the height, the width, the duration, the comments. We've got that SRT file. We've got that video created time and the last modified time. So everything here is looking good. The only thing that we haven't done is actually updated. the user profile information we do that here in this particular branch now we get multiple videos back from appify so this branch only needs to run one time one time to update the profile we got back multiple videos but all of those videos were for one particular user so we only need to run this branch one time so i'm going to add a filter here and the condition will be based off of the bundle order position and basically what we'll do is we'll just say is equal to one I'm going to go ahead and click OK. Then we're going to go ahead and update a record in Airtable. Update a record. Again, you'll want to select the connection if it didn't already. The base will be social spy and viral scripts. The table will be users. In this case, the record ID is going to be the record ID from our search here. We don't need to update the username and channel. We put those in manually. We don't need to adjust the run now. What we want to grab is the profile pic. So I'm going to go ahead and add an item for the file URL. I'm going to go ahead and search for avatar. and that's right here under the author meta grab that for nickname i'm just going to start to type nick in the search make sure i'm in that field then i'll grab the nickname for signature i'll type sig make sure i'm in the field then i'll grab the signature move on to the bio link click into there type bio grab the bio link make sure i'm in the field move on to followers for followers we're going to search for fans make sure we're in the box fans for following click into the box then go to the search then we're going to use following move on to friends friends total likes gonna search for hearts gonna grab heart and then for total videos we'll just search for video we can grab that here i'm going to leave off verified here because i didn't test this before but i believe you can get their verified information you can leave videos blank we created those videos over here for the run id we actually already have that you can leave that blank for platform id i don't really use it but i'll go ahead and add it because i was doing it before we're going to use the author meta ID. I think this is the platform ID on TikTok. And now we're good to go. We can go ahead and click OK. I'm going to go ahead and save this automation. I'm going to go ahead and run once. I'm going to jump back to Airtable. This time I'm going to come to the videos and I'm going to delete these because now if we look at the last video created rollup that we defined earlier, which is giving us the most recent video created date, it is now saying 6-26 and that is updating this formula field here to 6-26. So if I ran this again, it wouldn't... actually grab two new videos so i'm going to come to the videos here i'm going to remove these here then i'm going to come back to the automations and run this script one more time going to come back to make we already set up the trigger to run going to just check the status in appify it looks like it's running starting the crawler downloading the media it's just going to be one more second before that triggers our automation on the back end that's going to trigger it's going to create the two video rows if i jump back to air table back to the data again we have those two videos that were added to our videos table linked to the proper user but this time it also updated the user table so if i jump back to air table and go back to the user we now have the profile pic the nickname signature and bio link and the other statistical information about followers following friends total likes total videos and everything else so there we go i'm going to come back to our automation again i'm just going to do a final save i'm going to go ahead and turn this one on because we're in good shape the final thing that we need to do is to create the ability to generate that viral script based off of this video and then we'll be done. All right so now we're going to build out this final automation which is going to wait for a trigger in Airtable and in this case what we're going to do is wait for a row to enter this generate script view which is looking for the SRT file to not be empty and also the generate script checkbox to be checked. So again, when we download these videos, it's also grabbing that SRT file from TikTok, which is essentially a transcript, which we'll clean up by taking out these time codes so that I have a test record in this view. I'm going to go ahead and click the checkbox here. So if I jump to this view here, we should have one row here. So now I'm going to jump back to my automations. In this case, number one, I'm going to turn on the automation that we already had so that that trigger automatically runs the next time. Then I'm going to go ahead and duplicate this one and I'm going to change the name of it. from run TikTok download to generate script. Then I'm going to update the trigger. Going to change the table from users to videos and the view from where it was to generate script. Now I should be able to choose a record because there is one there. Now again, we're going to update that row. This time we have to change the table from users to video. The record ID is going to stay the same. It broke the field, so we're going to need to delete that. Then we're going to choose a field. we're going to go to generate script and we are simply going to uncheck the generate script i'll go ahead down here and go to run as configured and run the test i'll open up the data and notice that the row is gone because we unchecked the script but we can still continue to use that row that we triggered in here when we chose that row in our run script here so i'm going to jump to run script again this was copied from the previous automation so we do need to update the webhook url so i'm going to come to air table and again i'm going to use the watch responses module here which again is really just a webhook so i'm going to go ahead and create that webhook go ahead and click save I'm going to copy that URL back to our automation here. I'll remove the previous one that was duplicated from our copy, update that. I'll go ahead and finish editing. I'll come back to make. I'll click OK. I'll save this automation. I'm going to go ahead and run once just to see if it's working. Getting some error here. I'm going to save everything and refresh. I was having an error there, so I'm just going to go ahead and restart this from the beginning. I'll go ahead and add the watch responses trigger. I'll go ahead and create the webhook. I'll save it. Copy address. Going to come back to the Airtable automation. Going to edit the code. Going to update the webhook URL again. I'm going to go ahead and finish editing. Come back to make.com. Make sure you click OK. Otherwise, you'll lose that webhook. Going to save the automation. I'll rename this to viral script generator. Again, I'll save it. I'll run it once, come back to Airtable, test the action. We should see that row come through here. We're good to go. So we can continue on. Every once in a while, you'll just hit a glitch and you just have to learn to go back and restart and create the scenario again from scratch just to keep everything going. The main thing is just not to panic and be systematic about it. I'm gonna go ahead and add another Airtable module. This time we're gonna get a record and we're gonna load up the record from the webhook, pick the connection, the base, table. In this case, it's going to be videos and the record ID will be from step number one, record ID. Go ahead and click OK. And next up, what we're going to do is we're just going to load up a Google Doc and we're going to get the contents of a document. Now, what we're going to do here is just load the contents of a specific document. I've created a folder on my Google Drive and I called that folder Social Spy and Viral Scripting. And I create a document here called Brand Creative Brief. And it is simply a document where I can put in my ideal client. their problems, our products, the problems we solve, etc. Just to give some context when we generate the script from the SRT so that we can give Claude or ChatGPT some context about who we are so that when it generates the script from our competitor's video, it's using our own brand identity to shape that script so it's not an exact copy. So again, I'm just going to go ahead and grab an ID here. You can create your own document in a folder. and then grab this id make sure to grab everything after the slash and everything up until the slash i'll copy that bring it back to my automation i'll drop that here into the document id i'll go ahead and click ok next up i'm going to go ahead and add a request to claude if you want you can use chat gpt i tend to like claude and the new sonnet model for writing text for the max tokens i'm going to go ahead and put 512. for the first message i'm going to go ahead and select the role I'll pick user. I'll add the content. It's going to be text and the text content I'll copy over is turn this SRT file below into a standard transcript without the time codes. For reference, we'll call this transcription as the source transcription. So I'm just going to copy this over. You can type that into your module because Make already knows that this record has an SRT. It looks like it didn't break my variable there, which is great. Then I'm going to go ahead and add the next content message. Type is text. In this case, I'm going to grab this next section here and copy that in. This message is going to analyze the brand creative brief below that describes my ideal client, problems we solve, and products for context. For reference, we'll call this brand creative the creative brief. And then I simply add the text content from the previous step here. If you're typing either of these in manually, you're simply going to click these variables SRT here. And for text content, you're going to grab that from the Google Doc, text content. And then I have one more user message here, type. We'll go with text and I'll go grab the text here. I'm going to grab this from my demo. I'll just copy this in here. Basically says the output should only include the viral script with no descriptive text. Start with the first line of the script. So I'm just telling it not to include other additional text when it actually starts to generate the script. Use the creative brief to rewrite the source transcript into a viral video script. And then I'm just going to go ahead and enable the advanced settings. And for the system prompt, I'm just going to copy this here, which is you're a viral video script writer. And from here, we'll go ahead and click OK. Now, I do tend to add an error handler here, a break module. We'll do number of attempts five and we'll do one minute apart. We'll click OK for the condition. We'll look at the message and we'll say contains 429. What this does is it detects if you make too many requests to cloud so that it can. recover from that error and try a bit later when you have fewer requests to clot if you make too many requests at any given time they're going to return this 429 to you go ahead and click ok so now what we do need to do is come down to the scenario here and we're going to allow storing of incomplete executions move that to yes come down to ok and then go ahead and save the automation and now all we need to do is write the response from claude i'm going to go ahead and realign this back to google docs so i'm going to create a new document create document for the name i'm going to go ahead and just use the record id from the second step here record id for the contents i'm going to go ahead and use the text response from Claude and for the location I'm going to go ahead and turn on this map. I'm going to jump back to my social spy folder. I'm going to grab this folder id from the url, jump back to make, drop that in there, go ahead and click ok. Then the final thing we need to do is just to create that viral script row back in Airtable right here and connect it back to the video in question. So I'm just going to come here add one more module Airtable. We're going to create a record. Again select your connection. We're going to select a base, a table, in this case we're going to create the records in the scripts for the doc id we can use the doc id from the step here it's going to be right there doc id then we're going to connect it to the video record in step number two here add item for record id simply scroll down and use the id here and for the doc link we're just going to use the web view link and that's really all we need here so we can go ahead and click ok i'm going to go ahead and click save all right so now that we're done putting the automation together i'm going to go ahead and run once. Going to jump back to Airtable and the automation. I'm going to go ahead and make sure that we have a record in the generate scripts that we can trigger off of. I'm going to choose that record. I'm going to jump down to run a script and test that action. Jump back to make. Now we have that coming through. Now it's running that through cloud. It's generating the script. We have that new script that we generated and now we have that new script that was generated from the video here in this step. So this video was on struggling to manage your personal brand content. And here we have the SRT file with the entire transcript. And here it generated a new script based off of that using the creative brief if we had one here. Now, obviously, in these modules, you'll need to play around with your specific situation and update the AI model to produce the type of script from your creative brief. And with some context of. what videos you are downloading and what the contents are and then you can also update those prompts here as well to get the specific output that you would like but once you have all of this working and it's generating the script and it's updating airtable with that script here and then it should also be connecting that script with the video itself that should be here as well then you're good to go you can come back to your automations you can turn this one on here and then you can come back to make you can save your automation and you can go ahead and turn that on now if i come back to air table if I go ahead and click a new one, it should automatically clear it out and then run the automation here. We saw that run there. Come back to our Airtable database, go to the scripts, we have a new script, and then we've got that new script. based off of that video. And again, it's analyzing one of my videos. So it's about Airtable and ChatGPT and you'd be able to come into this script, update it and then use it for your own videos. So there you go. And again, if you wanna get access to all of these templates, jump into the no-code architects. There's a big template library where you can get access to all of these different templates, including the video you saw today. Either way, I hope you found this video valuable and I'll see you in the next one.