This video demonstrates how to build an AI-powered marketing team using a single AI agent and the no-code platform n8n. The presenter showcases a live demo, breaks down the workflows, and explains the cost of running the system. He also provides a free template for viewers to set up their own AI marketing agent.
Here's the full transcript you requested:
today I'm going to be showing you guys how I built this AI marketing team with just one AI agent so as you can see this agent has access to these six tools it can create videos LinkedIn and blog posts create images edit those images and also search through its image database and working from left to right here these are what the workflows look like so this is the creating videos this is LinkedIn posts this is blog posts this is creating an image this is editing an image and then this is searching the image database so there are a lot of resources that you'll need if you want to plug this in different templates all these different workflows and I'll show you guys how to download all that for free and set it all up near the end of the video but first let's get into a live demo and then we'll break down the builds and of course I'll also touch on pricing and what it actually costs to run this whole system so as you can see we communicate with our agent here through Telegram and that can be either voice or text so I'm going to move this over to the side here i'm going to open up my Telegram as you can see here's a video that we had it create earlier for us but I'm going to ask it to create an image for us create an image for a flyer for cat food and there's a flash sale okay so we just sent that off you can see it's transcribing that audio hitting the marketing team agent and it's going to hit its create image tool and right now that workflow is processing and I'll check back in a sec when we get that image okay looks like it just finished up as you can see we just got our message here's your flyer image for cat food with flash sale um looks like it's a pretty cool image of a cat now let's say we wanted to edit that and make it a little more realistic so before we ask it to edit that quickly let's just take a look at first of all in our log we now have a new image which was cat food/sale it's an image here's the prompt and here's the link that it got where we can click into it and it's the image that's in our Google Drive but anyways let's have it make that a little more realistic so can you edit that image and make it more realistic send that off it's going to use its image database to grab the actual image to edit and now it's going to go edit that and I'll check back in when we get that edited image okay so that just finished up and just so you guys are aware it takes about a minute per image and per edit so let's take a look as you can see now we have the updated more realistic flyer it's a very realistic looking orange cat eating cat food and there's a flash sale and we can also see that if we go to our marketing team log we have the new picture right here and it's a type edit we have the prompt and then we also have the link for our Google Drive with the new image okay now let's try one of these content creation ones can you please create a blog post about the effect of sleep on productivity all right we'll send that off so anyways this workflow was inspired by a actual full workflow video that I did a few days back i'll tag that right up here and I basically had that doing LinkedIn content obviously it's doing some research creating the post and then it's creating an image prompt and then it's getting that image for us and then we're logging it sending the content all that kind of stuff so if you want to see that full breakdown watch the video up here okay so the agent just finished up let's click into this Telegram and we'll see what we got here's our graphic well-rested minds get more done you can see it has some up arrows and stuff like that and then we have our actual blog post and at the bottom it includes some references for us and if we click into our log we can see that we have our actual blog post and you can see I did the same example earlier and this is what the picture looked like so this one was a different type of graphic that had some more statistics in there but then this one that we just did looks like this and they're both still very good graphics that I would definitely feel confident posting with a blog but as you can see this is the most recent run we got a title we have a type which was post and then we have the actual post content over here and then finally let's just do a quick video so can you please create a video of a beaver building a house so we'll send that off and we'll see what happens and then while this is running I just wanted to explain something to you guys here so it's calling the video workflow which looks like this and this run takes typically 2 to 3 minutes maybe even a little more we have these weights because we have to wait for the images to be generated as well as the videos to be generated and so what actually happens is the actual marketing agent right here as you can see it's waiting this guy times out and then we don't get a response back right here so what I've done is we actually get the response in the form of this workflow so this is where it will download the video send it to us on telegram and then also log the outputs so it's just the way n kind of works right now with subflows having weight steps where right now it's waiting on the agent level rather than the tool level so it's going to error right here but you'll see we still get the actual video in our telegram so I'll just show you guys that once this run finishes up okay looks like that just finished up and as you can see the Telegram node here failed because the agent aired out but obviously you can see that we still got the video so let's click into this and watch it real quick we got some nice sound effects okay looks like he's building a dam not a house i was kind of hoping for more of an actual house but either way there we go at the end he's got a finished house anyways just to show you guys that the run actually did finish up i'll switch over to executions of the faceless video tab let me just refresh this here so you can see that this thing succeeded and the message that came in was a beaver building a house showing the beaver gathering sticks blah blah blah and then it goes through the process of actually creating that video with sound effects so anyways I know it's not perfect because of this aspect which I'm sure is currently working on as well as the fact that the beaver doesn't look the exact same in all four of the clips but that can be kind of worked on with prompting and other aspects but this is kind of a great template to get you started okay so now that we've seen a demo and how some of these tools work we're going to get into sort of breaking down all the workflows but before that just wanted to mention if you want to get all these resources for free you can do so by joining my free school community link for that's down in the description you can search for the title of the video or click on YouTube resources and you'll find the post associated with this video and when you click on it you can have the JSON right here to download and there'll also be the link to the Google sheet template you'll need and the Creatmate rendering template you'll need and more towards the end of the video I'll actually show you like what you need to do and how you need to set everything up because you'll have to download these six different workflows and make sure they're plugged in as well but now let's get into the actual breakdown okay so just to kick us off here let's talk about the actual marketing team agent and what it's getting as well as what we're telling it to do so it can get voice or text so what we did is we standardized both of these outputs here and it gets fed into the agent in a field called text so we just reference that as JSON.ext basically just meaning if it's voice or if we type the agent will still be able to look at it as if it's the same and then we can see the actual system prompt which is not too difficult for how many tools it has we said overview you are a marketing team AI agent your job is to help the users create edit images based on the request or create content the next thing I always like to do is tell it what tools it has and when to use each one and as you can see this is very very simply laid out create image use this to create an image edit image use this to edit an image the user might also say make rather than edit so like for example if I asked it to create an image for me and then I said you know make that more realistic it would know to edit then we gave it the image database use this to search in the image database blog post LinkedIn post video and then also the think tool which if you aren't aware of what that is it's just this think tool down here i made a video i'll tag it right up here but anyways we're just telling it what tools it has and when to use each one very simply and then just a few instructions like if the user asks to edit that image or make that something this indicates that they want to edit the last image in the database the most recent one so we can either use its memory to grab that image ID to pass over to actually edit it or it can search the database and just grab the last one and finally if the user requests a blog post or a LinkedIn post use the tools and then output here's the post you requested hope you enjoy it because we have that actual workflow sending over the content of the post so we just don't want it to get sent over twice then finally we just wanted to return everything as a clickable link in our Telegram and as you can see we're able to click into all of this stuff in our Telegram whether it's an image if it's an edit whatever it is we just want to be able to actually click into it cool so that's basically all that's going on here um you know it's getting the input from Telegram and it's responding in Telegram but then where the magic really happens are these six tools down here so let's start off with the create image tool obviously we called it create image call this tool to create an image and then what we did is we linked our workflow so when you guys download the create image workflow you'll basically just have to choose from a list and search you know whatever you name it i named mine create image and then all you have to do is search for that and then just make sure you link the correct workflow to call so from there we set up workflow inputs so we basically just told this this main agent what do you send over to this sub workflow and the way that you specify that is in this create image subworkflow it has to start with a when executed by another workflow trigger because it's being called by a main agent and in this trigger you can choose the input so rather than doing accept all data we defined three fields we want which are the image title the image prompt and then the Telegram chat ID so we can actually send it back to Telegram so when you actually define those three fields in this trigger then you'll have these workflow input options pop up in your call nadn workflow tool for your agent and then what we did is we used this button right here which lets the model define sort of how to fill in this parameter we told it to fill in the image title parameter with the title of the image should be no more than four words we told it to fill in the image prompt with the image requested by the user and then for the chat ID we're just using a dynamic variable that's coming from the Telegram chat trigger so when we talk to this Telegram I'll just I'll just do something real quick i'm just going to say hi we'll see that it gets the input even though it was text it responds to us and says you know hi but then what it does is it basically has this chat ID right here in our Telegram and then that's what we pass over to this workflow right here you can see now it's that dynamic variable that gets passed over and we can reference that later in this workflow to actually send the photo back to the right spot anyways let's just click into the execution that we did for this live demo so we can see data moving through the first thing is an image prompt agent and as you can see this was the cat food/ flash sale so we give it the image prompt from that main workflow and then we have a system prompt here which basically is just telling it how to make a text image prompt not going to read this whole thing if you guys download the template you'll obviously have this in there we basically just wanted it to be you know very descriptive have the main subject the background the style any additional details like that and then you can see over here it spits out a cheerful attention-grabbing flyer designed to appeal to pet owners blah blah blah and it just tells the image model which we're using Chatchabt's new image model which is insane how to make the image and so this is where we format that HTTP request to OpenAI's image generation model so I'm not going to go too into the weeds of setting up this request and how that all works but I've made a pretty much a full video on it and I'll tag that right up here if you want to go check that out but anyways we're basically just passing over the image prompt right here and you can see this is where we're using the new image model but we're passing over that image prompt from that previous agent and what it spits out is basically a really huge like base 64 JSON string and my computer's lagging because it's so big and all we want to do is we want to take that JSON string and turn that into a binary data that's actually a picture so that's why we use this convert to file node we're dragging in this this field right here all I did was drag that in like that and then we're telling it to output it in a field called data which we get right here and if I click on view we can see the actual image that it generated for us and then because we have binary and we want to do two things with the binary i split the paths so the first thing it's going to do because n when you split paths it's going to work from top to bottom the first thing that it does is send the picture back to us in Telegram and then what we do is we want to write to our drive and our Google sheet so all we did in here was we said "Hey here's our chat ID this is what we pulled in from that trigger." As you can see we're referencing the when executed by another workflow trigger and then we just said we're going to send over a binary file it's in the field called data as you can see data is right here and then we just send that over simple as that and then what we do is we take that binary data and we want to upload it to our Google Drive so the file name I basically just pulled in the title that that the main agent sent over i put the title.png i chose the folder in my drive and if you guys are having trouble setting up your Google credentials um check out this tutorial I made right up here anyways this got put in our drive as cat food/sale and if I go into my Google Drive right here I can see cat food/ flash sale flyer and I click into it and it is our cat food picture and here's a little illusion you can also see the other one right here which is the edited one is the one that we asked it to make it more realistic cool so after it's put into our Google Drive we then just want to log that output in our sheet so once again we're signing in with Google we are referencing the document called marketing team log the first sheet and then we're just mapping what columns we want to send over so we have title type request ID link and post for this one I just left the post blank but the title I pulled in the title from that first trigger all I would do is I scroll all the way down on this lefth hand side to the trigger and I just dragged in image title right here the type I fixed in here that this is always going to be type image for the request I dragged in the image prompt for the ID I went to the Google Drive ID which is what we need in order to later edit it and I dragged in the ID right here down there and then for the link I grabbed the web view link from Google Drive which it would have been found right here which basically lets us actually view it and that's what the main agent would send back in Telegram and say "Hey here's the image you can click on this link if you want to look at it." Okay so that was the create image workflow now let's take a look at the edit image workflow so it's very similar in the sense of we're referencing a workflow we're defining certain inputs which are the image the request the chat ID and the picture ID and this is important because with the OpenAI's endpoint for editing an image you have to send one in and then you say "Hey can you edit that?" So like here's a good example of making sure that they stay sort of like consistent so this first one I asked it to make a crocodile lifting weights and you can see it has like you know it's got two two dumbbells actually this one's a little messed up it's got these signs in the background and then what I can do is I can ask it to edit that image and it's going to keep it you know sort of similar so you can see here it was an edit the request was add headphones on the crocodile's head and now it's like the same picture pretty much except for now he just has headphones so that's how you can do editing an image rather than just creating a new one anyways this is the kind of stuff we're passing over let me open up this workflow and we'll look at the live run and break it down okay so here's the run that you guys saw in the demo it was the cat food flash sale flyer and it said make the image more realistic and if you remember in the demo it was able to pass over the correct picture ID because what it did is it searched the database first and then it sent over the correct picture ID anyways now we have that right ID and what we can do is we can download that file from our Google Drive so it sends in that ID we click view we can see that it's the correct one and now this is the one that we can send to OpenAI to edit so that's why the next step is we're hitting OpenAI's endpoint this time instead of using the generation endpoint we're using the edit endpoint and then all we're doing is we're sending over the binary file right here called data we're sending over the prompt which says make the flyer more realistic with a lifelike photograph of a cat enjoying delicious cat food blah blah blah and then it was able to say "Okay here's the picture here's the request um here's your new image basically." And it does the exact same thing it spits out a nasty string of B 64 so then we convert it once again as you can see we convert it we get the actual new edit image which is right here and then we do the exact same thing in the sense of we send it to Telegram and then we write to drive and we write to sheets okay so now let's take a look at this search images tool which is an interesting one so the idea here is there's there's two things you can kind of do so let me just quickly open this up so we'll take a look at it the idea here was that you could say hey like remember that image I made a while ago about the crocodile can can I look at that and you could ask you know get my crocodile picture and it would send it over to you or the other case is where you need to make an edit on an image and all you need is that image ID so let me explain what I mean by that when this workflow gets called it's going to send over the intent which is either going to be does the user want to get an image or does the user want to edit an image because that will kind of change how the workflow works then of course we have the image title that gets passed over whether you're getting or you're editing you still need to know what image you're going to get or edit and then of course we're pretty much always passing over that Telegram chat ID so we can send stuff back to the user but anyways hopping back into the workflow let's open up the live execution real quick that we saw in the demo which this one basically was just getting an image and passing that um picture ID back to the main workflow so when this workflow triggered we got the intent was edit the image was the cat food/ flash sale and then of course the chat ID and then we pass it into an image search agent where we say "Hey here's the title of the image." And all you need to do is you are an image retrieval agent you need to look in your image database tool and return the name ID and the link of the image but if you can't find one you would output not found and so over here it outputs the name ID and and the image and then a status the status would be not found if it couldn't find that picture in the database and that's why we have a structured output down here to actually define hey here's how you should output information and then here is the tool the image database tool where we're basically just giving it access to that sheet and actually it's called marketing team log i switched the name but it would just be searching through it and then it would have all the information it needs and then it would basically just output whatever we're looking for and then we have two if checks here so the first one basically says is the status not found if that's true you're going to go up here and return to the main agent and say image wasn't found in the database but if the image is found you're going to move on to this next check which is basically saying what's the intent of the user if the intent is just to get an image then you're going to go down this branch where you'll download that file and just send the content over but if the intent is to actually edit an image we don't need to send the photo we just need to send the the image ID back to that main workflow so in this case the intent was edit it passes down this way and then what we send back over to the main agent is the image ID as well as the image name and then it can basically say "Okay here's the image ID i'm just going to send that over to the edit image tool." And now it has all the information it needs to actually go make that edit okay cool let's just keep chugging along here i'm only going to review one of these because they're basically the exact same thing the prompting is just a little different you can download both of them of course and the full video about the LinkedIn post one I'll I'll plug up here but anyways let's look at the blog posting one so very similar we referenced the workflow that we plugged in we are sending over a blog topic which is defined by the model it says the topic of the blog we're defining the target audience so the target audience for the blog because the content will be written in a way that's kind of tailored towards this target audience and then of course we're sending over the chat ID so here's what this workflow looks like and as you can see in the trigger we define those things over here same as the other ones and let's click into the execution we saw in the demo so what got passed over here was the effect of sleep on productivity it was tailored towards working professionals and students and then our chat ID and first we hit a blog posting agent which has access to Tavali to do web search and let's take a look real quick at what it's getting in its system prompt so we're passing it in the topic of the blog and the target audience so as you can see right here this is what it's looking at and then in order to actually make that blog post it has to read through its system prompt which says "You are an AI agent specialized in creating professional educational and engaging blog articles based on the topic provided by the user the objective is to always begin by conducting real-time web search using Tavali the blog article should be written to appeal towards the provided target audience so anyways we just tell it like how to do its research how to start the blog all this kind of stuff and then we make sure that it uses its sources at the bottom as a clickable link and then just a quick example workflow of like order of operations type of thing but then as you can see it spits out a full blog post for us you can see there's a few sources down here at the bottom and a little reminder which is a well-rested mind is a productive mind so it basically takes this blog post and we're just going to feed that into the next agent which is a image prompt agent so we're saying hey here's the blog post as you can see it's getting the entire blog post and then we say using that post make a sort of a graphic or a visual that will go really well with that post so that's why in some of the examples you'd see there's like statistics in the visual or you know it really aligns with the actual content and that's the whole goal right so not going to read this whole thing but basically we're just telling it to read and analyze the post identify the main message like what are some key highlights and then make a text image prompt for that blog post and then pretty much you're going to output that that image prompt right here but we have it outputting a title as well as a prompt because we want to use a title later so anyways we're doing that again with a structured output parser where we're saying output a title and output a prompt and that's exactly what it did so then we can use them later you'll see what I'm talking about down here anyways this next step is the exact same as creating an image we're hitting the same endpoint for creating an image we're just passing in the prompt that came from the previous one and if you see these little functions in here where you see like the variable with the dotreplace I I need to change this so all of them have that but basically in an HTTP request if you're passing over double quotes it's going to fail so right here you can see there's like single quotes and if I wouldn't have had this function it would have made double quotes here and it probably would have failed so this is just a good check to replace those with single quotes so anyways obviously we're converting that to binary right as you can see right here here is our graphic for that blog we're sending that in we're sending the photo and then we're also sending the blog content so this is two different steps the first one is we're sending the binary data and then the second one is we're sending the actual text content they're both obviously using the same chat ID but this one is the output from the blog post agent and the previous one is just the binary data that's right here then of course we're writing to drive into sheets because we want to have those images to access later so same thing we're uploading to drive we're using the title right here to title that picture so this is why we wanted to have the image prompt agent spit out a title and a prompt so there's the title and then pretty much same thing here when we're logging that back into sheets so like I said this is the exact same flow for the LinkedIn one the only difference is that we have different writing style in this agent for LinkedIn posts and then we have different writing style here for the text image generation um just so the LinkedIn graphics are a little bit different than like a more of a general blog graphic cool and then the last one we have is the video generation so clicking into here let's take a look at what we're passing over this one's a little simpler on this front but the actual workflow is probably the most um complicated but we're just passing over a topic of the video as well as the chat ID so here's what the workflow looks like this was inspired by another one I did a full video on it where I did faceless shorts so if you want to check that one out I'll tag that right up here but anyways let's click into the execution from the demo and we'll watch that data move through so what we got sent over was a beaver building a house showing the beaver gathering sticks arranging them by a riverbank creating a dam all this kind of stuff and the chat ID and what we wanted to do is basically what we're doing is as you can see there's four items passing through we're basically creating four images and four 5-second long videos and rendering it all together in a 20 second clip so the image prompt agent we are basically feeding in that video topic and then we told it this long system prompt here is basically you're a master visual story structuring agent your task is to take a given short video topic which is about the beaver building a house and you need to create four parts that are cohesive and you're going to turn those four parts into a text image generation prompt but also we had to give it a output parser so whenever we do that we have to flick on this little box right here that says um require specific output format and we just gave it part one part two part three part four and you can see that's how it outputs over here and so even though we have those four parts it's still only one item so that's why we use the split out to turn in you know these four parts and one item into actually four different items so that we can create four different images and videos for each of these little image prompts so that's exactly what happens next we're hitting PI API's endpoint in order to generate those images so like I said in the full video where I did on faceless shorts you'll see a little bit more in depth about how I set this up but basically we're just hitting the endpoint for Flux image generation we are sending over the image prompt and as you can see this is going to send over four requests so the first one is a stocky beaver the second one is the same detailed beaver the third one is a close-up dramatic scene where he's placing sticks and then the fourth one is he has the actual home and so that's how it creates four different images you can see that right here what happens is it spits out you know all of these are still pending so it takes a little bit to actually generate them and so that's why we wait for 90 seconds and then we're just basically making a request to a different endpoint as a get where we're going to just go check on the status um of these requests and now you can see they're all completed and we have like a link to the actual picture which would be right here we have image URL if I just go to this you can see this is one of the images about our beaver and so one thing to keep in mind optimally you probably want to have this set up to be polling where you're not just waiting 90 seconds and just taking a guess because if it's not done after 90 seconds the workflow wouldn't be complete and you'd pass over you know maybe three of the images are done but the fourth one isn't and you just would be missing one so polling basically just means you'd be checking and if they're not done you'd loop back wait a little bit and check again and that just kind of ensures that you don't move on from this step until all four images are done if you want to see a quick example of that I did a little example in a fire call video i'll tag that right up here anyways from there we have those images and they come through as URLs and then we're hitting runway to turn those URL images into videos so what we're passing over here in the body request is the prompt image and as you can see we're sending over the URL and there's going to be four different URLs and then we're sending over prompt text which helps the model turn the images into a video and this prompt text is the same one that we used in the text image generation and now we're just using it again for the imagetovideo generation because obviously like this kind of has like a little story involved anyways what this one does is it spits out four IDs and then later again we have to wait for them to actually be generated and then we're going to check if those IDs are done yet and so when they are done after about 60 to 90 seconds you can see all of these statuses are succeeded and then we get the outputs in the form of a link which if I clicked into this one this would be an actual video but of course there's no sound effects yet so that's kind of the next step is we have to make a sound effect for each clip and then we want to render everything together okay so the way we do that is with a sound agent so what I did here is I passed over each scene individually so scene one scene two scene three scene four and then what we told it in its system prompt is that you're a master sound prompt generator your task is to create vivid immersive sound prompts based on the given scene and they should all just kind of be like background sound effects and as you can see it spits out these four different outputs which are all just like different sound effect prompts and we're going to feed those in to 11 Labs to turn this text into a 5-second clip of sound so that's why right here we are sending a request to 11 Labs we're basically saying "Hey here's the text that you're going to turn into a sound effect." And then right here you can see we have four different clips and they're all 5 seconds long of sound effects so I know I'm going through this a little fast but don't want this video to be too long and I have a full breakdown of the video that I sort of linked earlier so definitely check that out if you want to understand a little bit more of what's going on but this is the final step down here where we're rendering it and then logging it back so we're merging everything together so we can have those four items with you know here's the video and here's the audio and so that's what we get right here you can see we have four items and all of their success messages the different links we need and then we just basically wanted to clean it up and split it out so now we have here's item one and basically here's the audio for item one and here's the video for item one and then we have all four of those so that we can really easily pass it into this create a mate template right here so all we're doing is we're passing over the four variables down here so once you have my Cremate template script once you're in creatate all you have to do is go to the source editor up here you'll paste in that script right here and then you'll click on um use template API integration and then you'll hit this curl command and then all you have to do is when you're in Nitn you'll just want to import your curl to this HTTP request and paste that in there and then you'll have your template ready to go and then you would just basically drag in you know I need the four video sources right here and the four audio sources right here which are the web content link sources so as you can see they just kind of count up from zero to three which means we have all four and then we have pretty much everything we need to stitch it all together and create a mate and so this is like very similar to when we're creating the images and videos where it comes through and says "Hey okay like basically we're processing it." So we have to wait for 25 seconds and then we're just going to go hit that endpoint to download the URL that it gives us and we get the URL from that previous step and then it comes back as you can see with a full video that actually has the sound effects rendered there so then because we have the video right here as binary we're just going to send that back to us in Telegram and then we create a title real quick and then we put that title and everything else we need in the log okay so that was kind of how all of these different tools work and apologies if I went a little fast i just didn't want this video to go too long but now let's talk about pricing real quick and then how you can actually set this up in your own NAN okay so here's a little doc I threw together about the pricing of the system so obviously Naden is where we're pretty much hosting all this so if you're on the cloud which in this video I'm using the cloud so it's about you know the 27 bucks a month or whatever that plan is um so you've got that cost the first thing I'll touch on is the image creation so we're using pretty much the new OpenAI which is the GPT image one which is the pretty much the same generation model as in the chat GPT40 and so this is about 19 to 20 cents per image as well as 19 to 20 cents per image edit and we also are using this model in the um LinkedIn and blog posting agents as well so just keep that in mind that's going to be about 20 cents per run for those but in that create image endpoint you also have the option to use the different models like Dolly 2 or Dolly 3 which are a little bit cheaper the prices are listed right here um and as you can see like if we go into the request there's a parameter right here called model and this is where you could switch out that model if you wanted it to be cheaper you could even have that be dynamic if you wanted your agent to say okay you know like what type of thing are we doing let's use a cheaper model whatever it is but then anyways in the video creation workflow when we're creating those images we're using Flux through PI API which is about 1 and a half cents per image so that's like obviously a much cheaper route okay now for video creation we're using Runway which is about 25 cents per 5-second