AutomationMart
Home/Browse/Scrape high-engagement LinkedIn posts and auto-post with Gemini images
n8n

Scrape high-engagement LinkedIn posts and auto-post with Gemini images

n8nn8n17 modulesv1.0
agentaggregatecodefiltergoogleGeminigoogleSheetsgoogleSheetsTriggerhttpRequestlinkedInlmChatGoogleGeminioutputParserStructuredscheduleTriggersplitInBatcheswait

Who's it for This workflow is ideal for: - Content creators who want to replicate successful LinkedIn strategies - Social media managers monitoring competitor content performance - Marketing teams analyzing trending topics in their industry - Personal brands looking to create data-driven content - Agencies managing multiple LinkedIn accounts What it does This comprehensive workflow automates the entire LinkedIn content lifecycle: it scrapes viral posts from target accounts, analyzes engagement p

At a glance

Scrape high-engagement LinkedIn posts and auto-post with Gemini images is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects agent, aggregate, code, filter. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
agent, aggregate, code, filter, googleGemini, googleSheets
Modules
17
Price
Free
Version
v1.0
Scrape high-engagement LinkedIn posts and auto-post with Gemini images workflow diagram

About this workflow

Who's it for This workflow is ideal for: - Content creators who want to replicate successful LinkedIn strategies - Social media managers monitoring competitor content performance - Marketing teams analyzing trending topics in their industry - Personal brands looking to create data-driven content - Agencies managing multiple LinkedIn accounts What it does This comprehensive workflow automates the entire LinkedIn content lifecycle: it scrapes viral posts from target accounts, analyzes engagement patterns, identifies trending topics, generates original AI-powered content based on those trends, creates accompanying images, and automatically publishes to your LinkedIn profile or company page. How it works Phase 1: Data Collection (Runs every 12 hours) - Scheduler triggers the workflow twice daily - Fetches LinkedIn profile URLs from Google Sheets - Processes profiles in batches of 3 to respect API limits - Uses Apify API to scrape recent posts from each profile - Adds 3-second delays between requests to avoid rate limiting - Filters for high-engagement posts (20+ likes, comments, or reposts) - Saves viral posts to Google Sheets with full metadata Phase 2: Content Generation (Triggered by new data) - Monitors Google Sheets for new viral posts every minute - Filters posts published within the last 3 days that haven't been analyzed - Aggregates trending content into a single dataset - Analyzes patterns using Google Gemini AI to identify: - Common themes and topics - Engagement triggers and hooks - Successful content structures - Trending hashtags and formats - Generates original LinkedIn post with proper formatting - Creates AI image prompt optimized for minimal text - Generates professional image using Google Imagen - Publishes complete post to your LinkedIn account - Marks analyzed posts as complete to prevent duplication Setup steps 1. Configure Google Sheets - Create a new Google Sheet with two tabs: - Tab 1: "usernames & links" - Add LinkedIn profile URLs you want to monitor - Tab 2: "scrape data" - Leave empty (auto-populated by workflow) - Connect your Google Sheets credentials in both nodes - Replace all instances of YOURGOOGLESHEETID with your actual sheet ID - Replace SHEETGID values with your actual sheet GIDs 2. Set up Apify API - Sign up for Apify account and get API token - Replace YOURAPIFYAPITOKEN in "Scrape LinkedIn Posts API" node - Note: Apify has free tier with limited requests 3. Configure Google Gemini credentials - Obtain Google PaLM API credentials - Add credentials to both "Google Gemini Chat Model" and "Generate an image" nodes 4. Set up LinkedIn publishing - Connect your LinkedIn credentials in "Publish to LinkedIn" node - If posting as organization, replace YOURLINKEDINORGANIZATIONID with your company page ID - If posting as individual, change "postAs" parameter to "person" 5. Configure scheduling - Default schedule: every 12 hours - Adjust "LinkedIn Content Automation Scheduler" trigger if needed - Consider your API rate limits when changing frequency 6. Test the workflow - Manually trigger Phase 1 to scrape posts - Verify data appears in Google Sheets "scrape data" tab - Wait for Phase 2 trigger or manually activate it - Check that content is generated and published correctly - Verify posts are marked as analyzed in Google Sheets Requirements - Google Sheets API access (free) - Google Sheets Trigger OAuth2 (free) - Apify API token (free tier available, $49/month for more) - Google PaLM/Gemini API key (pay-per-use pricing) - LinkedIn OAuth credentials (free) How to customize Adjust scraping targets: - Add more LinkedIn profile URLs to your Google Sheets - Change batch size in "Process Profiles in Batches" (default: 3) - Modify post limit per profile in Apify API call (default: 1 post) Modify engagement filters: - Edit "Filter High-Engagement Posts" node thresholds - Default: 20+ likes OR 20+ comments OR 20+ reposts - Adjust based on your niche's typical engagement rates - Add additional criteria like views or impressions Customize content analysis window: - Change "Filter Recent Posts (3 Days)" to analyze different timeframes - Options: 24 hours for fast-moving trends, 7 days for broader patterns - Balance between recency and data volume Refine AI content generation: - Edit system prompt in "LinkedIn Content Strategy AI" node - Adjust content length, tone, or style preferences - Add industry-specific guidelines - Include brand voice requirements - Modify hashtag strategy Customize image generation: - Edit image prompt structure in AI prompt - Change visual style, colors, or composition - Adjust for brand guidelines - Modify dimensions or aspect ratios Change posting schedule: - Adjust "LinkedIn Content Automation Scheduler" frequency - Consider optimal posting times for your audience - Balance between content quality and posting frequency - Coordinate with other marketing activities Enhance data collection: - Increase posts per profile in Apify settings - Add more profile URLs to monitor - Implement competitor tracking - Track additional metrics like impressions or click-through rates Add notifications: - Connect Slack/Email nodes after successful posts - Set up alerts for high-performing content - Create reports of analyzed trends - Monitor API usage and errors

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Build an IT support assistant chatbot leveraging existing support portal

