in this video I'm going to show you how to use relay. apppp to build an AI agent to automatically look up LinkedIn profiles you give it whatever you've got first name last name email address company name City location and it'll find the best profile that matches that information I use this all the time I use it when I'm preparing for meetings I use it when a prospect sets up a demo I use it when new users sign up for the product and it saves me a ton of time so first here's the basic setup you're
going to start with a Google sheet that has in the First Column whatever information you've got about the person that you want to look up and then the second column it's going to populate the LinkedIn URL for that person and we're going to use a relay. apppp AI workflow to accomplish this here's how the workflow works first since it's based on that spread sheet we're going to start by with a manually triggered batch and so in Google Sheets we're going to select our LinkedIn profile finder we're going to trigger runs for all rows If instead
you want to trigger this on a one basis you can set up a different trigger like an individual row in a sheet or a request from whatever other system that you're using as long as you give it whatever information you've got relay. apps AI agent can go find the LinkedIn profile next we're going to run an automatic Google search and in that automatic Google search we're going to include whatever information we've got in that row along with the words LinkedIn profile and it turns out Google is pretty good at publicly indexing a bunch of LinkedIn
profiles and so when you search for information plus LinkedIn profile it's very likely that the correct LinkedIn profile will be one of the search results then comes the trickiest and most important part which is using AI to interpret those Google search results and pull out the right LinkedIn profile so here's what I've done I've created a custom prompt AI step using GPT 40 as the model that says review search results and pick the right URL so here's how we set up the prompt we are looking for the LinkedIn URL of the profile that corresponds to
whatever information we put in please review the attached seource results and create a list of all the URLs of LinkedIn profiles not posts output the most likely URL along with a score between one and 100 of how confident you are if there's exactly one profile with that name your confidence should be very high if there are many profiles that match the name and none matches the employer of the email address your confidence should be low please also explain your reasoning and so here's what that AI is going to output for me it's going to Output
the most likely URL it thinks it it's found a confidence score a set of all the LinkedIn profiles in that set of search results and then some reasoning now we can use a path along with a human in the loop step to make sure we're confident even if the AI is not confident so first path if the AI is confident meaning the score is greater than 80 we just want to automatically write that first LinkedIn URL back into the spreadsheet if the AI is not confident we want to ask the user for help and here
we're going to use a humanin the loop data input step and here's how that's going to work we're going to ask the user in this case me I need help picking the right LinkedIn URL for this information please tell me which of these LinkedIn profiles is right and then we're going to list out all of the LinkedIn profiles from those search results in the in this case slack message for the human Loop step and then I'm going to put in the correct URL and then we're going to update the spreadsheet row with that correct URL
so now let me show you the whole thing in action for that real spreadsheet I'm going to start a batch of runs I'm going to do it for all matching rows you can see that it's set up a bunch of pending runs it's going to work on them in sequence let's look at this one as an example you can see it's first search in Google for the correct LinkedIn profile got one now it's going to use AI to review the search results and picked the right URL it was confident it got the right one and
it updated the row so now if I go over to the row you can see it's filling in all of the LinkedIn profiles one by one this workflow will take about a minute to complete but you get the idea so if you need to link up look up LinkedIn profiles for whatever reason new user onboarding meetings you have coming up prospects who reach out for a demo and you want to do it in an easy automatic way set up this AI agent using relay. apppp