workflows.fit
Back to n8n workflows
n8n templateFreeBy Bhavy Shekhaliya

Generate LinkedIn posts using Telegram, Supabase vector DB and OpenAI RAG

Overview AI-powered n8n workflow that creates viral LinkedIn posts by learning from successful content. Features two modules: (1) Telegram-based scraper that builds a vector database of viral LinkedIn posts, and (2) W...

DevelopmentCore NodesCommunicationHITLMarketingAILangchainTelegram Trigger
Loading interactive preview...

Template notes

Overview AI-powered n8n workflow that creates viral LinkedIn posts by learning from successful content. Features two modules: (1) Telegram-based scraper that builds a vector database of viral LinkedIn posts, and (2) Web form that generates optimized posts using multi-agent AI with RAG (Retrieval-Augmented Generation) from your curated viral content library.

Key Capabilities: - Scrapes LinkedIn post content via Telegram bot - Stores posts in Supabase vector database with OpenAI embeddings - 3-agent system analyzes hooks, structures outlines, and generates posts - RAG integration retrieves similar viral posts for pattern matching - Auto-publishes to LinkedIn or provides formatted output

How It Works

Module 1: Viral Post Collection (Telegram Bot)

Step 1: URL Validation - User sends LinkedIn post URL to Telegram bot - Workflow validates URL contains "linkedin.com" - Shows typing indicator for better UX

Step 2: Content Scraping - HTTP request fetches post HTML - CSS selector extracts main commentary: [data-test-id="main-feed-activity-cardcommentary"] - Handles scraping failures with error messages

Step 3: Vector Storage - Converts post text to OpenAI embeddings (text-embedding-ada-002) - Stores in Supabase linkedinpost table with vector indexing - Sends success confirmation via Telegram

Module 2: AI Post Generation (Web Form)