This Ai Agent can find you leads and competitors (no code)

Rory Ridgers builds a no-code AI agent using Relevance AI and Apify that scrapes leads from Google Maps and LinkedIn, then auto-generates personalized outreach emails. The agent pulls data like emails and ratings, feeds it to an LLM with custom prompts, and runs end-to-end to find construction companies in London and create marketing pitches.
Chapters
What's up guys, in this video I'm going to be teaching you how you can create a simple yet effective agent that'll allow you to scrape things like Instagram, Facebook, LinkedIn, and even Google Maps in order to find a range of data on your competitors and potential leads. You haven't seen me before, my name is Rory Ridgers and I help business owners to integrate AI agent systems into their businesses. So if that's something you might be interested in, then I've left a link to my website in the description. You can go ahead and book in a call with me, or you can just fill out the contact form and I'll get back to you. As always, all the templates that I use in this video will be available for completely free in the description. So if you go into the description, you should see something like free templates, and then click the link and you'll be able to get them. Let's not waste any more time, let's get into the video and I can show you how it all works. So in this video, we're going to be using Relevance AI and also Apify to make all of these tools. And if you've watched my channel before, you probably know what Relevance AI is. It's where I make all of my AI agent systems. But if you haven't heard of Apify before, it's a marketplace for all these different scraper APIs that you can come on and use. You can pretty much scrape anything you like, and you also get some free usage, which is really nice. So in this video, we've got 4 different tools that we're going to be using: the LinkedIn Profile Scraper, the Google Maps Scraper, the Outreach DM Generator, and then the Outreach Email Generator. So I'm going to show you inside each of these. These 2 tools connect to an Apify Actor, these 2 don't. So I'm going to show you these 2 first. We look at the Google Maps Scraper, we can hit edit, The inputs are going to be industry and location, and this is obviously just going to be the industry or the location that we want to find these leads or competitors in. So this could be something like real estate agencies in New York or whatever it is you like. So those are the inputs for this tool. And then what we do here is we connect it to our actor on Apify. And Relevance AI actually make it really easy. They have a native integration with Apify, and you can just hook up your actor and it works perfectly every time. So I'm going to show you how this works. We go over to Apify, go to our actors. You can see we have the Google Maps Email Extractor here. And what this does is basically exactly what it says. It extracts emails from Google Maps, but it also extracts way more data points than that. And it also just looks on Google Maps at specific industries and will find us leads or competitors from there. So the way it works is you have these different inputs here. You can either do manual or JSON. Manual is going to be if you're using the actor on Apify, which we're not going to be doing. But we can still have a look at the inputs. It's the search terms, which the placeholder value is construction, and the location, again the placeholder value is New York, and then the number of places that you want to search is set to 10. I think I'm going to leave it at that, but you can set this to whatever you want. Obviously the more you search, the more it's going to cost you on Apify, so do be aware of that. But we set it to 10. What we want to look at is the JSON object here because this is what we need to send over to to the actor in order for it to run properly. And it's really simple. It's basically just these inputs but in JSON. So you can see the language is English, the location is New York, USA. This is just placeholder information. The max called places per search is set to 10. So this is how many results we want to get. And then the search strings array is construction. So this is going to be the industry that we're looking to search for. So what you do is you just copy that, paste that into your Apify block here on Relevance AI. And then just replace the variables with the inputs that we have here. So the location, we just replace that with the variable location here. And then the search strings array, we just replace that with this variable here. And how you do that, if you just click on it, you see our variables pop up here. Let's just click on it, that copies it, and then we just paste it into the boxes here. So after you've done that, all you need to do is paste in the actor name. And the way you do that is just go on to Apify You can see here, this is the actor name. You can just hit copy and then paste that into there. You can add a dataset, but for this we don't really need to. So after that, that will trigger the actor on Apify. That should give us all of our leads or competitors from Google Maps. And then we choose an LLM step to basically just go through that and format it nicely for us. So really, really simple. We're just gonna run this through so you can see how it works. For the industry, we could say something like, so I've said construction companies for the industry and the location. I've just put New York. We hit run tool, then we should see it trigger this actor on Apify. And then if we come over to Apify, we can see it actually working here. So if we go to runs, then yeah, you can see it running here. And these are all the different data points that we're going to get. So the image, the place name, the score, the reviews count, and then all their socials here, their phone number, their emails, the city, the website, and then their URL on Google Maps. So obviously the actor might not be able to get all these data points because it might just not be publicly accessible information. So if it can't, then it just won't put anything in there, but it will try its best to get all of these data points. You can see some of them are starting to come in now. So we've got the Bellet Construction, Sweeney Construction, and you can see it's got the reviews, it's got the Instagram and the Facebook for this one, also the LinkedIn and the Twitter. Obviously it's X now, it's a little bit outdated. Then it's got the phone numbers, the emails, the city, the website, and then this is their URL on Google Maps. So it's looking perfect. You can see We should have got 10. Yep. Then we come back over to Relevance AI, and if we go to items, you can see, okay, they're not showing up for some reason. The Relevance AI have these tables here, and they put the results from the actors right at the bottom of the tables. I don't know why they do that, so you have to scroll for ages. So I'm not going to show you, but I promise it is there. We can see when our LLM finishes, it should summarize all of it and format it nicely for us. Okay, so the LLM step has just finished. This is what it outputted to us. All these different construction companies in New York. We got the name, the rating, the address— obviously couldn't find it on this one— the website, the phone number, their opening hours, and then an image. It's obviously what was on Google Maps for this company. You can see it's done that for all of this. This one, I got the address, which is nice. Then yeah, it should have outputted 10 to us. So yeah, 10, absolutely perfect. So quite a simple tool but really, really effective and really useful. If we look at the LinkedIn profile scraper tool, very similar setup except for this one we don't have the location just because the actor on Apify that I'm using for this, you can't specify a location, but it doesn't matter too much. You can put the industry in here. So again, the same as the Google Maps scraper, we're going to put the industry that we want to search here. And then on Apify, exact same deal, we're connecting this to a different actor, which I can show you now. I'll go to actors, and then it is this one, LinkedIn Companies and Profiles Bulk Scraper. The way it works is you can set an action to either get companies or get profiles, and obviously you can do either or. I've set it to get profiles, and then here you put in a query or a list of keywords and names. This is just going to be what our industry input goes into, so think of it more like keywords rather than industry. You can put more than one in there. And here you've got some things that you can toggle— the limit of results per query and then the JSON payload here. This is weird because you don't actually get the full JSON payload. I'll show you what I mean. If I go to one of the previous runs, because I have tested this tool out before We look at the input, you can see there's a little bit more on this JSON object. We actually want to copy this because it's going to give us the action here, which is either going to be get companies or get profiles, and also the limit. So you maybe want to try running this out once and then copy this JSON object here, but I've already done that. So I put it in here, the is name set to false, is URL set to false, the keywords we've put in our industry variable here, and then the action is set to get profile. Again, the limit is set to 10, but you can set this to whatever you want. And then again, we put in the actor name. If we just go to the actor, and then we can copy the name here, put it in there. And then exact same thing, we've got an LLM step that's just going to go through that data and just format it nicely for us. So we're going to put in our keyword or our industry here. I'm going to say something different, I'm going to say fitness coaches. So if we put that in there, run tool, this should trigger our actor on Apify. So we come over to Apify, let's go to runs. You can see it's been triggered here. You can also look at the log, which is quite cool. You can see it actually working. If you look, new profile discovered. It's discovering all these profiles, which is really, really cool and quite handy. But if we go to the outputs, we can see all the different data points we get here. We get quite a few. We get their about, their courses, their education, experience, highlights, languages, licenses and certifications, organizations. I mean, you can read through all of this. So this is all just the data that's publicly accessible on LinkedIn. So that's really handy. LinkedIn has a lot of user data, which is great for us. Okay, so it's got 10. If we come back over to Relevance AI, RLM has already gone through all of that and sorted it nicely for us. If we have a look, so Chad Yarvitz— I might have butchered that name— we've got the profile link, got the headline, their about section, their experience, their patents, their publications, language, and then we move on to the next one. So quite detailed information here, and that only really took us a minute to get all of these. And again, You can scrape more than 10. I've just done 10 as an example. So really, really handy. Again, quite simple setup, but really, really useful tool. So now I'm going to show you the other 2 tools. We have the Outreach DM Generator and the Outreach Email Generator. Show you the email generator one first. And all this is basically is if you've searched for a company on Google Maps, you've got their email, and then you can draft an outreach email to them. So quite simple. What we put in here is the company name, website URL, and then your services. And this is just going to be— these first two are going to be outputs from the Google Map tool. That's going to be the company name and the website URL. And then your services is just going to be your services that you provide. Obviously you can hardcode this into the prompts for the LLMs, but for this, as I'm giving the template to you guys, I thought I'd put as an input so you can say your services. So this could be digital marketing, this could be paid ads, whatever it is you do. You put your services in there. This is going to help our LLM to craft outreach message. What we do is we extract the website content. So we put in the URL from our input. That's why we need their website URL. Put that into here. We're going to extract the content from their website. And then we have an LLM step here. And basically we prompted it to be able to craft outreach message. So you can read the prompt. We got, you're an expert at crafting outreach messages. I want you to take, scrape website data of a lead and craft an outreach message for your user. Based on their services. Keep it short and concise and try not to appear too salesy. Try not to— try to make a reference to a piece of the content on their site to add a personal touch to the outreach email. Also tie in the user services into the reference for their lead. So then I've given it the information. This is the lead, the company name input that we've got here, and then we have the scraped website content, which is the output from this step, and then we have the services that you, the user, would be putting in. So We're going to test this out. We're going to put something simple. We're going to say Gymshark website URL is going to be www.gymshark.com. And then your services, let's say digital marketing. So we're looking to reach out to Gymshark for digital marketing. Let's see what happens here. We've triggered the first one, extracting website contents. This is going to go through, extract all the content from their website. Okay, perfect. So this step outputted the website data. Then our LLM step here went through and crafted an email outreach message. So we can have a look at that. We've got subject line: Hi Gymshark team, hope this message finds you well. Recently came across your collaboration with Lena Deeb and was truly impressed with how you blended style and functionality into your activewear line. It's clear that you're committed to helping your community perform at their best. As a digital marketing specialist, I believe there's an opportunity to further amplify your reach and engagement, especially around initiatives like Gymshark 66 Challenge. I love to discuss how we can enhance your online presence and connect with even more fitness enthusiasts. So absolutely perfect. Obviously you can prompt this to talk however you want and add whatever you want into it, but it's done a really, really good job at sort of complementing something from their website and then also tying in what we offer into what is found on their website. So it said about the Gymshark 66 Challenge. So it's absolutely perfect. Really, really handy tool. We can have it so the agent will actually send off this email as well, but I've just set it so that it just gives you the email here and then you can sort of do what you like with it and send it off if you want. So really, really simple tool, but again, really, really handy. Now let's look at the other one, the Outreach DM Generator. So edit. So this one, pretty much the exact same setup. We have company name, website URL, your services. So again, the exact same thing. It's going to be the company name, the website URL, and then your services. Same thing, we're extracting the website content. The only difference being is that the LLM is prompted slightly different to actually create a DM rather than an email. So you can see this is pretty much the same, except I put DM and then I've put at the bottom this, now reach DM should only be 2 to 3 lines long and not contain sign-off or a subject line. With this, you can add in sort of more of their LinkedIn data, sort of the relevant data points you think are relevant. It could be their employee count or their certifications or where they went to school, anything like that. But I thought I'd leave that up to you guys. And just do this with their website URL, because again, the purpose of the LinkedIn scraper tool wasn't to actually get the data points from their LinkedIn, it was to just find leads or competitors on LinkedIn. So you can work your LinkedIn data that you got from that tool into this tool, but I haven't. Obviously it's open to you guys, you can get the templates for free and you can put it in there if you want. So we're going to test this out, see the difference here. We're going to put in the exact same input, so Gymshark, www.gymshark .com and your services. Again, we're going to say digital marketing just so we can compare the two side by side, the email and the DM, and actually see the differences here. So we're going to run this tool, give it a minute, and see what it comes out with. So it was pretty quick. You can see again, we've got the website content here and the LLM has given us, hey Gymshark, love your recent collaboration with Lena Deeb. That might be Deb, I'm not too sure. Those oversized sweats look super comfy. If you're looking to amplify your digital presence even more, I'd love to chat about some strategies that could align with your amazing products. So it's managed to do the same thing. It's managed to take a compliment from their website, but obviously condense this message down into only a few lines. It gets the same message across, which is really, really nice. Again, you can sort of change this prompt to however you like. If you have a DM strategy on LinkedIn that's really, really working for you, then you can prompt the LLM to do it like that. You can give it some examples of how these successful DMs look, anything you like. Again, I've kind of just left it up to you guys. I've given you the base and then you can do whatever you like with it. But on its own, I think it's doing a really, really good job. So now we need to put all of this into an agent that we can actually use. And of course, I've already done that. The lead slash competitor research agent. If we go to edit agent, let's look at the tools. Tools are obviously the LinkedIn profile scraper, the Google Maps scraper, outreach DM generator, and then the outreach email generator. Always make sure to set this from approval required to auto run. This just means the agent can automatically use it. The agent profile, this part doesn't really matter. But we've got the agent name, the agent description. This agent can research leads and competitors. Doesn't really matter too much because we're not using multi-agent systems anyway. The main part, the core instructions, we put role: you're able to scrape Instagram and Google Maps to find leads and competitors for the user. And then the task— I'm not going to read through all of this, you guys can pause the video and read it, or you can just get the free template. But basically the general gist of it is that user will begin by asking to either search for leads or competitors on Google Maps or Instagram. Your job is to determine what they're trying to do, basically. And then once they use that tool, they will get a list of either leads or competitors. If they're leads, they can select one of those leads and say, hey, I want to craft a DM, or hey, I want to craft an email. The emails are going to be for if it's from a Google Maps lead, and then DMs are going to be if it's from a LinkedIn lead. So I've basically just given it a breakdown of the tools here, and I follow the same structure in all my videos for how I explain the tools. I put what this tool does. So this tool can scrape Google Maps to find leads and competitors. And then I put the user inputs. User inputs are industry and location. I put what you should put in these user inputs. In here, you must put the industry that user wants to find leads or competitors in, and then also the location. And then I do this sometimes, but I've done it in this case. I give an example of when to actually use this tool. So a user input to you may be something like, I want to use Google Maps to find construction companies in New York. And then you put construction companies into the industry input, New York into the location input. And then at the end I've just put, if user doesn't specify one of these variables in their input, then ask user to clarify. So you can read through all of this and see what I've put. I've also put a note section at the bottom saying, when you use either the LinkedIn Profile Scraper tool or the Google Maps Scraper tool, you'll output a list of 10 leads. Users should select one of these leads, and then that will be used in the Outreach DM Generator or the Email Generator tool. So this just makes sure that it puts the outputs from these tools into the inputs for these tools. So things like company name and website URL. So quite a simple prompt. We're going to hit Save Changes and then we can actually test this out. So we're going to test this out. We're going to say something like, I want to find construction companies in London using Google Maps. So I want to find construction companies in London using Google Maps, using the Google Maps Scraper tool, which is perfect. And we're just gonna let this run and see what it comes out with. Okay, so this was outputted to us, giving us 10 construction companies here. We got the website URLs, the address, the phone number, the rating, and the opening hours, and then a picture here. That's 10 times, which is perfect. So we're going to say to it, we want to craft an outreach email for one of these. So let's pick one, let's say number 3. We're going to say, I want to craft an outreach email for number 3, I offer digital marketing solutions. So I've said I want to craft an outreach email for number 3, I offer digital marketing solutions. So let's see what it comes back with. Okay, so this is what's given back to us. The subject: Enhancing Your Online Presence. Hi, AXE Construction Team, recently came across your impressive work on your website, especially the section highlighting your design and build service. It's clear that your commitment to quality and attention of detail truly set you apart in the construction industry. As a provider of digital marketing solutions, I believe there's an opportunity to further showcase your projects, client testimonials online. This would help attract even more clients looking for hassle-free construction services. Would you be open to a brief chat to explore how we can enhance your online presence and reach more potential customers? Look forward to hearing from you. So, absolutely perfect. It's managed to find us all these different companies here and then craft an outreach email. As I said, you can have it so the agent actually sends out this email for you, but I wanted to make it so that it just gives you the email and then you can sort of get it to edit it and copy and paste it and sort of do what you like with it. So yeah, it's absolutely perfect. So if you're wondering if I only did two different tools in this video, it's because the Google Maps scraper is kind of its own thing. I want to show you that. And then the LinkedIn scraper, this works with pretty much any social media you like. If you go into Apify, you can find scrapers that do exactly the same thing as that LinkedIn scraper, and I didn't really think it would be worth my time or worth your time just going through each different social media doing the exact same thing. So I thought I'd just show you how to use the LinkedIn one, and then you can do pretty much any social media you like. So I really did hope you enjoyed this video. As I said at the start of the video, if you are interested in working with me, then I've left a link to my website in the description. You can go ahead and book in a call with me, or you can just fill out the contact form. And also, as I mentioned at the beginning of the video, all the templates that I used in this video will be available for completely free. There'll be a little link in the description that says free templates. You can click on that and get all the templates for completely free. If you guys have any video suggestions that you'd like to see in 2025, then please do just drop them in the comments. But if not, then I'll see you in the next video.
More from Rory

Dynamic Workflows are crazy. This is how to actually use them (beginner's guide)










