# Content researcher

## What's in this guide
In this guide, you'll set up an AI agent that will **research LinkedIn content trends from industry influencers to understand what's driving engagement**. Here's how it works:

- The workflow runs on a schedule and creates a list of LinkedIn influencer profiles to analyze
- It automatically fetches recent posts from each influencer's profile
- AI analyzes all the posts to identify content themes that are getting the most engagement
- You receive an email report with insights on trending topics and why they're resonating

Here's a step-by-step guide on exactly how to set up this AI agent.

## 1. Make sure your post tracker is already set up
This agent will fill out the second tab in your _LinkedIn Engagement Tracker_ sheet ( [this template](https://docs.google.com/spreadsheets/d/1KwXcEeFbhOiNNji47nyu6vyPALD-4cfj8XNWYqt5HNU/edit?usp=sharing)). You should have already set this up in the previous setup guide.

## 2. Import the _Content Researcher_ agent template
Start creating this agent by importing the [**LinkedIn Content Researcher template**](https://run.relay.app/shared/4-linkedin-content-researcher-xzdanZgsYuQw).

## 3. Review the triggering schedule (step #1)
This agent runs on a schedule, once a week on Saturdays (just like your own post engagement tracker).

## 4. Create your own list of influencers to follow (step #2)
The first thing this AI agent does is reference a list of influencers to look up. Open this table of contents and **replace the names and LinkedIn profile URLs with influencers in your own space.**

This list is important to personalize because these are the people whose posts the AI will be analyzing! You want the report to be relevant to you and your business.

## 5. Review the loop for each competitor (steps #3 and #4)
Next, the agent will grab at most 5 recent posts of each influencer in your list. This is done with a single _Get posts_ step inside a loop.

## 6. Review the nested loop (step #5)
We need to process each of the 5 posts from each influencer in your list. That means we need another loop. The steps inside this loop will run for every post found in step #4.

## 7. Update the _Find row_ step to point to your influencer tracker (step #6)
Now we're going to do the same thing we did for your own posts in the last agent: We're going to check to see if we already added these posts to your tracker or not.
Open the _Find row_ step and select the tab _**Creator LinkedIn Posts**_ in the sheet _LinkedIn Engagement Tracker_.
To identify the row, you just need to match on the post's URL. Select the field _**URL**_ and add the _**Activity URL**_ from the iterator object.

## 8. Review the paths (step #7)
Next, a set of paths is already set up for you.

- **Path A:** If no row corresponding to the post is found in step #6, we need to add the post to the tracker.
- **Path B:** If a row is found in step #6, we just need to update the engagement stats.

## 9. Review the AI extract step (step #8)
If we need to add the post, first we need to extract some data from it. This AI extract step is already set up for you.
_**👉 Good to know:**_ Extraction steps like this are usually pretty simple for AI, so by default this step is set to use a less powerful (and therefore less expensive) AI model.

## 10. Set up the _Add row_ step (step #9)
Next, we add new posts to our tracker. Open step #9 and select the _Creator LinkedIn Posts_ tab in your tracker. To map the right fields, just click _Auto-suggest_! All 10 fields should be automatically filled out for you.

## 11. Select fields to update in the _Update row_ step (step #10)
In _Path B_, for posts already in your tracker, we just need to update them rather than extracting data from them and adding them. You just need to update the number of comments and reactions, nothing else.
Open up step #10 and map data to these two fields manually, or use _Auto-suggest_ and delete any unnecessary fields.

## 12. Review the AI report step (step #11)
We're all done with loops and paths now! Now we just need to write a report on everything that was found and send it to you. Step #11 is the report writing step. The prompt is already set up for you and the list of posts is attached.

## 13. Review the _Send email_ step
Last, the agent will email the report to you! As always, you can change this up to be a different type of notification like a Slack message instead depending on how you want to work.

## 14. Start a test run
Click _Start a test run_ to see how this agent does!

## 15. See how the emailed report looks
When the test run has complete, take a look at the report in your inbox. If necessary, you can make tweaks to your prompt or list of influencers to get the report structure in the most useful state for you.

## 16. Turn it on!
When you're happy with your report, go ahead and turn your AI agent on.

## 17. Use the report to write about content that is already performing well
This report can be a gold mine of ideas. In the next agent, we'll use these influencers' posts to generate new posts for you, but it's also useful to read this report yourself to get ideas.

Take a look at what content is resonating. Rather than trying to copy posts, **think about how elements of posts translate to** _**your**_ **space and your voice**. Consider:

- **Content type:** What type of content resonates for your particular audience? For example, educational posts (like how-to guides) or "How I built this" video walkthroughs.
- **Post structure:** Can you apply the same post structure, but to a different topic? For example, if a list of 10 ten products took off in someone's post, can you recommend 10 in your own specific industry?
- **Hot topics:** Is everyone in your sphere talking about the same thing this month? For example, AI content generation, data security, a current event? Think about your own personal take on this topic and how you can translate it for your own audience.
