How to Build an AI Agent to Recycle Top-Performing Social Content
Repurpose your best-performing posts without starting from scratch. A Custom Agent can analyze top text, image, and video posts from your Analytics dashboards each month, generate fresh variations with AI, and save them as drafts in a target campaign for review.
On a fixed schedule, the agent reads performance data from your dashboard widgets, an AI Action node drafts recycled copy, and an Oktopost Action node saves the new messages as drafts on your target social profile.
What you'll build
Schedule → AI Action → Oktopost Action
Three nodes total.
Prerequisites
- Dashboard ID: The ID of the analytics dashboard that contains your top-performing content widgets. Open the dashboard in your browser and copy the ID from the end of the URL.
- Report / widget IDs: The IDs for your top text/image posts widget and your top video posts widget. Open each report and copy the ID from the end of the URL.
- Target campaign ID: The campaign where recycled draft messages will be saved (for example, Evergreen Content).
- Target social profile: The network and profile where new drafts should be created (for example, LinkedIn).
- Permission to create and activate Custom Agents in Oktopost
Step 1: Create a New Agent Canvas
- In Oktopost, open Agent Builder and click Create Agent.
- Name your agent (for example, Recycled Top Performing Posts Agent) and add a brief description.
Step 2: Add a Schedule Trigger
- Click the + icon on the builder canvas and select Schedule.
- Set the recurring frequency. For example, choose 1st Mon at 12:00 to run the agent on the first Monday of every month.
Step 3: Configure the AI Action Node
- Click + and add an AI Action node. Connect the output of the Schedule node to the input of this node.
- Under Permissions, select Read only.
- Under Model, select Thinking or Advanced (recommended for complex multi-step prompt reasoning).
- Copy and paste the prompt template below into the Instructions field, replacing the bracketed placeholders with your specific IDs and profile details:
1. Target Settings:
- Dashboard ID: [YOUR_DASHBOARD_ID]
- Text Posts Report ID: [YOUR_TEXT_POSTS_REPORT_ID]
- Video Posts Report ID: [YOUR_VIDEO_POSTS_REPORT_ID]
- Target Campaign: [YOUR_CAMPAIGN_NAME] (Campaign ID: [YOUR_CAMPAIGN_ID])
- Target Social Profile: [YOUR_TARGET_SOCIAL_PROFILE_NAME]
2. Top Text/Image Posts:
- Identify the top 3-5 standard social posts with the highest engagement rates over the past 30 days from the specified report.
- Filter results to only include posts published by or originating from [YOUR_TARGET_SOCIAL_PROFILE_NAME].
- Analyze the core message, tone, and key takeaway for each post.
- Draft a brand-new, recycled version of the text post with a fresh hook and call-to-action that preserves the core value proposition without copying verbatim.
3. Top Video Posts:
- Pull performance metrics from the video report, prioritizing posts from [YOUR_TARGET_SOCIAL_PROFILE_NAME] with the highest engagement rates and video views.
- For each top video post, analyze its main message and draft recycled social media copy/captions specifically formatted for this profile.
4. Output Preparation:
- Format and pass all generated post variations directly to the next step, ensuring they are formatted to be saved as drafts associated with Campaign ID [YOUR_CAMPAIGN_ID] for [YOUR_TARGET_SOCIAL_PROFILE_NAME].
Replace every bracketed placeholder with your own dashboard ID, report IDs, campaign ID, campaign name, and target social profile before activating the agent.
Step 4: Configure the Oktopost Action Node
- Click + and select Oktopost Action. Connect the output of the AI Action node to this node.
- In the node settings panel, set Tool to
create_message. - Configure the required parameters:
| Parameter | Value |
|---|---|
network |
Select your target network (for example, LinkedIn). |
campaignId |
Select or enter your target campaign ID (for example, Evergreen Content). |
message |
Click the variable selector ({...}) and select response from the AI ACTION dropdown. This injects the content generated in Step 3. |
(Optional) Map additional media fields such as linkUrl or imageUrl if your workflow includes dynamic link preview generation.
Step 5: Test and Activate
- Click Run Test (or manually trigger the agent) to generate your first batch of draft messages.
- Verify that the new draft messages appear inside your designated campaign under the Messages tab.
- Once verified, toggle the status from Draft to Active.