I Built a Human In The Loop Sales Team That Waits for Feedback and Approval in n8n

32.57k views4752 WordsCopy TextShare
Nate Herk | AI Automation
📌 Join my free Skool community for the workflows shown in my videos! 👇 https://www.skool.com/ai-au...
Video Transcript:
today I'm going to be breaking down this awesome team of sales agents that uses humanin thee Loop functionality for feedback and approval so every time a lead form is submitted and captured an air table it's going to send that to this sales agent that's going to write an email and then send it off to us the human not only just for approval but also for feedback if the email gets approved it's going to be sent off to that lead but if it's not it's going to get sent to the revision agent so the revision agent is then going to take the email that the sales agent made it's going to take the feedback from the human and it's going to revise that email and create a new one then as you can see it Loops right back to the human for another round of feedback and approval so this system is really cool because it's going to allow you to make unlimited revisions until you're happy with the output and then when you're finally good to go you can tell the agent to send it off and it will do that for you so let's show off a quick demo then I'm going to show you guys how you can download this workflow for free and then we'll get in there and break down every single node that you see right here so on the left screen we've got my email as you can see I've been doing a lot of testing and on the right we have the sales agent team so let's hit test workflow and we can see that it's going to be pulling in a form response from Air table the sales agent is now pulling in data from our project database to craft that email that it's going to send off to us for approval and feedback of course right now it's writing the agent and we're using Cloud 3. 5 sonnet to write the the email just because I really like the way that that comes back and now you can see that we're waiting for feedback so if I refresh my email right here we have a new email this one says approval required for a new lead Robert California let's take a look at what we've got here Robert California from saber is looking for custom AI solution their budget is $10,000 to $155,000 with an immediate timeline of 1 to 2 weeks please approve or decline the sending of this message generated by Jim our AI sales agent so here's the subject and then here's the email dear Robert thank you for reaching out to Dunder AI regarding your custom AI powered customer support and sales optimization system I'm excited to discuss how we can meet saber specific needs and exceed your expectations your project aligns perfectly with our expertise we recently completed a similar solution for a high-end Electronics e-commerce client that addresses many of your requirements so this is the element of the sales agent looking at its project database to pull back hey here's what we did for a previous client and this is just going to make the lead feel really safe in knowing that we can deliver the solution anyways it lists out the seven features that we were able to provide for this client and then it says the results were impressive 23% reduction in response time 142% increase in sales conversion and significantly enhanced customer satisfaction we're confident we can deliver a tailored solution for saber within your budget and desired timeline our team is prepared to start immediately and can have a fully operational system deployed within 3 months meeting your scalability security and brand customization requirements and then the call to action at the end I'd love to schedule a call to discuss your project in more detail demonstrate our capabilities and explore how we can create a solution that drives substantial value for saber when would be a convenient time for you this week best regards jym Dunder AI so now what we're going to do is click on respond and it's going to open up this tab where we can actually give feedback so what I'm saying in the feedback is make it more concise because this email is pretty wordy and then I said also don't mention 23% in reduction time right up here and propose that we meet on Thursday so I'm going to hit submit and then we're going to see the workflow start up again so hit submit now the agents got that that feedback it's sending it to the revision agent and it's taking that original email that was created by the sales agent and revising it based on our feedback as you can see we now have um more feedback to give because it's waiting on our approval again so back in Gmail I'm going to go back to my main inbox hit refresh we can see we have another action approval required and same exact thing as far as the initial email but now we have a new email as you can see it's much shorter so dear Robert thank you for your interest in dunders Dunder AI custom a powered blah blah blah here are the features that we delivered for a previous client that had similar requirements um the results were impressive with significant increases in sales conversion and customer satisfaction so it got rid of the um decreases in response time we're confident we can deliver a tailored solution I'd like to schedule a call this Thursday to discuss your project in detail so as you can see we gave it three pieces of feedback which were make it more concise um don't mention the 23% reduction in time and then also let's meet on Thursday so this looks good to go we'll hit respond we'll say send it off um let's spell send correctly and then we'll submit that and then we'll watch this go up into the approved branch and now that email got sent off so let's go check on that real quick so here's that email that got sent off to Robert California Dunder AI custom AI solution for Sabers customer support and sales optimization this is the one that we just read through and approved as you can see meeting on Thursday doesn't mention 23% reduction and it signs off best regards Jim Dunder AI this is a super cool build I hope you guys can see the value in the fact that we're not only approving or denying but we're saying hey let's give the agent more feedback and and tell it how to make the email better and better until we're happy with with it so let's break down this workflow so before we start breaking this down I wanted to mention that you can download this workflow for free and plug it straight into your NN environment you go to my free school Community the link for that's down in the description click on YouTube resources click on the post associated with this video and you'll have the Json right there to download Once that's downloaded come into nadn open up a new workflow and then click import from file in the top right and if you're looking to take your skills with nadn and a automation a little bit farther and you're looking for more Hands-On approach check out my paid Community the link for that's also in the description we have a great community of people always asking questions and sharing resources about nadn looking at different nadn projects and then we have five live calls per week and all of those get recorded in here in case you can't make them we've got a great classroom section with deep di topics like building agents Vector databases doing one right now about HTTP requests and apis like I said five live calls per week tech support Q&A networking to make sure you don't get stuck we also have three guest speakers coming in the month of February and more in the month of March so would love to see you guys in this community anyways let's break down what's going on in this workflow from the beginning which is the trigger to the end result which is sending off an email to that new lead so first what we should do is look into our air table base as you can see right here this is our leads table so this is the one that we're watching as the trigger so every single time a new lead gets put into this form we will basically send off the process of sending them an initial sales email this has information obviously like their email their company what their intent is their budget their project description and then their timeline then we have our projects table in this case I just threw in three for example to make sure that the agent could pick the one that's the most relevant in this example it picked the this one which is the most relevant to what Robert California's lead submitted but as you can see it looked through this information it talked about how what we developed for this client and then at the end the result which was reducing response time and increasing sales conversions so that's the project database tool that the agent has this is the trigger that the agent gets to kick off this whole project and then the only other thing connected to this agent is obviously it's Claude 3. 5 chat model which we're using because um I really like the way that Claude writes emails generates content and then we also have the structured output parser so let me dive into why doing this so the goal of this agent obviously is to just write an email take incoming information scrape the project database and then write an email so what we want to do with this output parser is we want to Define let me just change this up here we want to Define what it's actually going to Output so typically when you're working with an AI agent it just outputs everything in a field called output as you can see output but what we're doing here is we want to create two different basically Json parameters for the agent output which is one for subject and one for email like you can see it did right here so we do this by connecting a structured output parser and we're telling it here's the Json you should be outputting the first thing is a subject and we describe that that's the subject line of the email the second thing is an email which is the body content of the email and both of these data types coming through are going to be strings which just basically means words and so how you actually do that is within the sales agent configuration you have to flip this switch on which says require specific output format and then that will allow you to connect a different type of output parser and so the value here is later when we're trying to access the email or the subject we can just drag and drop in just the subject rather than the agent outputting all of that lumped into one body but now within the agent we have a user message to configure as well as a system message to configure so first let's take a look at what we're doing in the user message all we're saying is here's an incoming lead and this is going to change every time a new form is submitted of course because we're using variables here it's an expression field and then as you can see on the right this is what's actually being fed into the agent so we gave it its name it's email intent budget company name product description and timeline this is how it's able to write a really really um personalized Outreach message to this new lead now taking a look at the system message so I kept this really concise but really clear the overview is that you're an expert salesperson for an agency that delivers AI Solutions your job is to respond to incoming leads by addressing their needs in a professional manner you will receive information like the leads project description and timeline and your goal is to convince them that we are the best AI Agency on the market you've only got access to one tool which is the project database and you're going to use this to search through previous projects we've done then I gave it three rules the first one is that you're going to receive information about a lead and you need to craft a professional email keep it concise nobody wants to read a huge email second one is your main objective is to convince the lead to book in a second call your job is to make them believe that we can deliver the project they have described and exceed their expectations then finally the third rule is to retrieve information about previous projects to share with the lead to prove that our team is capable of handling the project find a similar project we have done to share with the lead and then share the results of how we helped that client and then the final notes are to sign off emails as Jim from Dunder Ai and then I gave it the current date and time in case it needs to reference that so that's pretty much all that's going on within the sales agent it created a subject and an email and now what we're doing is we're feeding in just the email into a set node and this is a little bit more complex so let me try to break down what is going on here so in NN when you're referencing variables how it works is if you reference json.
something it's going to be looking for the node that's previous so in this get feedback node if we say json. something it's going to be looking in the set node if you want to reference a node that's further back then you would say sales agent do something. something so let me show you an example in this get feedback node we're giving the subject and we're doing that by saying look at the node sales agent and then we can find the Json subject but the email we're looking for is going to be coming from the node completely right before this so json.
email and that's why we set an email in the previous node this set basically ensures that every time a revision has come through that the new email is going to be sent for feedback and that the new email will either be sent off to the lead or be sent off to the revision agent to revise on that version too if we didn't have this set then every time we wanted to make a revision it would just be looking at the original email that was created so that's just not very efficient because then our revisions can't stack on top of each other so for instance if we took the first email and said please make it shorter and it made it shorter and then we wanted to revise by taking something else out it wouldn't be looking at the shortened email to revise it would be looking back at that first email so if we want to make unlimited revisions we have to set this here so that we can can continue to feed in the most recent version either to the send email tool or to the revision agent every single time so I hope that makes sense I don't want to spend too much time here if you're struggling to understand something like this set the loop or the structured output parser then the paid Community is definitely what you're looking for where you can get get your questions answered and we will dive deeper into all of these builds anyways from there we move into the get feedback node which is basically just saying it's an operation in Gmail where we're sending but we're not just sending we're waiting for a response and I just wanted to throw out there this operation is not just in Gmail they have it in telegram slack Discord Outlook um you'll be able to get in there and just when you're looking for an operation look for set send and wait for response so you can play around with some other stuff now what we need to do is we need to configure the two the subject of the message so for the two I'm keeping this fixed just sending it to my email um and for the subject what we did was set up approval required in all caps so we can give approval right away um and then we put in the new lead which is coming from the air table trigger node so as you can see we're not referencing dollar sign Json dot we're referencing the air table trigger node and then this comes through on the right as Robert California and then we set up the message so in here it looks a little more intimidating but all we're doing is referencing a bunch of stuff to make kind of a sentence Robert California from saber is looking for custom a solution their budget is 10 to 15K with an immediate timeline please approve or decline the message blah blah blah and then we list out the subject and the email as you can see on the right this is how it's coming through so now going back to why we need to set the email previously looking at run number one of this node where we reference json. email we're getting that first original email from the sales agent because it's the long one now if we switch this to run number two and we come in here json. email is now the shortened version of the email then the final configuration down here is what type of response we're looking to get back from this node we can do approval which is just going to be looking for either one button that says approve we can change it to approve or disapprove you can set up that I thought it would be much cooler to set up a free text where rather than just saying yes or no we can actually give feedback to the agent to make the sales team really really smart for like I mentioned earlier limited revisions that take human feedback and then put that into the prompts of the agent and then down at the bottom your last options are just configuring the form title description you can set the wait time on how long this node will actually wait before it just stops the process stuff like that okay cool so then we move into a text classifier AI node in this node I'm using Gemini flash 2.
0 just because it's free flash 2. 0 is pretty solid and all it's doing here is it's just deciding based on the feedback If the message was approved or declined so we don't need to use a power more of a powerful model like 40 or Claude 3. 5 Sonet here we can get the job done really quick and easy with uh Gemini 2.
5 flash so anyways first thing we are saying what text do we actually need to classify this is json. data. text which is coming from that get feedback node which is just pulling in the response that we sent in Gmail or sorry the feedback we sent and then all we do is we set up two categories so we have approved which we Define here as the email has been reviewed and accepted as is the human explicitly or implicitly expresses approval indicating that no changes are needed and then we gave it some example phrases of what an approval message might look like and then we did the same thing for declined except for obviously changed up the description the email has been reviewed but the human requests modifications before it's sent like tweaks removing Parts rewarding Etc and then once again gave it some example phrases so on the right we can see for the first run where we said make it more concise also don't mention 23% reduction and proposed that we meet on Thursday it put this out in the decline Branch but then on the second run where we said send it off approve that message and because it got approved it went down this path which leads into the send email tool rather than going down the decline path that gets sent to the revision agent okay let's break down what's going on within the revision agent the first thing is we're using the exact same structured output parser because we're feeding it into the exact same nodes essentially so we don't want to change the weight it's output we still want to get a subject and an email in two different parameters so we're able to just connect them up to the same one you don't have to you could just copy and paste one from over here the only reason I do this is because I don't want one to say structured output parser and one to say structured output parser one so I just like to connect them together same thing with the chat model I just connected them the same one you don't have to anyways let's click into this revision agent and see what's going on um the data isn't going to be there because it's kind of weird with feeding in two items but let's just take a look regardless of what we're seeing so all we're feeding in for the user message is the email which we're grabbing from the set email node so the set email that we set right um here before the get feedback that's what we're looking for for the email because if we were looking for this for the email like I said if we revised it it would not be grabbing the most recent version so by setting an email here we're always passing through the most recent version to both of these two tools so anyways in here we gave it the um actual email to revise and then we gave it the feedback from the human this is coming from the um get feedback note of course and then in the system message what we said was you're an expert email writer your job is to take an incoming email and revise it based on the feedback that human submitted and um same rules as the first agent sign off his gym and here's the date and time so that's how that agent works and now let's say it revises it again it comes through it needs to make another revision it'll rise it again comes through and then let's say the human finally says okay it's good goes up through the approved branch and what we see here is the two we're going to be selecting this from the air table trigger so that every time a lead comes in we're going to send it to that actual lead then we're choosing the subject which we're able to grab from the sales agent because this isn't really getting revised this isn't going to change change you could work the logic in to change the the subject as well but we didn't in this example and then finally we're actually grabbing the email which once again we're grabbing this from the set email node that we created which makes sure that this is always going to be the most upto-date version of the email so that's basically what's going on in this flow what I want to do now is Show an example where we make like three or four revisions so you can see that it's going to come through every single time and you can basically do that until you're happy with the output all right so we're going to show another example here I'm going to hit hit test up and we're just going to be doing the same um form so it's going to be Robert California once again so the email may look a little similar but we're going to show doing you know maybe three or four revisions rather than just one so the agent right now has scraped the database and it's creating that email we just saw that it hit the get feedback node and it's waiting for us we'll refresh the Gmail and here is the form so as you can see it's very similar it has um you know here's how we did something for a different client that was similar here's what we did here's the result here's the call to action so let's respond and for this first feedback let's just say make it shorter because we want to be able to iterate over this so now we can see it's feeding off to the revision agent creating that email and then that's going to Loop right back into setting that email and then getting more feedback so let's go back into Gmail we have new feedback to give as you can see the email was is much shorter this time let's just tell it to get rid of the number seven bullet point which is Advanced analytics dashboard so get rid of um we'll say bullet point 7 send this off it's going to go to the revision agent once again and now it's going to be using that second version to make revisions on so it should still be a pretty short email as you can see it's waiting for us already um yeah as you can see it's a short email so it was taking version two and no longer has um bullet point number seven so finally let's just tell it to um we're confident we can deliver let's just we'll do the same thing from the previous example we will say um change the call to action to a meeting on Monday at 400 p.
m. so we'll send this one off it's going to go through now it's being revised once again we will close out of this tab and we will wait for that response there we go it's waiting for feedback again we can come in here and as you can see now it says are you available this week Monday at 4 p. m.
Related Videos
I Built the Ultimate Team of AI Agents in n8n With No Code (Free Template)
23:45
I Built the Ultimate Team of AI Agents in ...
Nate Herk | AI Automation
803,298 views
AI AGENTS EMERGENCY DEBATE: These Jobs Won't Exist In 24 Months! We Must Prepare For What's Coming!
2:32:10
AI AGENTS EMERGENCY DEBATE: These Jobs Won...
The Diary Of A CEO
1,415,300 views
HOW TO FIX "Error calling tool 'edit_file'." issue in Cursor Chat
5:03
HOW TO FIX "Error calling tool 'edit_file'...
Alex North Rule
2 views
Store All Data Types with Agentic RAG in n8n
19:16
Store All Data Types with Agentic RAG in n8n
Nate Herk | AI Automation
52,809 views
STOP Using Basic n8n Nodes! These 10 Will Change Everything
26:40
STOP Using Basic n8n Nodes! These 10 Will ...
Simon Scrapes | AI Automation
6,455 views
I Built a 24/7 AI Sales Assistant (Free Download Inside)
20:18
I Built a 24/7 AI Sales Assistant (Free Do...
Nolan Harper | Ai Automation
2,244 views
How Nate Herk's AI Agent Is Revolutionizing Lead Response Times [With Human In The Loop]
29:15
How Nate Herk's AI Agent Is Revolutionizin...
n8n
18,886 views
I Was Prompting AI Agents Wrong... Until I Learned This (Live Prompting Examples)
27:13
I Was Prompting AI Agents Wrong... Until I...
Nate Herk | AI Automation
25,997 views
Master n8n in 2 Hours: Complete Beginner’s Guide for 2025
2:10:36
Master n8n in 2 Hours: Complete Beginner’s...
Jono Catliff
174,676 views
Build a Team of AI Agents Businesses Actually Use (n8n, free templates)
1:06:43
Build a Team of AI Agents Businesses Actua...
Bo Sar
481 views
I Studied 200 Automation Agencies: Here's What Works In 2025
25:26
I Studied 200 Automation Agencies: Here's ...
Nick Saraev
48,664 views
How I'd Teach a 10 Year Old to Build AI Agents (No Code, n8n)
19:27
How I'd Teach a 10 Year Old to Build AI Ag...
Nate Herk | AI Automation
217,761 views
Make Your Agents Communicate Better in n8n (Feedback, Specifying Inputs, Agent Logs)
17:27
Make Your Agents Communicate Better in n8n...
Nate Herk | AI Automation
23,938 views
How To Build a Startup Team of AI Agents (n8n, OpenAI, FeedHive)
24:47
How To Build a Startup Team of AI Agents (...
Simon Høiberg
603,247 views
I Built a Team of Research Agents for Newsletter Automation in n8n (No Code)
23:02
I Built a Team of Research Agents for News...
Nate Herk | AI Automation
33,305 views
n8n Tutorial #7: Create your own Custom Node
24:13
n8n Tutorial #7: Create your own Custom Node
Ben Young AI
18,847 views
How to INSTANTLY Generate N8N Workflows Using Claude
22:50
How to INSTANTLY Generate N8N Workflows Us...
Ethan Nelson
19,141 views
How to Build & Sell AI Agents: Ultimate Beginner’s Guide
3:50:40
How to Build & Sell AI Agents: Ultimate Be...
Liam Ottley
653,028 views
The Only Video You'll Need to Master Make.com & AI Workflows (Beginner to Pro)
3:14:11
The Only Video You'll Need to Master Make....
Ben AI
20,105 views
Sell This Cold Outreach AI Agent For $2,000/mo (N8N)
53:15
Sell This Cold Outreach AI Agent For $2,00...
Yiannis AI
6,248 views
Copyright © 2025. Made with ♥ in London by YTScribe.com