back to portfolio
AI Automation2025–2026 · Workflow Designer & AI-Assisted Builder

LinkedIn AI Content Automation System

An end-to-end JavaScript automation that researches, creates, publishes and tracks LinkedIn content — from topic selection and AI content generation to scheduled publishing and performance tracking.

Role
Workflow Designer & AI-Assisted Builder
Core stack
JavaScript · Node.js
Automation
Playwright
AI & data
AI APIs · JSON
/ the problem

Posting on LinkedIn consistently means researching topics, writing posts, designing visuals, choosing hashtags, publishing at the right time and then tracking how each post performs. Done manually, it is repetitive, slow and easy to drop.

/ the solution

I built a JavaScript-based LinkedIn automation system that manages the complete content lifecycle. It selects relevant digital-marketing topics, generates post copy and images, adds hashtags, publishes through browser automation, and stores publishing and analytics data to improve future content.

/ complete workflow

One execution, nine coordinated steps.

1Topic Selection
2Research
3AI Content Generation
4Image Generation
5Hashtag Selection
6Approval
7Scheduled Publishing
8Analytics Tracking
9Learning Agent
/ ai agents & modules

Each agent owns one responsibility.

Content Generation Agent

  • Selects relevant digital-marketing topics
  • Generates professional LinkedIn posts
  • Creates hooks and calls to action
  • Adds relevant hashtags

Image Agent

  • Generates or selects post visuals
  • Matches imagery to the post topic
  • Prepares LinkedIn-friendly formats

Publishing Agent

  • Playwright browser automation
  • Opens LinkedIn and composes the post
  • Supports scheduled publishing
  • Stores published post URL and ID

Analytics Agent

  • Records publish date and post URL
  • Tracks engagement information
  • Stores analytics in JSON
  • Feeds results back into future content

Automation Orchestrator

  • Connects every agent in order
  • Handles errors and workflow status
  • Blocks incomplete posts from publishing
/ technology stack

Modular Node.js architecture.

Dashboard
HTMLCSSJavaScript
Backend & Automation
Node.jsPlaywrightChild ProcessScheduled Jobs
AI & Data
AI API integrationPrompt engineeringJSON storageContent agents
Tools
Git & GitHubPowerShellVS CodeLinkedIn automation

Built using a modular Node.js architecture with Playwright browser automation, AI-powered content agents, scheduled workflows, JSON-based analytics storage and automated post-publishing processes.

/ code & architecture

The orchestrator in nine lines.

orchestrator.js
async function runContentWorkflow() {
  const topic = await selectTopic();
  const content = await generatePost(topic);
  const image = await generatePostImage(topic);
  const result = await publishToLinkedIn({
    content,
    image
  });

  await savePublishingAnalytics(result);
}

This workflow coordinates topic selection, AI content creation, image generation, publishing and analytics storage.

project structure
linkedin-ai-agent/
├── agents/
│   ├── topic-agent.js
│   ├── content-agent.js
│   ├── image-agent.js
│   ├── publisher-agent.js
│   └── analytics-agent.js
├── dashboard/
├── data/
│   ├── content-database.json
│   └── post-analytics.json
├── automation/
├── orchestrator.js
├── run.js
└── package.json

Every agent has a specific responsibility, and the orchestrator manages the complete process from topic to analytics.

/ challenges & solutions

The hard parts.

Maintaining a secure LinkedIn login session
Handling browser delays and changing page elements
Preventing duplicate publishing
Scheduling posts at the correct time
Passing data between multiple agents
Saving publishing details only after a successful post
Triggering analytics once the post URL is stored
Recovering from failed image generation or publishing
Keeping API credentials outside the source code

Credentials, session files and cookies stay outside the repository via environment variables and .gitignore.

/ results & learnings

What the system actually delivers.

Reduced the manual content-creation workflow
Automated multiple steps in a single execution
Built a reusable modular agent architecture
Successfully generated and published LinkedIn posts
Stored publishing history and analytics automatically
Added scheduling and post-publishing workflows
/ demo & contact

Want a walkthrough?

Happy to share a live demo of the workflow, the repository and a published post.