Back to Case Studies
Case Study

Rebuilding the LinkedIn Comment Generator for a Cleaner, Active Pipeline

A community LinkedIn engagement workflow arrived with stripped parameters and dead nodes. We rebuilt it with the logic and node names intact, restored the Unipile and AI wiring, and shipped a clean dark canvas that activates on the first try.

n8nLinkedIn APIUnipileOpenRouterAI AutomationWorkflow Rebuild

The Problem

Engagement is how LinkedIn works. A good comment on the right post puts you in front of that post's whole audience, and it costs you two minutes. The catch is scale. Doing this by hand every day means reading feeds, picking posts, writing something that sounds human, and hoping you never miss a day. Most people quit within two weeks.

We started from a community workflow called Automate Your LinkedIn Engagement with AI-Powered Comments. The idea is strong. You paste a post link into a chat, an AI model pulls out the post ID, Unipile fetches the post, a second AI pass writes a comment, Unipile posts it and likes the post, and Telegram confirms the run. The problem was the export. Every parameter was stripped. The HTTP nodes had no URLs, the AI nodes had no model, the Telegram node had no chat ID, and the workflow refused to activate with six separate configuration errors.

The Rebuild

The rebuild brief was strict. Keep the logic and the node names intact. Do not invent new steps. So we kept all ten functional nodes exactly as named, from Trigger: Chat Message Received through Unipile: Get Post Details, LLM: Extract Post ID, LLM: Generate Comment, Unipile: Comment on Post, Unipile: Add Post Reaction, and Telegram: Send Confirmation. Every connection path stayed the same too, including the agent's thinking tool hook.

What changed underneath was the wiring. The two OpenAI chat model nodes now point at an OpenAI-compatible credential backed by OpenRouter running gpt-4o-mini. The three Unipile HTTP nodes got real endpoints: GET /api/v1/posts/{post_id} for details, POST /api/v1/posts/{post_id}/comments for the comment, and POST /api/v1/posts/{post_id}/reactions for the like. The basic LLM chain extracts the bare post ID from the chat message. The agent writes a short, human comment in two to three sentences with no hashtags. The Telegram node reports every posted comment to the operator chat so each run is auditable. Secrets live in environment variables, so no keys sit inside the workflow JSON.

The eight scattered sticky notes from the original became one consolidated Workflow Guide note that documents the full pipeline. Node positions were recomputed from the connection graph into a clean left-to-right layout instead of the original overlapping blob.

How It Works

  1. You send a LinkedIn post URL to the workflow chat.
  2. The basic LLM chain extracts the bare post ID from the message.
  3. Unipile fetches the full post content with your API key from the environment.
  4. The agent drafts a natural comment and can run its thinking tool to refine the draft before finalizing.
  5. Unipile posts the comment, then adds a like reaction to the same post.
  6. Telegram sends you the exact comment that was posted, so you can review every engagement.

What Changed

The rebuilt workflow went from a canvas full of warning triangles to an active workflow with clean credentials and zero configuration errors. It imported and activated on the first attempt, which the original could not do at all. The dark canvas screenshot shows the full pipeline in one readable line, trigger to Telegram.

The bigger lesson is about community workflows. A JSON export is not a working system. Parameters get stripped, credentials get removed, and what is left is a diagram of intent. The value is in restoring the wiring without changing the design. Keeping the original node names made the rebuild verifiable node by node against the source, and it means anyone who has seen the original can read the rebuilt canvas with zero orientation time.

View Related System

Built with n8n. Self-hosted. You own everything.