The Automated AI Agent That Writes and Publishes LinkedIn Articles From Your Blogs

Are you tired of the never-ending content treadmill? If you spend valuable hours manually repurposing your successful blog posts into LinkedIn articles, this read is for you. We’re pulling back the curtain on a fully automated AI agent that will fundamentally change your content strategy. Forget tedious copying and pasting, this workflow handles everything: it autonomously identifies fresh content from your website, uses an AI to draft a compelling LinkedIn article, routes it to your team for quick approval via Telegram, automatically organizes the necessary media files, and finally, publishes the post itself through an API. This isn't just theory; it’s a detailed look at a real, multi-stage workflow designed to eliminate manual bottlenecks, ensure brand consistency with a human-in-the-loop check, and drastically free up your content team's time. Stop wasting effort on repetitive tasks and start maximizing your content reach, read on to learn how to implement this system immediately.

Let's be real for a minute: Content creation is exhausting. You finally publish a fantastic, well-researched blog post, and then what? You have to manually reformat, rewrite, and publish it again on LinkedIn. It’s a tedious, necessary evil that honestly eats up so much valuable time.

How about building a fully autonomous AI agent that takes your existing blog content, turns it into a ready-to-publish LinkedIn article, gets team approval, and even uploads it itself. Just a smart workflow design.

Here’s a breakdown of how this incredible automation works, step-by-step.

Part 1: The AI Content Generator: From Blog to Draft

This first part is all about the "set it and forget it" aspect. The goal here is to identify fresh content, grab it, and let the AI do the heavy lifting of drafting a LinkedIn post.

1. The Trigger: It Starts While You Sleep

The agent doesn't wait for a human command. It's set up on a simple scheduled trigger (like a cron job), maybe every morning at 9 AM. This ensures a consistent check for new content without someone having to remember to click a button.

2. Identifying Fresh Content: No Duplicates Allowed!

First things first, the agent needs to know what it hasn't processed yet. It goes through a quick but clever little checklist:

  • It hits the capabl website (or whichever site you use) to get a list of all published blogs.
  • Then, and this is key, it compares this list against a "Generated Content" spreadsheet. This spreadsheet acts as a historical record.
  • The agent only proceeds with a blog that does not yet exist in that spreadsheet. Smart, right? This completely eliminates the risk of accidentally generating content for the same post twice.
from bs4 import BeautifulSoup

html_content = _('Get HTML content from blog page').first().json.data

soup = BeautifulSoup(html_content, 'html.parser')

blog_list = []
title_list = []

for data in _input.all():
  title_list.append(data.json.Title)

for a in soup.find_all('a', class_='link-block-12'):
    link = a.get('href')
    h1 = a.find('h1')
    if link and h1:
        name = h1.get_text(strip=True)
        if name not in title_list:
          blog_list.append({'name': name, 'link': link})

return blog_list

3. Fetching the Content & Drafting the Post

Once a new, unprocessed blog is identified, the agent dives in. It gets the complete HTML content of that specific blog post. Next, it uses the power of an AI Agent (like an OpenAI or similar model integrated into the workflow) to perform the critical task: Write a compelling LinkedIn post using that content. This is where you program the AI with a specific prompt.

To get a breakdown on how to write a good, high-quality prompt: check out Capabl's prompt handbook

4. The Human Handoff: Team Approval

Now, even though the AI is fantastic, we definitely don't want to publish something without a quick review. This is a crucial human-in-the-loop step.

  • The agent immediately sends the newly drafted LinkedIn post to the content team via a notification channel (like Telegram or Slack), asking for approval.
  • The workflow then pauses and waits for the approval signal.

5. Finalizing the Draft and Prepping the Media

If (and only if) the team member hits "Approved," the workflow continues:

  • The AI-generated content is uploaded to the 'Generated Content' spreadsheet. This marks it as processed.
  • Critically, the agent then creates a dedicated Google Drive folder for that specific piece of content. We need somewhere to store images, videos, or other media.
  • Finally, the agent sends a notification confirming, "Media folder created and draft is ready."

Part 2: The Media Workflow & Ready-to-Publish State

The first automation handles the text. This second mini-workflow ensures everything is polished and ready to go live.

This part is triggered separately, perhaps later in the day, and checks the status of all drafted posts.

  1. It checks the main spreadsheet for any posts that have been approved.
  2. Then, it performs a clever check: Have media files been uploaded to the newly created Drive folder?
  3. Once the agent confirms the necessary media is present, it updates the corresponding entry in the sheet, setting its status to "Ready to Publish."

Part 3: The Automated Publisher: Going Live!

The third and final piece is the simplest, but perhaps the most satisfying. This trigger is set to run when you want to publish (e.g., daily at 1 PM).

  1. It checks the spreadsheet for the oldest (or whatever priority you choose) post that is "Ready to Publish."
  2. It then takes that content and the associated media and pushes it directly to LinkedIn using an integration, perhaps a service like upload-post.com's API or Linkedin's own API.
  3. The moment the post is successfully live, the agent updates the sheet one last time to "Published," completing the entire cycle.

Key Takeaway: Stop Doing This Manually!

What is so appealing about this specific workflow is the level of sophistication. It’s not just copying and pasting; it’s smart content selection, AI drafting, mandatory human approval, and automated media management.

If your content team is spending hours simply trying to re-use your existing fantastic blog content on social platforms, you are seriously overdue for an upgrade. This automated system transforms a multi-hour, multi-step chore into a simple, two-second "Approve" click and that's priceless.

Inspire Others – Share Now

Table of Contents

Part 1: The AI Content Generator: From Blog to Draft

1. The Trigger: It Starts While You Sleep

2. Identifying Fresh Content: No Duplicates Allowed!

3. Fetching the Content & Drafting the Post

4. The Human Handoff: Team Approval

5. Finalizing the Draft and Prepping the Media

Part 2: The Media Workflow & Ready-to-Publish State

Part 3: The Automated Publisher: Going Live!

Key Takeaway: Stop Doing This Manually!