Resources
What's in this guide
In this guide, you'll set up an AI agent that will track engagement with your posts on LinkedIn and send you coaching suggestions!
Here's how it works:
Once a month, pull all your recent LinkedIn posts
Look up each post in your post tracker if it already exists, or create it if it doesn't
Update the post in your tracker with the number of comments and likes
Have AI analyze and write a summary of insights about your posts based on engagement stats
Send you the report
Here's a step-by-step guide on exactly how to set up this AI agent.
1. Set up your LinkedIn post tracker
First, you need a simple tracker to be able to track your posts and engagement stats. To make it, just create a copy of this Google Sheets template. This tracker will entirely be filled out by your agent! These are the columns:
URL: The link to the post
Post Title: An AI-generated title for the post to make it easier to identify
Date: The date it was posted
Day of the Week: For insights about whether posts do better on a certain day
Time of Day: For insights about whether posts do better at certain times of day
Post Content: The text of the post
Comments: Number of comments
Reactions: Number of reactions

👉 Already using another tool? If you're already using another database tool like Airtable or Notion, feel free to make this table there instead. Just note that you'll need to be comfortable changing automations to reference those apps instead of Google Sheets.
2. Import the LinkedIn Engagement Tracker agent template
Next, we're going create an AI agent in Relay.app. Every month, this agent is going to:
Look up your recent LinkedIn posts
Add any new posts to your tracker (or find previous posts to update)
Update the count of likes and comments
Send you an AI report of insights about your posts
To make this agent, just import the template by clicking the Use this template button on this page: LinkedIn Engagement Tracker Template

3. Review the weekly trigger (step #1)
This agent runs on a scheduled trigger. By default, it's set to run your post analysis every Saturday.

4. Add your LinkedIn profile to the Get posts step (step #2)
The first thing your agent is going to do is look up your recent LinkedIn posts. Copy your LinkedIn profile URL and paste it into the Profile URL field in step 2.
The logic for which posts to find is already set. You're looking up posts for two reasons:
Add new recent posts and their engagement stats to your tracker
Update the engagement stats for already captured recent posts (up to 1 month old)
By default, this step is set to look up all of your posts in the last month, with a maximum of 50 posts. It's set to Continue without a result if no posts are found, which means it won't be considered an error if you didn't post anything last month. (Note that since it will only update posts that are a month old, after a month stats on any particular post will no longer be updated by the agent, which should be a reasonable limit.)

5. Review the loop (step #3)
Next, we have a loop. For each post found, the agent will run all the steps contained inside the loop. This step is already set up.

6. Add your tracker to the Find row step (step #4)
Inside the loop, we have a Find row step. This step is used to check your tracker to see if the post the agent found is new, and needs to be added to your tracker, or if it exists already, and you just need to update its engagement stats. To set this step up:
Add your tracker as the sheet to reference
Select the tab My LinkedIn Posts
Identify the row by seeing if there is a URL in your tracker that matches the Activity URL from the post
Make sure the step is set to continue even if no results are found

👉 Tip: You can set this one up manually, or you can use the Filter assistant to ask it to identify the row by looking at the Activity URL.
7. Review your paths (step #5)
Next we need a path, which is already set up for you in the template:
Path A tells the agent what to do if a row is found—that is, the post is already in the tracker, and you just need to update the engagement stats.
Path B tells the agent what to do if no row is found—that is, you haven't added the post to your tracker yet. In that case, we need to extract some post information and add it to the tracker.

8. Select which fields to update when a row is found (step #6)
If the row is found, it exists already, and we just need to update the number of comments and reactions, nothing else.
To do this, in step #6 Update row, you need to configure the Fields to update. Add these two fields from your sheet:
Comments: Insert the number of comments from the iterator value
Reactions: Insert the number of reactions from the iterator value

👉 Shortcut: You can map these fields manually, or you can just click Auto-suggest! The AI will probably try to update ALL the available fields in the sheet though, so delete all fields other than Comments and Reactions.
9. Review the AI step for extracting data from new posts (step #7)
If the row isn't found, it needs to be added to your sheet. Before we can do this, we need to extract a few things about it:
It's useful to know the day of week and time of day of the post so you can look for trends in good post days/times
It's also helpful to have a brief title for the post
This step is already set up in the template.

10. Set up the Add row step for adding new posts (step #8)
For new posts, you need to add them to your sheet. Select your tracker in the Sheet field in step 8.
To map data from the post and the AI extract step to your sheet, just click the Auto-suggest button. It should fill out all 8 fields with the right variable values automatically. (You can map them manually instead if you like.)

11. Review the AI analysis step (step #9)
The next step is already set up in your template: It's an AI step to review recent posts to generate observations. It will output a single rich text message, which we'll use in the last step.

13. Select where to send the report (step #10)
The last step is to send yourself the AI's report. You can send it as a message to a Slack channel or as a DM to yourself.

Or, you can switch to an email notification if you prefer.

14. Publish changes
Your agent is ready to go! Publish changes for all your updates to take effect.

15. Start a test run
Let's do a test run. Click Start a test run in the header. Note that since your tracker is starting out empty, no rows should be found in the Find rows step, so all posts should go through Path B.

16. Review the sheet and AI report
Take a look at your tracker and at the notification sent to you. Did you get a good number of posts? Was the report helpful? Make any tweaks necessary, like editing the analysis prompt or tweaking the number of posts to return.

17. Turn on the agent
When you're happy with the result, you can turn your agent on! Look forward to receiving regular coaching reports. Make sure you read and take action on them.

Next, we'll work on getting great post ideas
This AI agent will help coach you to be a better poster. But how do you come up with the content to write about in the first place? Learn that in the next setup guide.