what if you had an AI agent that not only writes LinkedIn posts for you but checks beforehand what people are actually searching for this is what we're building today this AI agent goes to Google types in this topic you want to write about get additional keywords like these also suggested by Google which are an indicator of topics and keywords people are actually searching for then send it to the llm so the llm writes for each of them and social media post and says it automatically in Google sheet sheets so let me show you how to
build this step by step first we need a chat input on chat message great next we need a HTTP request note that actually goes to Google takes our input or our keyword and searches for on Google get the HTTP request Noe then paste this URL in open the chat to test it again type AI agents great we have an error no open the HTTP request node again now we can add as a variable our chat input so the HTTP request can dynamically search for whatever we typed in in chat input Noe great now let's test
the step see we get a bunch of autocomplete suggestions from Google based on the search term AI agents awesome next we have to do some cleaning as you can see there's a lot of stuff around our actual keywords for that we need another note get the XML note so we pass in the data and want to turn the XML to Json test the step and it looks already cleaner as Jason format great next we need another note find the split note and drag in top level complete suggestions so now we separated and it's even cleaner
next we need the edit field note select the edit field node in here leave it as is as manual mapping name this keywords change the string to an array and as the value drag in the data great to get the actual data we have to add an additional option ignore type conversion arrows select ignore and test the step great now we have the cleaned Autos suggested keywords from Google that people are actually interested in those topic additionally to our main keyword AI agents the next note is the aggregate note and let's the input field name
drag in our keywords and then test the step it works great now we have an issue we just can't feed these keywords as is to our llm we need to Loop through them so for that get the loop note Loop over perfect batch size one it's okay remove this one great now we we need our open AI note go to open AI note select messenger model let's rename this first Linked In Post J generator rename select the model for om mini then change this to expression and paste in our prompt so for each keyword create
a LinkedIn post no Emojis right in a natural tone great now we have to paste those emojis uh sorry our keywords to The Prompt so the llm creates for each of them a social media post simplify out output leave as this and output content as Json great next to avoid arrows let's add a weight note to it wait let's change this to let's say 2 seconds should be enough and from here we loop back so D L Note writes the post for each keyword instead of just for the first one that appears now if you
test this it takes a couple of seconds great and now let's check the output great after it wrote all the LinkedIn posts for each keyword we have to now split it get another split [Music] note drag in our po posts test this and it splits out our splits out each LinkedIn post great now we can actually save those LinkedIn posts in our Google Sheets file for that get your sheets note append row and sheets then select by URL go to your your Google Sheets file here you have to have the two columns already created we
are going to use then copy your url go back to NN and paste in the URL in next select the sheet and in here for keywords we want to pass in the actual keyword and for the posts uh the post that need to be appended great now let's test the step and head over to your Google Sheets to check and there you have it for each keyword that was suggested by Google because these are keywords that people are actually looking for on Google we create it automatically for each of them an relevant LinkedIn post that
you can use whenever you want to post them on LinkedIn now let's test the holds whole thing again open chat again I type ai ai agents start the chat close the chat window and let's see how it Loops through each keyword and saves it successfully in our Google Sheets file great let me check the Google Sheets file and there you have it all the keywords that we gathered from Google search which were Auto suggest to us and all the relevant post that aners questions that people are actually searching for on Google the beauty of this
is this is obviously a super simple AI agent you could go deeper into the prompt engineering add a rack system to it so it has also your knowledge space to it so it's basically a virtual clone of you and your knowledge to create even better post this is just an simple example to Showcase you another example how you can use a a agents in your daily life to make your life and your business easier that's it for today wish you Merry Christmas and AI agent out