
LinkedIn Content Agent
Scheduled posts with RAG, history-aware writing, AI images, and Postgres logging.
Overview
An autonomous LinkedIn publishing system for a software engineer brand. It generates on-brand posts three times a week, pulls personal facts from Pinecone RAG, avoids repeating recent topics via Postgres history, creates a matching image, and publishes to LinkedIn.
Problem
Consistent LinkedIn content takes hours each week. Generic AI posts sound fake, repeat old angles, and invent experience that was never shipped.
Solution
Built a scheduled n8n agent with strict brand rules, RAG as source of truth for personal claims, Postgres tool for recent post history, structured JSON output for post metadata and body, a second chain for cinematic image prompts, async image generation, and LinkedIn publish with DB logging.
Architecture
Form-based RAG ingestion into Pinecone for portfolio and experience docs. Main workflow: schedule trigger (Mon/Wed/Fri), post-generating agent with Pinecone + Postgres tools, image prompt chain, external image API with poll/wait, LinkedIn post node, Postgres insert for content history.
Workflow
- 01 Upload brand and project docs to Pinecone index
- 02 Schedule fires on posting days
- 03 Agent writes post using RAG and prior-post context
- 04 Image prompt agent builds a visual from the post idea
- 05 Publish to LinkedIn and store post in Postgres
Results
- · Three posts per week without manual drafting
- · Personal claims grounded in uploaded source material
- · Topic and hook variety enforced by history lookup
- · Image + text published as one LinkedIn post