Use this powerful n8n workflow to analyze viral LinkedIn posts with Gemini AI, generate custom images, and automatically publish high-performing content. Discover more n8n templates.
Download this n8n workflow template and start using it instantly.
Maintaining a strong presence on LinkedIn requires consistent, high-quality content based on current trends. This sophisticated n8n workflow solves the problem of manual content research and creation by automating the entire cycle.
It operates in two phases: first, a scheduled component scrapes target profiles to identify viral posts and saves them to a Google Sheet database. Second, a trigger monitors that sheet, feeding the top-performing content into a custom LangChain AI Agent (powered by Google Gemini). This n8n node analyzes the viral content's structure, tone, and topic, generates a unique image prompt, generates the image via API, and then publishes the complete, trend-optimized post directly to LinkedIn. This advanced n8n workflow leverages the full power of automation to ensure your content is always fresh, relevant, and engaging.
This powerful n8n workflow operates in two distinct, linked segments:
LinkedIn Content Automation Scheduler (an n8n trigger) starts the scraping process daily or weekly.Process Profiles in Batches n8n node manages the flow, ensuring that profile scraping occurs in manageable chunks to respect API limits.Scrape LinkedIn Posts API HTTP Request n8n node retrieves recent posts for each target profile.Rate Limiting Delay n8n node introduces a crucial pause.Filter High-Engagement Posts n8n node isolates content that meets defined viral metrics (e.g., high likes, comments).New Post Data Trigger (a Google Sheets Trigger n8n trigger) instantly activates when new viral data is added.Filter Recent Posts (3 Days) n8n node), and then aggregated for analysis.LinkedIn Content Strategy AI n8n node (a LangChain Agent), powered by the Google Gemini Chat Model, analyzes the aggregate trends and drafts a completely new LinkedIn post and an image generation prompt, ensuring the content is perfectly structured using the JSON Output Parser n8n node.Generate Post Image) sends the AI-generated prompt to a third-party image API (like Flux).Download Generated Image) downloads the binary image data.Publish to LinkedIn n8n node posts the AI-generated text and the downloaded image to your company or personal profile.Mark Posts as Analyzed, preventing the n8n workflow from reprocessing old data.To deploy this comprehensive n8n workflow using one of our available n8n templates, follow these steps:
Google Gemini Chat Model n8n node with your required API key and select the appropriate model.Scrape LinkedIn Posts API, Generate Post Image, Download Generated Image) with the appropriate API keys, endpoints, and headers for your chosen scraping and image generation services. LinkedIn Content Automation Scheduler (n8n trigger): This is the initial n8n trigger, configured to run on a set schedule (e.g., once per day) to initiate the viral content discovery phase.
Fetch LinkedIn Profile URLs (Google Sheets n8n node): Retrieves the list of competitor or target profiles that the n8n workflow will scrape.
Scrape LinkedIn Posts API (HTTP Request n8n node): Executes the actual scraping operation. Key configuration involves setting the target API endpoint and passing the LinkedIn profile URLs from the previous n8n node.
Rate Limiting Delay (Wait n8n node): Essential for respecting external API limitations. Configured with a specific delay time to space out requests.
New Post Data Trigger (Google Sheets Trigger n8n trigger): The primary n8n trigger for the content generation segment. It waits for new rows (viral posts) to be added to the Google Sheet.
Google Gemini Chat Model (LangChain n8n node): Provides the large language model backend for the AI agent, supplying the context and intelligence needed to analyze trends.
LinkedIn Content Strategy AI (LangChain Agent n8n node): This core n8n node contains the prompt and logic for analyzing the aggregated viral posts and generating the content strategy, including the text and image instructions.
Generate Post Image (HTTP Request n8n node): This n8n node sends the AI-generated image prompt to the external DALL-E or Flux API to create the media file.
Use this comprehensive n8n workflow to automate LinkedIn content creation. Generate posts with OpenAI, manage them in Notion, create carousels in Google Slides, and publish automatically using n8n.

Leverage this n8n workflow to automate LinkedIn contact requests, qualify leads, and send personalized icebreaker messages via Unipile and Google Sheets. Perfect n8n templates for sales.

Use this n8n workflow to automate LinkedIn comment replies using GPT-3.5 and track all engagement in Google Sheets. Ideal n8n templates for social media managers.

Use this comprehensive n8n workflow to automatically fetch content, transform it using AI agents (GPT-4/OpenRouter), stage posts in Google Sheets, and schedule updates to LinkedIn.

Use this advanced n8n workflow to automate LinkedIn engagement. Scrape posts daily using Phantombuster, generate professional comments with OpenAI, and log all activity using the Google Sheets n8n node.

Use this powerful n8n workflow to automate personalized LinkedIn connection invitations. Integrate Google Sheets for prospect data, utilize Browserflow for safe outreach, and track connection status automatically.

I love building smart n8n automations that actually work reliably. My focus is on making everyday tasks like email, social media, and CRM workflows simpler using AI. I've shared templates in the n8n community, including a WhatsApp Expense Tracker that people really enjoy. What keeps me excited is constantly trying new things - testing fresh nodes, playing with AI tools like LangChain, and discovering creative ways to connect systems!







































