📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

СОЗДАЛ ИИ АГЕНТА, который находит 1000 клиентов за 1 клик [шаблон для N8N]

Макс Нечаев18:45

Transcription

Hello, wonderful people. This is my first video about AI agents, so I hope you will like it. Write in the comments, give likes or dislikes. And let me tell you today about a magnificent one that I literally just made. This AI agent can do some truly wild things from a B2B or B2C perspective and for finding potential clients. Because, for example, I often encounter this when I need to find my potential clients. I know they are clinics in Dubai. And how do I find them? How do I get all the clinics in Dubai? I have the option to sit in Google, sit in Google Maps, sit somewhere else, write it down, and spend hours of time, or pay someone on Upwork or somewhere else to do it for me. So, today I will show you a really fast option how you can do this in 2-3 minutes with the help of a very smart, cool AI agent, which can also be improved in the future. Look, we have Air Table. This is a kind of CRM system. It's a slightly improved Google Sheets or Excel, but which looks much better, right. In it, we have the company name, we have phone numbers, company type, links, description, emails will be there. And this AI agent will do all of this in literally 2 minutes. Maybe in a minute, or maybe even in 20 seconds. Look, I'll show you now how it works. I'll delete all of this now because we don't need it. We will do all of this again from scratch. First, we have a presentation, right? So I will present to you. We click Open Chat. And here we just enter, we can even in Russian, barbershops in Moscow. For example, I want to supply some things to barbershops and I want to collaborate with them, do something. Yes, well, barbershops in Moscow, cool. Everything, we send it. What does our AI agent do? It now gets all the barbershops in Moscow, turns them into an array of data, adds everything to us here. Look, it did all of this automatically, without any help at all. In a matter of seconds. How fast. If you did it manually, you would be shocked to do it. Then it again takes all the data from this Air Table, from our CRM, and does a loop. That is, it goes through each row, through each record. What does it do here? If we have any website, it takes it and does a certain logic. If there is no website, it simply goes and moves to the next item. So, it took the website, it got it, it got the data in a really unreadable format. After that, all of this is transferred to the AI agent. This agent has a specific prompt, it analyzes the data it received, and it must output it in a specific format. It must provide a summary, and it must provide an email. After that, it is recorded in our CRM. That's how it works. I'll pause it so as not to waste tokens on parsing and so on, but I'll just show you here. If there is any email on our website, it puts it. If there is no email, it doesn't put it, obviously. And what do we have in the end? In the end, we have a summary here. The summary is in English because I initially made this AI agent entirely in English, but you can write in Russian in the prompt, and it will give it to you in Russian. That's not a problem at all. It writes here strengths and weaknesses. It writes how we can help. And in general, it gives such a summary, it explains to you, like, dude, look, these are the things, anything at all, because it's an agent, it's smart enough. And here, accordingly, it puts emails if they are found after scraping, on the website. Scraping is, accordingly, the process when we just go and browse the entire website, all the data from the website, all the links, all the labels, all the text, and output it all. And then our AI agent analyzes this data and structures it, and then all of this is put into our CRM system. It might sound complicated. It might be complicated, guys. This is not quite beginner level, meaning not for beginners. I will definitely shoot a video for beginners, but this is a more interesting one, let's say. But it's not entirely difficult either, I'll tell you. What do we use for all of this? What are these arrows, these squares? So, guys, this is N8N. Call it whatever you want. It can be N8N, P8P, or N8N. I'm used to N8N, so I'll probably keep calling it that if I don't upset anyone. Accordingly, this is a very cool thing that allows you to create entire logic chains. That is, go to the refrigerator, look in the refrigerator, if there is milk. If there is no milk, order it from Yandex Lavka and bring me milk. Literally, this is what our AI agent does. A note. And artificial intelligence, an agent is an agent, a certain entity that performs a certain job, right? AI is artificial intelligence, well, that is, artificial intelligence. We use, accordingly, this thing. Next, what do we use? Specifically here, we need to parse, collect all data from Google Maps. For example, if it's barbershops in Moscow, then I need to go to Google Maps, enter Barbershop while being in Moscow, right, and find a huge number, just an endless list of these barbershops. So, literally, this is what we do here. For this, we need a scraper, right, again, or a parser, perhaps parser would be the correct word here. We have parsers. We have APIFY, which provides a lot of cool parsers or scrapers. In this case, Google Maps Scraper, Google Maps extractor. I just typed Google Maps in the search and we can use it. Or we can use the SerpApi service. In this case, in the video, I use it. It just provides a clear, simple API, meaning a request, where to send, what data to get, and that's it. Without any problems and very simply. And it gives some kind of free period. But I could have done something similar on APIFY. Also, we will use Air Table here. I already said what it is. It's just tables. It's just Google Sheets, Google tables, if you want. The last thing we will use here is a thing that completely scrapes websites. This is Firecrawl. Also a cool thing. It also gives you, uh, a certain free period, a number of sites from which you can collect, get information, scrape. I find the word "scrape" easy to understand. Scrape is like scratching. Like this, scratching, bothering, and scraping it. We are literally scraping information from the site. I don't know, it helped me remember for some reason. What does our N8N agent do? Don't worry that there's an error here. I just stopped it while it was working, so it's a bit angry about it. But there's nothing scary about it, guys. This is a template, please take it from the Telegram channel for free. The link is in the description. Go, join, take this template, set it up for yourself, and go with me. Or you can just use it for your business, it's already ready. You just need to connect it and that's it. Also, in my Telegram channel, I plan to create something like a community, to communicate with you, to tell you about some cool new things that appear. Someone will also share cool things there. Well, you know, such a community. In general, I think there isn't anything like this on the Russian market yet. So let's jump in there, let's chat, if you want, of course. Okay, guys, let me show you how all of this works. We start with a trigger. Any automation always starts with a trigger, right? This can be a click, it can be a webhook when you receive a request, it can be a message in a chat. Yes, in this case, it's a regular chat, meaning chat message received. The chat that is built into N8N, meaning it's not Telegram, it's not WhatsApp. You can connect anything, you can connect to the chat of your application or your service. It gives a session ID, action, and chat input. Chat input is in Barbershop in Moscow. That's what we entered. The next level is HTTP request. The most ordinary request that sends us to SerpApi. That is, on this site, you can see signup, sign in. You do Signup, register, get your token. After getting the token, you do authorization and, accordingly, the request. Now I'll show you. And we make this request a POST. We are interested in maps. We do authentication through generic type header auth and accordingly. And accordingly, here when you create it. I created SerpApi GMAPS Scraper. Here, name XAI key, and you paste your API key here. Everything, you click the save button, done. In the header, you need to send content type application JSON. No problems. All of this, in general, is easily done. You just need to send a JSON, and you say that in the header. This is all described in the documentation, if anything, SerpApi, but I understand that many will be too lazy to look there and figure it out, and it's already in English. I will tell you everything in Russian. Send the body. That is, we need to send, so that this scraper, this parser, right, so that it understands where to take what from, for example, clinics in Dubai, barbershops in Moscow. Accordingly, we will send this information in JSON format. You don't need to think much about this format, just select JSON here. And here you have name and value. Name here will be Q. Well, their documentation calls it Q, maybe it's from the word Query or something else. In general, here, just Q name is our key, and our value, we send Barbershop in Moscow. Just drag and drop, take it and drag it here. And we send it. Then we click test prep. And we will see that, for example, everything will be created here. Here is the output we want to see here. After that, we received the output, and we can see here that we have places. Here, right? And in places, it's an array of data, meaning a lot of different data. And specifically in places, right? And that's why we want to turn it into an array now. By the way, Split out will help us. We take Split out, take places, drag it here. And here you go, places. Click test prep. And we get a clean array of data. After that, we launch. Nothing needs to be done here. Batch size one. That is, how many do we process at once, one at a time, that's normal. So that there are no problems, no collisions, no multithreading. Don't think about it at all. Just one at a time and that's it. You select the loop. And inside this loop, we have, accordingly, two outputs: done and loop. The loop goes until we go through all 20 elements in a circle, and done is called when everything is finished. It's simple. And then we connect Air Table. Again, here you will have Air Table connection, it's here. That is, when you click here, you just need to pass the access token, which you create within Airtable upon registration. Any data, guys, I will stop at each connection if necessary, it will take hours for this video, right? Therefore, everything that interests you, everything that is unclear, everything that you would like me to shoot, I will shoot. For me, this is already a long-passed history. I am already like a fish in water here, and I actually enjoy just shooting and telling you. Therefore, just tell me what to shoot, like this comment, and the next video will be about it. Here we have resource record, operation create, and accordingly, we take it from the EIBAS database and from the persons table. What does this mean? This is our EIBAS database, and it has a persons table. Everything is, in general, clear. We have certain fields here. And in each field, well, you need to put, accordingly, here you need to put the name, here the number, here the company type, here the website. Very, very simple. This will already appear here automatically when we select our table. And we just need to put it here. How do we do it? We have this loop over Items. And inside it, we already have everything. Let's close everything unnecessary so as not to distract us. And here we have title, what it's called. We even have the address here. We have the type, we have the phone number. Yes, we have all of this here. Website, by the way, is also somewhere here. Perhaps specifically for this one it's not there, but in general, there's also a website here. Here's what we do. We just take the title and drag it here. That's it. That is, we drag it, and it will write it for each one automatically. That is, there are 20 of them, right, but for each one it will be written separately. That is, it goes through the first one, puff, wrote it, goes through the second one, puff, wrote it. As you saw at the beginning of the video, when it was writing everything one after another, right? After that, when all of this is done, we go to done. Here we have Air Table again. We ask, why? To now simply retrieve all this data from here, right? That is, we are now using it differently. We use search. That is, here, I think, it was create, as far as I remember, right? You see, the operation is create, and here the operation is find. But we don't need to find a specific record in the database. We need to get everything here. Therefore, we take search, select from where, and return all. Return all. And here we get another array, an array of data, right? For those who don't know what an array is, it's just a list of data. A lot of different data. A list, a list. Here. That is, you see, this is a list. Here is one row, two rows, three rows. All of this can be figuratively called an array of data, a list of data. Here, then, we accordingly go through each one. We have batch size 1. What do we do here? Here we are already working with Firecrawl. That is, here we also register, go to Firecrawl. Let me show you what you need to do. Register on Firecrawl and find your API key there. You'll see it right away after registration. So, click here POST, select POST. You need this URL, that is, the one for scraping. Again, take this template, put it in your Telegram channel, download it, install it, and don't worry about it. Well, if you are doing everything manually, then I am explaining it to you. Generic credential type header authentication. What do we have here? Here is authorization. We write authorization. And then an important point. Then an important point. I will write here so as not to reveal, right, my key. But you, you write there with Bear. The word Bear, a space, and then paste your key. Everything. That's it. Then the key, only that needs to be done as a value, right? That is, your name will be authorization, and here it will be Bear, a space, and your key. Everything, and it will work. Header, again, we send them in JSON format, so we make it clear that it's content type application JSON. Here, select JSON. The URL field, we send the URL. Yes, here everything is already processed, and we just take the website like this, drag it here, and that's it, and it's here, you see, it's even displayed here. And here there is a very important point that I missed, right, if. What does this if do? As you can see, here, for example, there is no website, and there might be some of your specific businesses, searches, where, well, there will be no website, and therefore it cannot be scraped, information cannot be collected from it, right? We don't need that then, right? Why go through this whole process then? Therefore, we do an if, in which we do a check. We take the website from here like this, drag it, and look. This is a string, you see, this is A, this is a string. And here it is "is not empty". If the string is not empty, we go further. If it is empty, we don't go. If the string is not empty, we go further. I'll explain now. And if the string is empty, then we do this FALSE and return here to the loop and go to the next element. That is, we go through each element, right? If this one is invalid for us, we simply go to the next one and so on. After this point, what happens here? After this request, which we just discussed, we have this kind of information. We get information like this in this format, right, absolutely unreadable, absolutely incomprehensible. What to do with it, it's completely unclear. After that, we create an AI. As a chat model, we select Open AI. And to connect your Open AI, right, we go, open Open AI, register there, create an organization there, put 5 dollars there, for example. Here. And get the API key, paste it here. Done. Welcome memory is not needed here. And a structured output parser is needed. One second, I will definitely tell you about it. Here. AI agent. Here we make an agent. Here, most likely, it will already be selected, well, something else will be selected here. Therefore, click here, select Define Below, and rather click here, select Define Below. Then this will allow you to insert some prompt, like a user message, from the previous node, that is, from here. That is, we take this response and we drag it here in markdown. And here I have a completely ordinary prompt written, that, brother, you need to analyze all of this. Strengths, weaknesses, opportunities, and as I said, I did this in English. But you can write it in Russian, it will also not be a problem. It will give you the answer in Russian too. So, what do we see here? We see email and summary. That is, I tell him: "Listen, you need to give me two fields, email and summary." And I also tick this box, not a box, rather, I switch this toggle. And this means that I need a special output format so that I have two fields. After that, it will automatically create this thing for me. And here I need to write JSON format. Exactly, these curly braces open. Here we have a key and a value. I don't write anything in the value because I don't care. Don't forget about this comma. And I just write here what I want to get as output. I want to get email and summary. Done. Yes. And as you can see, it gives us email and summary. AI is sometimes empty, right? It's not always explicitly stated on websites, so it doesn't always find them, right? But the summary it will immediately analyze, say, and give you an answer in Russian, including. After that, what do we do? We do an update. We again select our database, right, which we have already selected. And we need to update a record, we need to find it, right? Every record has its own ID. And we will map, that is, look for a match by ID. To do this, accordingly, we have the loop over Items, which we already had in advance. This ID, when we went through all of this, we went through all of this array of data, right, through all the records, and each one has an ID. We drag this ID here. We drag it here again from our previous email and summary. Here is email and summary. We put it in, and that's it. And it writes the summary and email. And that's it. And it goes to the next round. And so it does for all our data that is in the table. If it sounds complicated, I can understand, don't worry. This is if you haven't even watched such videos much, this is the first video you're watching, it might seem like: "Oh my God, everything is fine, don't worry." If necessary, I can shoot a step-by-step guide on how to create the most basic agent. Where to click, what means what, right? If you want more complex ones, I can make more complex, difficult agents that you can take and integrate into your business right now, that will work with CRM, email marketing, and so on. Something in between, like this agent, it's not very simple, not very difficult, but in general, it's like that, right? And that's why I wanted to tell you this. If you are interested, let me know, because I'm not sure if I should continue shooting this. Just if you watched this, let me know whether to continue or not. Again, the template is in the Telegram channel. Take it for free. The link is in the description. Thank you all for watching. Whatever you are interested in, whatever you want to see, just write about it in the comments. I will explain everything, I will do it. My name is Max. Thank you all. Goodbye.