Resources
What's in this guide
In this guide, we'll show you how to automatically evaluate potential leads by analyzing their LinkedIn profiles and generating detailed insights. Here's how it works:
The agent starts when you provide a LinkedIn profile URL
It automatically extracts comprehensive profile data from LinkedIn
AI analyzes the profile to assess lead quality and creates a detailed dossier
You receive an email with the enriched lead information and assessment
Let's go through it step by step.
1. Double check you imported the Lead Logger agent template
You should have already imported this template in the previous setup guide: LinkedIn Lead Logger

2. Make a copy of the Leads from Comments tracker
For this agent, you need another tracker. The purpose of this tracker is to collect a list of everyone who has commented on a post as a lead.
Make a copy of this Google Sheets template: LinkedIn Leads from Comments

3. Review the manual trigger (step #1)
This agent has a manual trigger. As a manually triggered workflow, your Comment Manager agent will be able to call it to run as needed.
Here you'll see two parameters already set up for you. The Comment Manager will automatically fill these in whenever it calls the Lead Logger!
postURL: The Comment Manager agent will fill in this value with the Activity URL of the post
pageNumber: The Comment Manager agent will fill in this value with the page number of comments to process

4. Review the Get comments step (step #2)
Next, the Lead Logger agent will use the URL of the post and the page number of comments to get the right set of up to 50 comments on that page.

5. Review the loop (step #3)
Next, we have a loop to take action on every comment found on the selected page of comments.

6. Update the Find row step to point to your lead tracker (step #4)
Update step #4, to look in the Leads tab in your new tracker. The purpose of this step is to see whether or not you've already logged the person who replied to your post as a lead.
To find whether the person is already in your tracker, look for a LinkedIn profile URL that matches the comment author's URL.

7. Review the paths (step #5)
Now, we have two paths already set up for you. This lets us take different actions based on whether or not the person is already in your lead tracker.
Path A: Add a row if the person is not already in your tracker
Path B: Update the row if the person is already in your tracker

8. Review the search LinkedIn step (step #6)
Inside Path A, we are processing new leads. First we need to look up the new lead on LinkedIn.

9. Point the Add row step to your Leads from Comments tracker (step #7)
Next, we need to log the new lead and their information to your tracker. Open step #7 and update the sheet to point to your Leads from Comments tracker.
Fill out the Fields to populate like this. (You should be able to use the Auto-suggest button to fill out most if not all of this.)
LinkedIn Profile URL: The comment author's URL
Name: The comment author's name
Title: The title found in the author's LinkedIn profile
Comment URLs: A link to the comment

10. Point the Update row step to your Leads from Comments tracker (step #8)
Next, pop over to Path B and open up the Update row step. This step will run when the person who commented has already been added to your tracker.
We just want to add a link to the new comment in this row. To do this, update the Comment URLs field:
First add the existing Comment URLs variable
Then add the new Activity URL of the this new comment
This setup ensures that the Comment URLs field will keep its current value, but the new comment URL will be appended to it.

11. Test your two new agents
Two test these agents, go back to your Comment Manager agent and click Start a test run.
(If prompted, publish changes first before testing.)

12. Review the results
Your two agents should have filled in your LinkedIn Leads from Comments Tracker. Double check that the data went through.

11. Turn on the Comment Manager agent
If the spreadsheet was updated correctly, you can turn on your Comment Manager agent.

How to use (and build on) these two agents
With these two agents set up, you now have a way to track everyone who comments on your posts. This is the foundation you need to engage with your audience. There are a few places you can go from here:
Start by connecting with people who comment on your posts. Just follow the LinkedIn profile URLs from your tracker and send a connection request (unfortunately, the LinkedIn API doesn't allow automating connection requests). Like we did in previous agents, you could add a step to send these URLs to yourself over Slack if you like.
Add enriched leads to your CRM: Instead of just adding commenters to a spreadsheet, you could add them to your customer relationship manager database. Since we are pulling information from the person's LinkedIn profile, there is more information about the person that you can also log, like the company they work for and how many followers they have.
Automatically reply to comments: If you frequently make posts that ask people to comment in order to receive something, and you need to follow up with a templated response, you're a good candidate for automating comment replies. You would have an AI step to read each comment and classify whether it deserves the templated reply or a manual reply. From there, the agent would follow a path to either send just the templated reply (written by you for each post), or draft a response and ask you to manually review and send the custom reply.
We're not including details on these agent add-ons here as they are very specific to your individual customer management system and what you're posting. Feel free to reach out to support@relay.app or book an onboarding session if you get this far in setting up the system need additional help customizing the system to you.
Wrapping up
Thank you for getting this far in this AI system for automating lead generation on LinkedIn!
You should now have 7 AI agents:
An agent to identify target companies and roles at those companies that match your ICP
An agent to find promising leads at those companies that match the roles you're looking for
An agent to track your posts and their engagement on LinkedIn, and send you coaching suggestions
An agent to keep tabs on influencers' posts on LinkedIn, and what you can learn from them
An agent to draft new posts for you based on your own voice and influencers' successful posts
An agent to keep track of the number of comments you receive on each post so you can process them all
An agent to log everyone who comments on your posts so you can connect with them or add them to your CRM
As well as 3 trackers:
A tracker for target companies AND specific leads at those companies
A tracker for your LinkedIn posts and engagement stats AND other creators' posts
A tracker with every lead who comments on your posts
You should now have a system that meets our goals of connecting with your audience, writing useful content for them, and following up with them!
We'd love your feedback
Thank you for working your way through these setup guides. Please take this survey to share your feedback. We'll read it all and use your notes to do better.