in this video I'm going to show you a fully automated content system that generates revenue for your business we'll build this AI agent powered content system step by step in n8n with slack so you can manage the entire process naturally and will automatically store all of the content for repurposing in air table by the end of this video you'll have a fully functional content system that allows you to store new content ideas and manage content through slack and take your voice notes that you can add right into slack and turn those into content automatically stored in air table through slack you can also generate new content using everything that is stored in your a table database here I have all of the transcripts from all of my YouTube videos and the AI agent will be able to search that knowledge base through a platform called pine cone I'll talk more about this and how to install it later and then that will generate new content from the old content and it will actually add it into your aor table database we can also use any text in our database to convert into an AI video we'll use hey Jen you can send it text and then it will use one of your avatars that you can upload to actually generate a complete video without having to record it yourself and again we can use the slack chat to initiate that process simply by saying convert c274 c274 into a haen video and right from slack we can even publish content here we're saying publish content c268 so the system will automatically grab this piece of content and publish it directly to social media in our example today we'll go ahead and publish this content directly to Twitter which we can see right here by using slack we can make the process of communicating with the agent easy and natural and by having every single piece of content stored in air table we can use the AI agent to scan and rewrite content using our own voice and style into new formats and structures that we can post to social media by the end of this video you will have a fully automated and practical system that allows you to create repurpose and distribute content at scale to grow your business now here's the plan to make this really easy for you first I'm going to give you a quick demo of how this works I'm going to go through slack and show you air table and hey Jen and generate all this content in this system then I'm going to build out everything step by step from a completely blank workflow we'll start from scratch we'll add the first triggers and build out this entire automation integrate it into slack pine cone and haen the platform that allows us to create videos from text and I'll take some time to explain how the AI agent Works how do you set everything up and build out all the tools I'll show you how to program it how to tell it what to do and how to use all of those various tools I'm going to show you everything step by step so again we'll start with the demo I'll explain the AI agents and then we'll build everything out n8n slack air table haen the knowledge database in Pine Cone and I'll show you how to use that knowledge base to generate new content new videos and actually publish content I'll help you put all of this together fast so you can skip the hours and hours it took me to learn how to build this on my own all right so as promised now let's go through a little demonstration and explain how these automations work primarily the workflow in the system starts with slack but you can also manage the system in air table this is an air table database that I've been building out for a new product which is called kedb solo it's going to be geared towards helping solo preneurs streamline their content creation repurposing and publication process then I'm going to jump back to n8n and I'm just going to go ahead and test this workflow and jump over to slack and we'll start with our most basic command which is to add a Content idea so let's add content new idea for you YouTube demo so we're just going to add a Content idea I'll jump back to NN you can see the agent is looking up the command and doing the proper response so we'll jump back to slack and it says hey great I've added your new content to the database here's a summary of what was stored it went ahead and came up with a title for the idea and then dropped in the idea and then gave it a new C if we were to jump over to air table we'll see c276 and we've got the title and the text that came from Slack so what we did there is we took advantage of this tool that is connected to the AI agent called add to database the agent was able to determine what we were doing based off of the message that came in from slack and also the instructions that we have provided the agent which we'll go over in a bit so now let's go ahead and test an additional workflow I'm going to jump back to slack and this one's just going to be a query to get existing content so get content and we're going to go ahead and just fetch the one we just added c276 jump back over to nadn it's processing that request now it's getting the content now it's preparing the response went back to slack and now we can see here it went ahead and retrieved the content and it gave us the text from the database here we see new idea for YouTube demo right here which was the text that we added in the previous command so now let's go ahead and test a workflow I'm going to come back to slack and this time we're going to go ahead and update content so let's type update content c276 and update the text or content to this is updated content from slack we'll go ahead and send that command jump back to NN we can see it's translating our request it's getting the content it's preparing the update it just did the update and it responded back to us in slack so here we have the update was successful so now if we come back to the database we're going to see here that we have the updated text this is updated content from slack so now we've already gone over three specific tools we can get content we can add content and we can update content now let's go ahead and try these other tools here let's go ahead and actually generate a video from our content right here so let's go ahead and test the workflow let's jump back over to slack and I will type convert c276 into a hey genen video we'll hit enter jump back to n8n now that request is running we're getting the content building the information we need to send it to haen just sent it to haen doesn't look like we have any errors so I just jump back to haen right now and it's now processing that video when it is done it will call this web hook in air table and it will automatically add the video to this section right here looks like it's done now if I open up this media and play it this is updated content from slack and you can see that it is using the text that we updated from slack now let's go ahead and test our ability to publish content from slack I'm going to go ahead and test the workflow again come back to slack publish c276 to Twitter hit enter come back to watch our agent process that information it's going to grab the content process everything and publish the content it looks like it started the workflow so if I jump up to Twitter and refresh and so now you can see we have that content that was in our error table database published to Twitter from slack and we have our success message from our assistant so that covers these five main tools which we're going to build live in this video but now I also want to show you the knowledge base so in my aor table database here I have imported all the transcripts from all my YouTube videos If I had been using this system since the very beginning then I would already have these in here as I use the slack system to generate scripts and transcribe videos but from this example I just imported them into the system so now let's jump back to n8n I'm going to go ahead and test the workflow I'm going to jump back to slack and now I'm going to say generate new content about the wow statement and now the wow statement is something that I used to talk about a lot when generating videos and scripts and creating content it was a system for helping you generate more valuable content and so now what this is going to do is it's going to search for that relevant content related to the wow statement in our database and then after retrieving that content it's going to use cloud over here the brain of the AI agent to actually produce a new post and then add it to our database so I'll test the workflow again generate new content about the wow statement for creating great videos hit enter jump back to n8n it's now processing our request now it's going to the knowledge base to gather all of the relevant content for generating this new piece of content and now it's adding that to the database and then it's going to give a message back to slack we'll jump over there to see so now it generated the new piece of content it gave us the content here a little summary it gave it a new CID so now I can jump back to air table go to the top and now we have c277 and we have the content that was written from my content so I used to talk about the $5 rule a lot so I brought back examples of that and a bunch of other things that I talked about on a regular basis like creating aha moments so you can see this is really powerful because from our a table database and from slack we can completely generate New pieces of content and get them organized into our system so that we can then edit or publish to social media so that covers the tools that are being controlled by our AI agent but I do have one other automation that will take in audio notes that we post into slack and it will automatically transcribe those and bring those into air table for Content so let's say I was out and about and I opened up Slack I could come down here and just record a message while I drive and off the top of my head I can come up with some content idea and talk about the different things that I want to talk about in that post and what's great about this is that you can also just talk off the top of your head you don't have to make it perfect because once we add this into the database we can rewrite it and create content directly from that so we don't have to make this perfect it's great for just taking notes and getting that into your content system so from here all you have to do is hit send let me make sure I'm testing the workflow come back to slack we'll send this binary audio file then the system takes a slightly different Fork it gets the file transcribes it and adds it to the database if we come up here we can see that new piece of content it just popped up here we can see the new transcription here come back to slack we've added the new audio transcription to the database as c278 c278 and if we want it to we could just publish it from here come back to n8n just to test the workflow and we'll say publish c278 to Twitter come back to n8n it's processing our request it's going to grab the content it published the content let's take a look looks like the workflow was executed so if we jump back to Twitter now and refresh the page we see the new post that we added from the audio notes that was stored in a table automatically posted to Twitter and then if we come back to slack it lets us know that everything was successfully published so you can see how powerful it is to interact with our AI agent through slack it makes it very natural we can add new ideas and we can even add in audio notes to generate content from we can generate new content from old content we can convert text content into videos automatically we can update content and again everything is backed up into our error table database now let's go through the process of helping you build out this exact system step by step and by the way if you like content like this make sure to like And subscribe to the channel tells me what type of content you want more of all right so now let's build everything here from scratch and don't get intimidated all of this is actually quite easy there's quite a few different things here but they're actually quite easy to set up and you'll see how easy this process can really be so I'm going to jump over to a brand new workflow might as well add a name AI agent YouTube demo looks like it added this Arrow here I'm going to delete that didn't know what that was and now let's go ahead and add our first step and now I'm going to start with the AI agent if you just type agent into the search you can have this agent here and it automatically goes into the settings of that agent but I'm going to come back out and just talk a little bit about how this works in nadn and why it's so cool and how to configure it so you can see in my demo here we were using slack to send messages into the AI agent and then we would send a message after it was done with all of its work but when you're setting up a brand new workflow nadn does have this built-in chat which will allow you to chat with your agent before you've actually set it up to some external service like we did with slack so here if I came down and I were just to chat hello it will actually try to chat with the AI agent but there's an error right now because we haven't actually configured everything there are some requirements in order to get this AI agent to work and one of them is a chat model so if you think about an AI agent as a complete person just like you or me we have to have a brain and that's what this chat module is so when you think about an AI agent it's just like a person it needs a brain it needs memory and it needs tools to work from it needs to be able to do things just like we have arms and legs and hands and feet which are our tools to actually make an impact on the outside world the AI agent needs the same so I'm going to go ahead and add a chat module I'm going to go ahead and use cloud I already have a cloud account connect connected if you do not you will need to create new credentials go ahead and add those and then once you've done that select the model I'm using Cloud 3.5 Sonet and that should be good let's clear out this error and it's showing an error here let's go ahead and just send a message so it looks like we were able to fix that and now the chatbot can actually talk with us so we sent the message test and then it responded with hello I'm here to help what would you like assistance with feel free to ask questions or let me know what types of tasks you need help with so this agent isn't going to be super helpful yet doesn't really have any tools to actually do anything it only has the claw brain and it also doesn't have memory so it's not going to be able to remember any of our conversations so if I say my name is Steph and hit enter it will be able to respond it says hi Stephen nice to meet you but if I were to say what is my name then because it has no memory hey I apologize I don't have any information about your name so let's go ahead and add in memory I'm going to come up here and add in some memory and we can go ahead and just use window buffer memory this is the easiest by default it's going to have some sessions here pre-filled for you we're going to need to change those later this is a key here that we use to keep track of different conversations and then for context window this is how many previous chats it's going to remember On Any Given request I'm going to go ahead and just bump this up to something like 10 and then just thinking ahead a bit to when we actually do integrate this with slack you can notice here that slack has the ability to create different threads we're asking question questions in this Mainline Channel Here kedb solo but when it responds it's responding in a thread and anything in this thread is going to be a conversation that we maintain here in n8n so let's go ahead and move out here now and let's go ahead and save it and now that we have memory here we should be able to say hi my name is stevenh and now we should be able to say what is my name your name is Steven and it's able to do that now because it has memory so now let's talk a little bit about how we actually program the agent and tell it how to interact with the user and also how to use the tools that we actually add to the system so now let's go ahead and go into our agent and we can go ahead and leave everything here for now but what I do want to show you here is that there are different options that we can add and one of those options is a system message and this is where we can really tell the agent who it is how to behave what are the different things that it can do how does it access the different tools that it has and how does it actually respond back to the user so now this is where a lot of the magic actually is so let's jump up to this document here where I have the current prompt that I'm using in my prototype for the kedb solo n8n automation so here you can see we're defining hey this is the system prompt for the content management agent and then I give an overview you assist in creating storing and managing and Publishing content you have access to several tools to facilitate these tasks and then I go ahead and I start to to Define these tools and so what you're going to notice here is that each of these tools usually maps to something that is here connected to the tools so here I am in the demo that I showed you earlier and we have a git content an add to database an update database a haen video and publish content and so if we come through this document here we're going to see we have a section here for tools and their functions and so then we can Define how the git content tool actually functions and we give it a purpose and we tell the agent that the purpose is to retrieve stored content from the air table database and then we explain how to use it when a user requests to see a piece of content look up the record using the Cid in the format cxx where X is any number of digits excluding leading Zer so that tells the system what the format of the CID is and then it says to return only the text column from the retrieved record and so now if I jump back to My Demo and we look inside the git content you can see here it's just a search operation for an a table database where we provide the operation and what base we're working from in this case I was using this base Here kedb solo prototype and what table we're working with the table content if you see here we have the table content and we're filtering by the CID and here's where the magic is is that inside of this search formula we have this special tag here which is saying hey while you have this conversation with the user and you identify a specific CID again based off the conversations that we have in slack once we know what that CID is and we've defined that and the agent helps you sort that out with Claude then when it actually executes this tool it will send that CID and it will replace that here when it actually runs and so if we go back to this example here and we test the workflow get content c276 jump back to our example here it's getting the content it's processing it and then it's going to respond back to slack but if we look at this get cont content here you can see that the agent sent that ID and then it was replaced here automatically to actually get the data that we were looking for so really what the AI agent does is it's just using your system prompt which explains how to actually use and come up with the different variables that you need in this case a CID and then the agent automatically helps you extract that information and then passes it into your automation so that you can actually use it and then return a value and so then you can see we listed the other tools as well add to database the purpose add new content to the a table database and we explain how to use it when a user provides a new idea post or rant to be stored trigger the tool anytime the user says something like store an idea or here's a new piece of content so it's using this information here to evaluate the request from slack to determine whether we are trying to add to the database or whether we are trying to get content or whether we are trying to update the database so all you're trying to do here in these different sections is really just trying to explain to the agent what the purpose of this tool is and how it's used and what to look for and then you can see down here and we'll cover this in more detail but we also provide required fields and these required Fields will map to the tools in 88n so if we're looking at this tool here add to database then the required Fields here are title and text and we're telling the agent to generate a short title based on the content and then we're taking the content that the user gave us in slack and we're adding that to the database so again if I were just to test that workflow very quickly add content idea another demo and then we can come back here we can watch the brain it's going to get the information that it needs and then if we jump into this run here you can see it generated the title for us and then passed in our text another demo which came from slack another demo and that's why it's showing up here in air table as another piece of content so I'll go through all of these in more detail as we go but you can see that this is just a description on how the tool works and you're giving it information on how to find the information it needs and how to think about it just so that when it's trying to execute this without you being there that it can do it successfully all on its own if you do find that you're having errors in your automation it's generally because these instructions are not quite clear enough or they're overlapping or there isn't enough Clarity something related to these instructions is probably where the issue is now if you want access to this entire template including the aor table database SP where you can download this as a template make sure to jump into the no code Architects Community it's an active group you can get text support directly from me we've got calls almost every single day and you can access all of my automation templates just like the one you're seeing today all right so now let's go ahead and continue I think the next best thing to do is to replace this manual chat with slack so that we can start to build out our app so now there's a few steps that we have to do in order to make this work and just make sure to follow what I'm doing just to make this easy so the first thing I'm going to do is I'm going to jump over to slack and the first thing I'm going to do is jump over to a new workspace where I've never created a app before here's a previous channel that I created in another example but I'm going to go ahead and create a new channel going to add the channel and I'm going to call this K DB solo and I'll go ahead and leave it public I'm not going to add anybody to this now this is just going to be a private channel for me right now and then you're going to want to go and create a new tab and you're going to want to go to api. slack.com slapps you might need to log in here you can see other apps that I have this is on a different workspace than no code Architects and I'm going to go ahead and create a new app from scratch let's go ahead and call this KB solo and then I'm going to pick the workspace and I'm going to go with the content engine now one thing I have noticed in the past is that when I have multiple apps in the same workspace I have some unexpected Behavior I have gotten it to work so in this demo I'm installing this app in a workspace that doesn't have another app so I would recommend that you do the same let's go ahead and create the app looks like I call it kedb solo R so I'll go ahead and just fix that real quick app name kedb solo after you change that name make sure to save the changes looks like it's asking for a description AI agent content system and we'll pick a color here go with black save the changes next we're going to go to O off and permissions I'm going to come down first you can leave this alone you can't do this until we've added something below here so I'm going to come down to Scopes I'm going to add an ooth scope here I'm going to add History Channel History I'm going to add chat write permissions I'm going to add files read I'm going to add files right now some of these you might not use in this specific example but I add these because I've added other functionality down the line and it's easier to add some of these now I'm going to add group history and I believe that's all we need for now and now that we have added those in we can scroll back up to the top and we can install the app into your workspace you can go ahead and allow then it's going to give you this access token here you should be able to copy that come back to your demo here we can just add a slack module here let's go ahead and come down to actions let's come down here to send a message then we need to add a new credential I already have one here but I'm I'm going to show you how to do this one since it's a little bit more difficult going to come here to credentials to connect with create new credential we're going to use an access token because we are connecting with the bot and not our own account so I'm going to go to access token here we're going to take that access token that we copied right from here we're going to copy that right into this access token here and we'll go ahead and save and it should test that successfully if not then you'll need to figure out what's wrong with the access key and then I'm going to go ahead here and just put in a test message test send message to we're going to go to a channel it looks like I didn't add the permission to actually look up the channel so I'm just going to come over here to slack going to come into the settings here by clicking here and then we've got that channel ID here I'm going to copy that come back to n8n going to change this to ID We'll add that in here we'll send a simple message we've got our text here let's test the step and now we're getting the error slack Channel not found and I'm just remembering here that one thing you need to do is come back into these same settings here if you've lost it remember come back to kedb solo Come here click one time then come to Integrations and you're going to add an app and then in your workspace here you should see the app that you just created kedb solo let's go ahead and add that and now that that has been added I believe we should be able to come back to our message here and test the step still saying Channel not found now that I'm thinking about it I think what I might have done is messed up my credentials here I think I copied the key from my other test app here so I'm going to jump back back to the kedb solo I'm going to grab this key here update the credentials come down here to the access token I noticed that they were a different size I'll go ahead and click save and we'll go ahead and test the step again and there we go so it's just a matter of me copying in the wrong ID so if I come back here we can now see we're getting a message from the kedb solo app in the kedb Solo Channel so I'm going to come back up to n8n I noticed things are getting a little bit messed up here so when I added this slack module here it automatically added this trigger so that when I test the workflow it triggers this so if I do this now should send another message there we go so now we come back to n8n I'm going to go ahead and delete this move this here to the AI agent and just connect it up just like that so now once the AI agent actually figures out the response it'll be able to send that message back to the user now nadn keeps adding this first step here because we don't have a trigger that's going to get information into the AI agent so let's go ahead and do that now I'm going to come here and add a new new slack module in this case we're going to trigger on any event we can use the existing credentials that we've already created for channels to watch we can go ahead and go by ID and then copy in the ID again that way we're not processing messages from every channel and now the one of the thing that we need to do is that we need to open up this web hook URLs here and we need to take this test URL if you just click on it it'll allow you to copy it we're going to take that back into our slack API settings we're going to come down here to event event subscriptions we're going to enable this and turn it on and then down here what we're going to do is before we actually put the URL in there come back to n8n and test this step it's going to wait for a request what we're doing here is we're proving to slack that we own this web hook so we're just going to put this web hook in here just like that it should send it over to nadn and verify it just like that we can't actually save the changes yet because we haven't subscribed to any notifications so I'm going to open this up here we're going to add a bot user event I'm going to go ahead and typee message message do channels and message. group and now we can save the changes and now if I come back to n8n and I listen to a test event if this is no longer listening again you can come back here we have our trigger let's connect it again if we come back in here and we test listening for a new event we can come back to slack and now if we message here test that should trigger our workflow so now we got that message here that's great and so now it's going to pass that message into our AI agent and then respond back to us so if we can test this particular workflow and it works then we are good to go with the slack integration so I'm going to test this workflow I'm going to go to slack I'm going to say please create a tweet about how to use air table and why it's cool well before we get there we got an error here and that's because previously the way this was set up is that it was looking for the data from the previous node which was that chat if you remember we had that chat that was right here and now because we've changed the trigger we need to update this here so I'm going to change this from prompt Source user message to Define below and then for the text I'm going to send in the text that we sent in from slack so I can just drag that over just like that whenever you're using these types of variables you do need to make sure that you're on the expression otherwise this won't get converted into the actual message that's coming back so that should be good we we haven't updated the system message again that's fine I'm going to go ahead and save this as we are make sure you save regularly let's test the workflow let's come back to slack I'm just going to copy this again jump back to n8n oh we're having another issue mentioning the window buffer memory so I'm going to come here and so right here I had mentioned this before but this is a key that it uses to determine if it's in the same conversation or if it's a new one and remember I mentioned that slack has the ability I was doing it in my other slack channel to create threads and I like to use those threads as the conversation so at the main level here we have different conversations that are happening but if we go into a specific thread then the window buffer the memory is remembering everything that happens in a thread so that we can separate the memory from one conversation to another so for this value I'm going to jump back to my main example I'm going to go to the window buffer memory and I'm just going to copy this out of my demo I'll move it in here to the new buildout I'm going to change the session ID from take from previous note automatically to Define below and then I'm going to drop in this just like that and again remember when you're using this code here you need to go to expression and you'll want to pause the video just for a second to write that out just just as I have it you're going to want to copy this exactly as I have it with uppercase and lower case and question marks everything that I have here you have to copy it exactly as I have it so I'm going to come back here let's go ahead and save let's go ahead and test that workflow again jump back to slack I think we got it this time got to jump back to the proper workspace let's just cut and paste this again jump back to our demo okay so we're not getting an error now so now it looks like it actually responded to us let's come back up to slack and now you'll notice here that slack returned with test which is what we were getting before and it's just because I haven't updated the message here so let's go here and now the actual message that we want to respond with is the message that comes out of the agent so I'm going to take the output here and just drag it here into the message text save again and test the workflow come back to slack let's try that once more come back to n8n now it's going to send that message now if we come back we're going to see we're getting a response here's the suggested Tweet now this tweet itself is just coming from clot itself it's not using any of our data so we're going to update that in a bit but we can see that it's actually sending us back a response now the one thing I can show you is that it's not coming back as a thread so let's go ahead and tweak that so I'm going to come back to my example here I'm going to come to slack here and you're going to see here that they have added an additional option and it is to reply to a message and this is what actually creates the thread and again we've got this text here that I'm going to copy and you'll want to copy it just as I have it here copy and then we're going to come back to our new agent I'm going to come into slack going to come down here to add option we are going to reply to a message and then it's asking for the time stamp to reply to and we're going to click here reply to thread I'm going to come down here I'm going to move to expression and then I'm going to copy in from a paste into this box here and again you're going to want to copy this in exactly as I have it basically in order to create a thread you have to pass the timestamp of the original thread or the thread ID that comes with a response and honestly it looks like there is a typo here this should be Ts for timestamp so actually I'm going to come back to My Demo and correct that really quick here TS will need the same thing in the window buffer memory the TS here so that's on my demo I'm going to save that then I'm going to come back to the new demo here we're adjusting the reply to thread timestamp then I'm going to come back here to the window buffer memory and update that here as well so quite a few little details here to get set up with slack but just follow them step by step and you should be good to go now I'm going to come back here and save going to go ahead and test the workflow come up to slack let's try it again and see if it responds as a thread we'll go ahead and do that hit enter come back to NN it's creating that tweet then it responded back so notice now it's replying to that thread and so we can see the response is actually now creating a thread and then inside of our app here the window buffer memory is now keeping track of that conversation as it progresses so again just make sure to copy this and correct that little bug I had here there's a reason why I didn't notice this bug before it didn't actually affect the reply to in the original thread but it would have broken the memory here so it's good that we corrected that and just to confirm that again inside the window buffer memory you want to make sure you have this exact text just like this and you're going to use the same text in the option reply to a message and you're going to have that here just like that so once you've gotten to this point you've successfully added your slack trigger and the message back to the user in the specific Channel and you've also been able to build out your app inside of apis slack.com and now we're ready to build out the rest of the automation start adding tools the air table database the pine cone database and we'll go from there all right so let's go ahead and continue on I'm going to jump over to my original prototype and I think it's probably best to start to build out these tools in the air table database you'll find that this starts to move a lot faster than the slack integration which is not necessarily super easy to do but that's why I built everything from scratch so you can see exactly what I'm doing so if you run into an issue you can go back in the video and correct it and build this out yourself so next up we probably should build out this air table database so I'm going to go to air table I'm going to create a new base I'm going to start from scratch got to pick a workspace start from scratch go ahead and close this out and now I've kept this original database pretty simple we just have a few different fields here I've got a few hidden Fields but we really don't need these we really just need what we have here so let's build this out really quick I'm going to call this the kedb solo prototype YouTube demo so I don't forget I'm going to come over here I'm going to add a auto incrementing field I'm going to call it ID I'll move this over here I'm going to rename this column here and change the field type we're going to call it CID just like we do in this database here this is how we search and then I'm going to change the column type to formula and I'm simply going to put a quote C Ampersand and then I'm going to add ID I'll click save and so what that's doing is it's just putting a c in front of the ID that's automatically generated then we need a title and text so let's do title we'll make that a single line text we'll change this to text we'll make this a long text field I'm going to go ahead and delete status I'm not using that right now I do have this little fancy column that we probably don't need but I'll go ahead and show you how I do it it's a formula it's getting the length of the text just so I have that I'm going to copy that going to add text length go down to the formula and what we have here is just Len parentheses text create field it's saying zero because there's no characters here but if I put in test it's going to be four so now what we need is an image and media attachment field and a last modified so let's create attachment we'll call it image attachment video and I'll scroll down down here and we'll do last modified time I'll just go ahead and create field it'll name it for me and there we go so I'm going to go ahead and delete these so we're starting from scratch and I believe that's really all we need to get started I'll go ahead and rename this table here as well to content and then I'll jump back to our build here and let's add our first tool so I'm going to come over to air table if you don't already have credentials you'll need to add a new credential here this is pretty straightforward if you click it they will actually give you instructions on how to do this as well I personally used the access token to set this up but it looks like they have o off as well this one might be a bit more straightforward for you if you need any help you can open up the docs right here so from our example it probably makes sense to add to the database first instead of get since we just deleted everything so I'm going to jump back to our demo here and we're going to create a new row and then for the base type solo and now I'm going to grab our new database the KB solo prototype YouTube demo and grab the table we'll see content we can leave this as is and now for the title and the text this is where we need to add that expression to bring in the automatically generated title from the content and the content idea itself from the discussion that we have with the AI agent so again the AI agent along with the system prompt is we're giving it instructions specifically for this add to database that we need these two required Fields so it's going to help us figure this out for us again it's going to generate the title and we're going to pass in the text so I'm going to come back to my example here and I'm just going to copy these and you can copy them just as I'm doing as well we'll come into this tool here I'll put the title again I'm going to move it to expression you'll see it's formatted correctly and then I'll go grab the text come back over here we'll add the text again turn it to an expression and we can leave image and video blank you could even remove them if you didn't want them there looks like I didn't get this to expression fix that and it's also giving you some instructions here on how you pull in variables from the AI you want to pay attention to that cuz it tells you exactly what to put and that should be all we need to add this new tool except that I do like to rename this to the tool itself so in this case we're going to say add to database up here in then the rename node right here rename then we'll go ahead and leave this window now we have that new tool here now the only thing we don't have is we haven't updated the system prompt here here in our parameters where we added an additional option remember we did that earlier if I were to delete this remember we come here to add an option system message now I'm going to come to visual studio and I'm just going to copy my entire system prompt here into this message here now in the description below there is a link to this full document so you can cut and paste the contents into the system message box just like this it makes it a whole lot easier for you it's got all of the tools and the instructions and everything else I'm going to go ahead and exit out I'm going to save this I'm going to test the workflow going to come back to slack I'll just say add this content idea this is my first idea jump back over to n8n it's processing that request it's adding it to the database preparing a message back to slack so if we come back to slack it's going to say yep I was able to do it great it created the CID we can come back to our prototype the one where we're building together we see C4 and we see the message and it came up with a title on its own so that is working and confirmed and now we can continue to build out the additional tools all right so let's keep moving along here let's go ahead and add the git content and this should start to speed up a bit get content air table tool G again we'll go ahead and use our search to find the right base solo demo from the list content record ID in this case we have have to pull this record ID from the AI again so we're going to use one of these placeholders I'm going to copy this in remember you need to go to expression copy that in now the variable that we're going to pass in is just called ID and I believe that is all we need for this one you already have your connection so that's good I'm going to come back out save forgot to rename the tool rename and this is going to be git content and then we've already copied in the system prompt here with everything from my document so in this case I'm just going to come here and show you what's there here we have get content and this is where we retrieve content from our error table database and we pass in a specific CID so let's come back to our demo Let's test the workflow I'm going to move this slack over so it's closer and now I'm just going to type get C4 and jump over here just trying to figure that out looks like we had an error so let's see what happened the resource you are requesting could not be found and it has the C4 here but what I'm realizing here is that I use a search not a git so I'm going to change that to a search the base and the table should stay the same and now we need to update this filter so here we're going to use a curly brace CID close curly brace equals going to turn that back into an expression going to copy this placeholder here and then I'm going to adjust this to say CID and I'm going to put that in quotes So the final formula here is open curly brace CID close curly race equals quote two quotes and then the variable we're going to pull from the API let's go ahead and save and test that again come back to slack notice it actually responded with the error we're going to say get C4 come back now it's getting that content now it retrieved it successfully and now it's responding back with the message so here it says Hey I was able to get that for you here is the content and then it gives a little description of course you could clean clean up exactly what it responds back with if you use the system prompt so we could come in here and say get content and we could specify the output and that would help tailor how it actually responds to us via slack so now let's just go ahead and add in the update database as well this is an update record we'll come over to our new build We'll add a new tool air table this time we're going to update choose from a list solo prototype table content IDs to match on here we're going to pass in a placeholder I'm going to go ahead and grab this here and I'll turn this to an expression I'll paste this in we'll change the placeholder name to ID title expression as well rename this to title and for text expression paste we'll put text so that should be everything that we need let's go ahead and exit out here let's go ahead and save and I forgot to rename it so we'll rename name it this should be update database and then if we jump back to our system prompt here we're going to see update database this is the purpose is to modify an existing content record in the air table database the usage when a user requests to update an existing CID first retrieve it using the git content tool so this time we're telling a tool to use another tool then update the text column of the identified record from the git content tool because remember the git content tool is going to return back to us the spefic specific record that we're working with optional fields are the title required fields are the ID this is the ID we need to look up in air table and then this is the text now one thing I am going to do is I'm going to come over to our demo prototype here I'm going to add another field I'm not sure that I need it but I like to have this record ID it's a formula record ID you can start to type record and then this is going to pop up you just need to add the closing parentheses it's going to show you the actual record ID behind behind the scenes in air table it's right there you can go ahead and hide that so now I'm going to jump back to our demo here I'm going to save things I'm going to go ahead and test the workflow going to jump into slack and let's say update the text of C4 to did this work hit enter come back to n8n it's trying to figure things out it's getting the content grab the ID now it's updating should be successful let's come back to our prototype I'm going to change the color because it's close to this one and I'm getting them mistaken so it's just make it bright red so I know it's different and then we're looking at the content here and it says text did this work and that's what we passed into our slack channel did this work that's what we wanted to update it to and it responded back that it was able to do so so now we have our add to database get content and update record tools and now we can continue on with the rest all right so now we're moving along let's go ahead and add the next tool which is going to be the hayen video to use this you will need to create a hey genen account you should be able to use the free account you're going to want to come to avatars and create a new Avatar if you use their free account they will limit you to how many videos you can create and they will also put on this little Watermark as well so we're back here at the agent I'm going to go ahead and reorganize things a bit here just to make a little room I'll add the other tool this time we're just going to use an HTTP request tool we're going to change this to post want to copy this in just like this you can copy it just as I have it here for authentication we are going to add a generic credential type and we'll add a header off I already have one in here I'll go ahead and create a new one create new credential for the name we can go ahead and use x API key now for the value you're going to come over to your hent account you're going to come up here you're going to go to space settings you're going to go to API you're going to copy that key you're going to come back and drop that right here you can go ahead and update that here hen demo go ahead and click save then we can continue on you'll want to enable headers for name go ahead and type accept then go ahead and say use Fields below go ahead and put in application SL Json then we'll go ahead and enable send body you'll update this to use Json below and then for the Json you'll want to copy and paste this in directly as I have it here paste this entire bit of code that I have I will also expand this out so it's easier to see and see it all in one page so we have the entire contents of the Json right here you want to make sure that you write this out exactly as I have it any little mistake here will break this to get these little indents here you can use a space that'll work just fine for the Avatar ID you want to replace that with the Avatar that you generated in hey Jen back in the Avatar section here you can create that Avatar I'm going to jump into my existing Avatar I'm going to use this camera a. MP4 you can cop the Avatar ID just like that come back here you're going to copy that back into this section here it's going to be the same because this is the same Avatar I was using and then for The Voice you need a voice ID you come back to hey Jen and you go to AI voice it creates a voice for each video that you upload as an avatar you can come up to the three dots you can get the voice ID you can come back and copy that in here this will probably change because I think I was using a different voice ID for the video but it doesn't really matter as long as you have a voice ID in this case now I just made it so that the voice ID that I'm using is the same one here it was actually using one of these voice IDs which was from a different Avatar so you can use the voice ID from this Avatar over on this video and this placeholder here will insert the record ID from Air table so that when it's done processing the video it can send us back that ID so we know which video to update and then we're also going to add in something here for the Callback URL so I'm going to hit enter couple of spaces I'll type call back URL close quote colon space two quotes and then a comma and then I'm going to jump over to air table I'm going to jump over to automations I am going to add a new trigger when web hook received I'm going to take this web hook here I'm going to copy it and we're going to come back to our call here and we're just going to put that right here call back URL we're going to add that in just like that and we are good to go so again just make sure you copy this exactly as I have it you'll notice that I added the spaces here to get us here if you run into an issue where you are running this and you're getting a 400 bad request it's typically related to the formatting of this document it has to be precisely as we have it here I'll even expand it a little bit more so you can see the entire thing I've noticed on PCS sometimes that enters can cause an issue so if you're on a PC and you're finding that there's an issue you can always collapse this and remove all of the spaces enter keys and everything and just make it one big long string I'm not going to do that now because I think it'll work for me but if you're on a PC I've seen that happen let's go ahead and move forward and test this out we're going to go ahead and save things again I'm going to come back to my document here here is the system instructions for the haen video you'll want to make sure you copy this into your agent below right here you're going to want to continue to add to this system prompt as we add these different tools this number here just happens to represent the order in which I added the tools when I originally built this you might as well just keep them the same as I have them now let's come back to our automation here let's test the workflow and now in slack here I'm just going to say convert C4 to haen video let's see what we get it's processing that request getting the content then it's passing it to the tool looks like we got no errors from H Jen which is great so now if I jump over to H Jen notice that there is a video processing right here jumping back to air table and looking at the data here I do like to use short text here because then it's going to generate the video faster once this video is finished you should be able to see it here and it should also trigger this web hook right here because again remember in 8N in our body here we added in that call back URL here so let's go back to hey Jen all right looks like that video is complete so let's jump over to air table if everything was process correctly you should see a test down here that came through if we can look at the body and looks like it was a success so that's great we have the data now and we have the URL of that video and we also have that call back ID now if you remember back in in our Json here we put in the ID and if you look back at our system instructions we said get that ID from the get content tool in the CID lookup so what happened there is that in our data here we found this CID we grabbed This Record ID and we passed that along to hyen with the web hook URL going back to the automation so that now we can update this record ID with the video so now what we can do is we can come here we can add a update record table content record ID we're going to pass in in the field that we passed in to haen that returned it back to us so here for the record ID we'll click this we'll go into the body event data call back ID then we'll choose fields and we will update the video and for the video we'll pass in the URL back into the body event data URL and now we should be able to test this step I'm going to go ahead and say run as configured run test looks like it came back with an error so here I'm getting an unable to render update the attachment field could not be parsed so what that's telling me is that the URL that we're trying to send to this video attachment is incorrect and that's because I think it's actually an image when you run hen API to create a video it also creates a gif for you as well so what we need to do here is we need to come back to the Automation and I believe the GIF is the one that's triggered first I'm going to come back to the trigger here and I'm going to test the trigger to see if there was any other requests that came through and now we're seeing here that the video was a success so what that means is that when we process a video H Jen fires off multiple web hooks the first one that we saw was for the gift being completed this one is for the video so it fires two separate web hooks that we have to process so really all we need to do then is just create a conditional statement I'll do that right here but first I'm going to grab this event type here copy it conditional logic if conditions are met and we're going to look at the body of event data go into the body we're going to grab event type come into body we'll go to the event type and we'll say contains Avatar video success now we're going to move this update into that conditional logic so now we're only doing the update when it's actually a video and not when it's just a gif or a gif whatever you want to call it and now if we run this one run is configured run test we're still getting that error but I think this error actually is because it's not able to show us a video here so when I saw this error before I thought it was related to the fact that we were trying to put a gif inside of this attachment field which isn't really true it was giving us this error because it can't show the image or video on this record updated screen it still made me think and figure out that gif issue so it's good that we ran into it so that we could add this section here but if we jump back to our data here we're now going to see that we have a video there and now we can jump back to our automations and we can turn this on and then we can rename the automation to new haen video and now that that's on we're good to go we can come back to our demo here and save it and let's see what we got back from slack great news the content from C4 has been successfully converted into a haen video with this text there so now we have our text to video tool up and working all right so let's continue on the next thing that we're going to do is we're going to add in the ability to publish content for this one we're just going to go ahead and Show an example where we publish text content to to Twitter nice and simple I'm going to come back over to our workflow over here I'm going to go ahead and hit shift that allows me to select multiple modules and then I can go ahead and push them over a bit to make a little bit more room now I'm going to go ahead and add another tool we're going to add an HTT request tool I'll go ahead and come up here to the name and just change this now to publish content go ahead and click rename and now what we're going to do is we're going to create a small workflow which will accept this HTTP request that we're about to send it will accept that request and then make a post to Twitter now the reason why I need to do this is because these tools are a little bit different than these other modules here and they don't have a tool to send to Twitter so I need to use the HTTP request tool to a very simple workflow that will post a tweet to Twitter so I'm going to come over here and I'm going to add another workflow to my personal I'm going to go ahead and right click and open in a new tab this is going to be very very simple here we're going to add a new module let's add add a trigger let's go ahead and search here for a web hook We'll add that here it's going to give us two URLs a test and a production we don't need any authentication we can leave everything as is then we're going to add another module going to type Twitter X formally known and we will create a tweet you will need to add your own credentials I've already got mine here when you go to create your credentials you can go ahead and use their docs right here it'll tell you step by step how to set everything up I'm going to go ahead and use the credentials that I've already set up resource tweet operation create and now here what we want to pass in is the text that we get from the web hook so I'm going to actually go over to a platform called Postman you can actually just go to post man.com I'm already logged in so you'll most likely see something that looks more like this if you don't already have it go ahead and sign up for free you'll see something like this you may need to create your first workspace if you come up to workspace you can create a new workspace I'm going to use an existing one that I have and all I'm doing here is that I need to call this web hook here that we created so I'm going to come into this web hook and I'm going to grab this test URL I'm going to come back over here to postman I'm in my SGP Labs workspace I'm going to go ahead and create a new API call I'm going to change this to post and then I'm going to drop in that URL here now I need to go back to my web hook and change this to a post as well because we are going to send it data then I'm going to just jump down here to the body and from none I'm going to change it to raw and then you just need to copy in what I put here here so I'm going to put curly brace enter open quote text close quote colon test and now I should be able to come back to my new workflow listen for a test event looks like I've got an outstanding issue that I need to fix I'm going to come back out here it looks like it's just wanting me to put in something here in this text in order to even test the workflow so I'll put something in there I'll save it test the workflow come back to postman now I'm going to make a post to this URL remember this is the URL that was in this web hook right here you can't see it cuz it's waiting it's also right here you can copy it and that's what I have right here and we're just sending it this test payload here so let's send it we got it and now we have the text here so now what we can do is we can just come back to our X module here and now we can map in what we sent it right here so I'm going to erase this I'm going to grab this text I'm going to drag it in that's good so I can actually test this as well and it's giving us this message you can't create a tweet with duplicate content so it looks like I've done that test before so let's come back open up the web hook listen for a test event come back to postman I'm going to update this to a new tweet that has never been used before wasn't listening anymore so let's go ahead and send the test now we've got a new Tweet now if I come back to X and we pass the new test there we go come back to Twitter refresh and there's a new tweet that has never been used before I'm going to remove this other test here looks like people are commenting on my tests so now we can come back to our workflow here we can exit out and now what we want to do is save it and now we're going to turn it on so now it's live and it's going to respond without even having this text workflow but the only thing is we need to come into this web hook here and now instead of this test URL we need to grab this production URL so I'm going to grab that click here copy it into my clipboard we'll head back to our automation go to publish content we're going to change the method here to post we're going to put in our new URL we don't need to send a query parameter or headers but we do need to send a body for the specific body we're going to change this to a Json now for our text here we need to add a placeholder now this placeholder when you're using HTTP calls is a little bit different notice it's just this placeholder here so we're just going to grab that copy it put that in here going to rename the placeholder to text and again so if we look at our air table database we have the text here so we're going to pass in that text and remember the system prompt is what helps us set this all up so here's the publish content system prompt the purpose is to publish content from our error table database we're going to activate this by the keyword publish content and again here we must first retrieve the record ID and text columns from the get text tool by looking up the CID so it's going to grab that text for us and it's going to replace that here for us so now what we should be able to do is go ahead and save I'm going to come to our database I'm going to update this text now I'm going to name it something else that just hasn't been done before and now I'm going to come back to our agent we saved it I'm going to test it so now what I'm going to do is I'm going to come to slack I'm going to say publish content C4 run that jump back to our agent it's processing that it's getting the content now it's passing it to the publish content tool so let's take a look at the published content looks like it started the workflow so this workflow called this workflow and we can come here we can look at the execution looks like one just came through and we can look at that open it up and it looks like we sent another tweet come back to Twitter refresh another tweet so that is successful so we're doing good I'm going to save it again and now we can move on all right so if you're here with me great job you're doing really well now let's go ahead and move on to the knowledge base let's create the automations that we need so that we can look into our database of content just like we have here in this case we only have one row in our database let's build out the system so that we we can search that knowledge base and then write new content from it and add it back into the database now before we can search we do need to add more content to our database this isn't going to be a great demonstration if all we have to write content from is this one row so I already have a database myself that has all of the transcripts from all of my YouTube videos if you don't have this you'll want to pull something you'll want to add a few more rows here with some additional content that you've already created or create some sort of sample or have chat GPT generate some sample content for you whatever you need to test this out I'm going to go ahead and import titles and text from all my YouTube videos so I'm going to come up here to content I'm going to import from a CSV I have a local file here if you've never used this import it's pretty cool it's going to import all of this I'm going to come down here to other settings I'm going to exclude the first row which is just the headers so we don't really want to import the headers and you can leave that on that's okay and then for map Fields you want to make sure the data is matched up so that your title is going to the title air table and here I've got this CSV and it's trying to map in the thumbnail to text so I'm going to change the CSV to transcription text and if I were to look at this CSV real quick we can see we just have a few different fields along the top and it's this uh transcription text column that I'm using to map into air table so we've got the title into the title and then transcription text from the CSV into the title column and then once you have that we can go ahead and import the data and now we've got all these new rows titles and text that we can use to populate and create new content from now in order to actually index all this content and use it correctly we do need to add a pine cone database which is a vector store database it's really good at indexing text content like this and allowing you to build queries so that you can search this context for Relevant content that you need for whatever you want to use it for so if we wanted to create a video that was about how to make great videos well we wouldn't want to look at all of the content we would only want to reference the content that was related to creating good videos and how to write good scripts and stuff like that and so it turns out that air table is not great for doing that if we were to search this air table database and try to find that relevant content it wouldn't do the greatest job we could get it to work but it wouldn't return the quality inputs that we want in order to create really great content so you will need to go to Pine cone. you can sign up you can use a free account once you log in you want to create an index we'll go ahead and call this the kedb solo demo for the configuration you want to use text embedding three small then you can go ahead and scroll down and pretty much take everything else as is you can go ahead and create the index and of course there won't be any records yet now I'm going to come back to the Automation and so what we're going to do now is we're going to build out this other little workflow that is really independent from this we're going to build out this other workflow that is going to go into air table and download all of these different rows and then actually index it and insert it into pine cone so that then we can build out this part of the automation which is our tool to access our knowledge base and grab the content that we need so we're just going to build this out right here it's quite easy just go ahead and add another module you can type air table we're going to go ahead and just search for records you're going to want to add in your credentials from the base we'll type solo we'll use kedb solo prototype YouTube demo and then we'll go to table we'll select content for filter we're going to go ahead and leave this blank and return all now down the line you'll want to set this up so that it only adds content when new rows are added but for now just to get going let's populate our database from all the records here so that we can go ahead and start accessing the data so here if I go ahead and click test setup it should return 117 rows which is how many rows we have here in air table let's go ahead and move this down here into some other region down here just going to to move this so it's a bit more centered now we're going to go ahead and add in one type Vector so we can access the pine cone Vector database and we're going to add documents to a vector store here you'll need to create credentials and a connection to your pine cone database the operation mode is insert documents for the pine con index go ahead and search from a list now we're going to pick the index that we just created earlier kedb solo demo and then we're good to go now we need to configure these parts of the system as well for embeddings you can go ahead and connect up your open AI account and on that note I used Cloud here for this model for the AI agent you could also use open AI for that as well so again for the embeddings I'll go ahead and add that again you'll need to create credentials and add that here for your open AI account and for model you're going to pick text embedding three small which was the same setting that we used when we created this index database to begin with now we need to configure this here for the document we're going to go ahead and use a default document loader for the mode I'm going to go ahead and say load specific data here I'm going to update this to an expression two open curly braces dollar sign Json SL text and so what we're doing here is we're bringing in the text from this column here into our database then I'm also going to add in metadata ID for Value again I'm going to go to expression two open curly braces dollar sign Json slid so we can map in the record ID as metadata you never know what you might need We'll add it another property in this case we'll get the title title value again we'll go with expression two open curly braces dollar sign Json slash title that should be all you need there and it'll show an error until you add a text splitter so we'll add a character text splitter for chunk size I'm going to go with 5,000 this is how many characters can be in each chunk and what we're doing here is that when you have text that is really long may or may not be this specific video but when you have really long text you can't insert the entire p piece into one record you have to split it up and that's what this allows us to do very easily so we're making the chunk size 5,000 characters we're also going to have each chunk overlap a bit I must say 8 and8 makes this super easy to do the chunking it's quite difficult in other platforms and now again we're going to run this one time just to fill up our database down the line you can set up a very similar automation to this that will trigger on new records and it will only add new rows instead of adding every single row you don't really want to add every single row to the database over and over again but we do need to Prime the database and so this automation will one show you how to do it and it will also give you the framework to set up an automation that will allow you to execute something like this except only on new or updated records so now what you do here is you go ahead and run this module it should find 117 records and once you see that then you can go ahead and just come to this module and you can run it and it's going to take those 117 records it's going to load up all the data from our error table database and it's also going to split up the text as needed and it will take a little bit of time time so we'll go ahead and run this and you'll see this go and you can see it's at 4 and it's going to go all the way to 117 so I'll go ahead and let this finish processing you can actually come over to your pine cone database and you can see that it's starting to add in new rows you can actually take a look at them and you can see we've got these embeddings here that were created by open AI embeddings module and we've got the text looks like it's been chunked from another row we've got the ID we've got the title of the original video so it looks like it's going well we're at 42 now we need to get to 117 I'll just let this run and come back when that's completed all right so now we're done loading up our pine cone database with our information from Air table so now we can build out the tool to actually get the knowledge from the database create new content and then add it back to air table so I'm going to come up here I'm going to add a new tool I'm going to go ahead and type vector and then we can grab this tool here I'm going to go ahead and rename this now to get knowledge we'll go ahead and click rename we'll go ahead and give it a name content knowledge database after filling out the name you can put in a description and here you can control the number of records that it pulls back when you do a query so how many of these records should it pull back if it's able to find content that's relevant to the new type of content that you're trying to create I'll go ahead and just put this at 10 then I'll just rearrange this a bit might have to start rearranging things here a bit more move this over to the right now we need to finish the configuration for the vector store we're going to add our pine cone database that's what what we were building here you can leave the operation mode as is for the pine cone index again you're going to want to pick your new database that should be good to go this got added way over here I'm going to pull this back now we need to add the embeddings the same way we did over here I'm going to go ahead and use the open AI embeddings module again you can use your credentials and for the model we'll use text embedding three small and we don't need to worry about any options and then the last thing that we need to do here is add a model we'll go ahead and use open AI you can try chat GPT 40 mini I have better results with C GPT 40 but there isn't a right answer for every situation so in general I like to use 40 until I figure out I can use something that's a little bit cheaper that's all you need for that and then once you have these you should be good to go so now what we need to do is review the system prompt for how this actually works so I'm going to scroll up here to the text document this is the new operation that we're adding here generate or create content the purpose here is to retrieve Knowledge from the pine cone Vector database and generate content based on the results so this is how we use it when a user requests new content to be generated we always use the git knowledge tool to search for Relevant content in Pine Cone before generating any new content so what we're saying is just make sure to use this get knowledge tool before you do anything else if relevant information is found incorporate that into the generated content if no relevant information is found inform the user and ask whether to proceed without it and then we tell the system to automatically add the new content with the add content tool and return the new CID so again again I've already pre-loaded this into my AI agent here if you haven't you'll want to add that in now we'll go ahead and save everything and we'll go ahead and test the workflow let's head back to slack we haven't been here in a while and now we can say generate content related to the wow statement for creating videos and a strong script we'll go ahead and run that jump back to our agent processing our request it's going to the knowledge base to pull up the Rel articles it's going to write that article it's writing that article now it should add it to the database it added it to the database and now it's going to do a final response back to slack jump back to slack it created the new pieces of content and it added it to the database so if we come back to air table we'll see C4 because we're not sorting it so I'm going to sort this by Cid in reverse order so now we have c121 unlock the secret of captivating videos using the wow statement so again this is all content that was generated from content that I loaded into air table and then primed into our Vector database here and of course if I was in slack I could say get content c121 come back to our agent processing that request it's going to get that content now it's processing it and it'll send that data back to me in slack as well just as a reminder that we can do that so that here we can see the exact content that was in the database all right so now we've built out the the majority of the system that I showed you now the last piece that we need to add is this special case here where we are just allowing ourselves to go into slack where we can come back into slack and we can put in audio notes where we're talking about a potential idea for content and we can just drop that here into slack using the microphone directly and then we'll process that audio transcribe it and then add it as a Content row here all right so we're in the final stretch let's go ahead and add in the automation that allows us to put in audio notes into slack and automatically transcribe and add those into our a table database the automation is pretty simple it looks just like this now first we need to add this little switch so we can control whether the automation should go down this path or this path here so I'm going to come here I'm going to add some length here and then I'm going to add a new module here and then we're going to search for a switch and now what this allows us to do is to go down different paths depending on what the value is here in slack for this first value the value that we need does not exist yet so I'm simply going to take one of these values and drag it over here and I happen to grab the TS so we have the TS and I'm going to change the TS to files and more than likely it's going to turn red because this value has never shown up before in our trigger and so it's telling us that but what we need to do here is we need to say hey if this files does not exist and remember this is an array so we're going to go to array and we're going to say does not exist so when we get a trigger from slack it's going to look and say is that files array does it exist or not if it does not exist we're going to continue down this path so now I need to connect it here we've got the switch it's going to continue down this path if there are no files and when you upload audio through the microphone here it will add these files to that array here right so now we come back into the switch we're going to add a routing rule we'll change this new route to expression and we'll just copy what we had here into this section here so this first route is making sure that files does not exist and the second route is is making sure that the files do exist so we're going to come to array exists if we test the step it's going to go down the first path output one now on this path when files do exist we need to get the file so I'm going to come here I'm going to add a new module slack and we're going to go to file actions get file you're going to add your slack credentials here I'm going to use the credentials that I've been using throughout this demo and then for the file ID I'm going to turn it into an expression again and I'm going to add this text in to open curly braces sign json. files Open Bracket 0 close bracket. ID so what this is doing is it's grabbing the ID of the file that I uploaded so this is a good place to stop I'm going to come here and save and test I'm going to come back to slack going to go to the content engine where I built out this new demo again we're here in the solo and now here to demonstrate this instead of recording an audio here I'm simply going to paste in an audio MP3 and send that across and now you can see that this was triggered and now it went down this path because we do have files and it looks like we were successfully able to get that file so now just to save on space I'm going to move this down so now this got the information of the file now I need to actually download it so I'm going to add another module we're going to use an HTTP request this is going to be a git request the URL is going to be the URL private download make sure you use that one and not the URL private you need the URL private download for authentication we are going to use generic credential type generic off type we're going to go ahead and use header off I'm going to go ahead and create new credentials to this slack account I'm going to scroll down and create new credentials now for name you're going to type authorization and for Value because you can't see it I'm going to come into the notes here you want to type Bearer just like that with a space and then you need to get your API key from slack so we're just going to jump back to our slack I'm in my kedb solo I'm going to jump over to the oo I'm going to grab this key here copy just into my notes and then what you want to do is copy this whole thing into this value here and I did it like that because as soon as I post it I can't see it now if you did want to just type Bearer and you can't see it and then you put a space and then put the key that's fine but it's a little bit harder to see so I'm going to do it this way I'll save it now if there are issues it's probably related to that header off now I'm going to add headers go ahead and use Fields below I'll type accept and then for Value you can go ahead and use application/octet-stream you want to make sure you copy this exactly as I have it I'm actually going to use a lowercase a I don't think that really matters but that's what I had before so I'm just going to stick with it and then in the options here we're going to add a response and for response format we're going to go with file and we're going to name that output as data because it's a file and it's data so that makes a lot of sense so we should be able to test it and you can see here that we have data audio MP3 file extension. MP3 so this worked just fine if you see something else instead of an MP3 and it says HTML then you know you did something wrong you'll need to correct your authentication or your url something in these settings is not correct next up now we need to use open AI transcribe a recording should already have your credentials you can go ahead and add those resource audio operation transcribe a recording and for the input data field name you just type data because that's what we called it in the previous step data now you should be able to test this step so now we have the transcription now we just need to add it to air table we'll create a record you can use the same credentials that we've been using for base again we'll type solo for the table we'll use content for mapping column mode we'll leave this as is we'll leave the title and we can just take this and drag it into the text we can go ahead and test that step can jump over to air table we see that new piece of content that came in from the audio notes and then finally I just want to send s a message back to slack that it was successful slack send a message use your slack credentials resource message operation send to channel and then we need that channel ID again again we'll come here click into this area copy the channel we'll change the channel to ID drop that in here message type simple message message text we'll just say successfully added audio notes to air table as and then we'll change this to expression and then we want to drag in the CID we'll move it to the schema then we can actually access the CID and just drag it right here and now we can test it come back to slack so it didn't come back so that likely means that I'm using the wrong slack credentials there we go moved it to slack three and before I move on I actually realized I need to add the reply to options so I'm going to come to options add option reply to message and for the Tim stamp again I'm going to come over here to the slack trigger I'm going to collapse the files cuz it's not there it's right here so we need to reply to that timestamp reply to thread we'll go ahead and test successfully added audio notes to air table as c122 which was this what we got right here now if you want access to this automation template so that you can simply import it into NN just like this along with the a table database template and the system prompt for controlling your AI agent make sure to jump into the no code Architects Community you can get access to the templates that you saw today plus a whole lot more there's a full business Clarity course for launching your AI automation business and a bunch more plus we have calls almost every single day I hope to see you there either way I hope you enjoyed this video and I'll see you on the next one