This n8n template demonstrates how you can leverage existing support site search to power your Support Chatbots and agents. Building a support chatbot need not be complicated! If building and indexing vector stores or duplicating data isn't necessarily your thing, an alternative implementation of the RAG approach is to leverage existing knowledge-bases such as support portals. In this way, document management and maintenance of your support agent is significantly reduced. Disclaimer: This templa

Free

Automate LinkedIn posts to email newsletter with Apify and GPT-4

Who's it for This workflow is ideal for content creators, marketers, and business professionals who want to automatically repurpose their LinkedIn content into email newsletters. If you're actively posting on LinkedIn and want to maximize your content's reach by delivering it directly to your email subscribers, this automation saves you hours of manual work each week. What it does This workflow automatically transforms your latest LinkedIn posts into professionally formatted email newsletters. I

Free

Build your own counseling chatbot on LINE to support mental health conversations

Are you looking to create a counseling chatbot that provides emotional support and mental health guidance through the LINE messaging platform ? This guide will walk you through connecting LINE with powerful AI language models like GPT-4 to build a chatbot that supports users in navigating their emotions, offering 24/7 conversational therapy and accessible mental health resources . By leveraging LINE's webhook integration and Azure OpenAI , this template allows you to design a chatbot that is bot

Free

Weather forecast email - receive automated weather forecasts daily

Video Introduction []( Want to automate your inbox or need a custom workflow? 📞 Book a Call | 💬 DM me on Linkedin --- Workflow Overview This workflow automatically delivers a daily weather forecast to your email inbox every morning at 7:00 AM. It demonstrates practical API-to-API integration by connecting the Meteosource weather API directly to Gmail using n8n's HTTP Request node, without requiring a pre-built Meteosource integration. Why This Workflow is Valuable Instead of manually checking we

Free

Extract and save invoice data from Google Drive to Sheets with Dumpling AI

Who is this for? This workflow is perfect for operations teams, accountants, e-commerce businesses, or finance managers who regularly process digital invoices and need to automate data extraction and record-keeping. --- What problem is this workflow solving? Manually reading invoice PDFs, extracting relevant data, and entering it into spreadsheets is time-consuming and error-prone. This workflow automates that process—watching a Google Drive folder, extracting structured invoice data using Dumpl

Free

Backup your workflows to GitHub

Based on Jonathan's work. Check out his templates. How it works This workflow will backup your workflows to GitHub. It uses the n8n API node to export all workflows. It then loops over the data, checks in GitHub to see if a file exists that uses the credential's ID. Once checked it will: - update the file on GitHub if it exists; - create a new file if it doesn't exist; - ignore if it's the same. Who is this for? People wanting to backup their workflows outside the server for safety purposes or t

Free

Scrape Indeed job listings for hiring signals using Bright Data and LLMs

Scrape Indeed Job Listings for Hiring Signals Using Bright Data and LLMs How the flow runs 1. Fill the form with job position you're hunting for. 2. Bright data's scraper will scrape Indeed based on your requirments. 3. Workflow waits for the snapshot. 4. Data returns as JSON. 5. Jobs append to Google Sheets. 6. Each row goes to an LLM to analyze if you're a good fit for the job (based on your prompts). 7. The LLMswrites YES or NO next to each job opportunity, helping you find job posts tha

Free

Organize email attachments into Google Drive folders by company with Gmail & Sheets

Automated Email Attachment Organizer Automatically process labeled emails with attachments into organized Google Drive folders --- Who Is This For? - Teams or Individuals needing to: - Automatically sort invoices, receipts, and files. - Organize client documents by date. - Verify sender emails against a whitelist. - Timestamp files to avoid duplicate names. --- What Does This Workflow Solve? - 🕒 Manual Email Sorting: Saves time by automating the organization of email attachments. - 📂 Disorga

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free