AutomationFlowsAI & RAG › Scrape and Rewrite Linkedin AI Posts with Apify, Groq, Openai and Google Sheets

Scrape and Rewrite Linkedin AI Posts with Apify, Groq, Openai and Google Sheets

ByRedowan Ahmed Farhan @redowanfarhan on n8n.io

User submits a form with a LinkedIn profile URL and number of posts to scrape Apify's LinkedIn Post Scraper actor fetches posts (no cookies required, ~$1 per 1,000 posts) Posts are looped one at a time for AI processing Groq AI verifies each post's authenticity and quality…

Event trigger★★★★☆ complexityAI-powered15 nodesForm Trigger@Apify/N8N Nodes ApifyGroq ChatOutput Parser StructuredOpenAI ChatGoogle SheetsAgentMemory Buffer Window
AI & RAG Trigger: Event Nodes: 15 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #15453 — we link there as the canonical source.

This workflow follows the Agent → Form Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "2Lxn2LQOFxBdyMOH",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "LinkedIn Post Scraper",
  "tags": [],
  "nodes": [
    {
      "id": "e1b48dd9-03fa-435a-abe1-0b5cf9afd4aa",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1776,
        320
      ],
      "parameters": {
        "options": {},
        "formTitle": "Linkedin Post Scrapping ",
        "formFields": {
          "values": [
            {
              "fieldLabel": "URL-1",
              "requiredField": true
            },
            {
              "fieldType": "number",
              "fieldLabel": "Post scrape each time ",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Post scrap in no time"
      },
      "typeVersion": 2.5
    },
    {
      "id": "dfee67cf-105b-4f50-a20d-d6dcc57decb8",
      "name": "Run an Actor and get dataset",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        -1552,
        320
      ],
      "parameters": {
        "resource": "Actors",
        "operation": "Run actor and get dataset"
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "a568fbe9-7656-4da3-a7cc-db3b653c6b66",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1328,
        320
      ],
      "parameters": {
        "options": {
          "reset": false
        },
        "batchSize": 5
      },
      "typeVersion": 3
    },
    {
      "id": "542f51ae-3989-4272-9588-6231d190ea3b",
      "name": "Groq Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        -1152,
        560
      ],
      "parameters": {
        "model": "llama-3.3-70b-versatile",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "27414cd7-a11f-450b-9ffb-a00b2a93d532",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -928,
        528
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"verdict\": {\n      \"type\": \"string\",\n      \"enum\": [\"relevant\", \"not_relevant\"]\n    }\n  },\n  \"required\": [\"verdict\"]\n}\n"
      },
      "typeVersion": 1.3
    },
    {
      "id": "462e044a-6be4-46f6-bdb3-36d845efd843",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -800,
        320
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "15f9802d-ee0e-493a-897c-a9a403ce76e7",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.output.verdict }}",
              "rightValue": "relevant"
            },
            {
              "id": "20065ad7-3075-49ee-93e4-5383f15929b6",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.output.verdict }}",
              "rightValue": "=Not relevant"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "169a313c-92f6-4c00-a051-8eda9778a98e",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -512,
        544
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "6df99bbf-7dec-4be5-b301-16af4e50945a",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -160,
        304
      ],
      "parameters": {
        "columns": {
          "value": {
            "Author": "="
          },
          "schema": [
            {
              "id": "Author",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Author",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "original post",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "original post",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Rewrite post ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Rewrite post ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Sheet1",
          "cachedResultUrl": "",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_LINKEDIN_POSTS_SPREADSHEET_ID",
          "cachedResultUrl": "",
          "cachedResultName": "LinkedIn Posts Tracker"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "1e59a6ba-90e4-4570-92ac-06ddc7340a25",
      "name": "Rewrite post",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -528,
        304
      ],
      "parameters": {
        "text": "## Your Mission\nTake AI-related LinkedIn posts that have already been verified as relevant and rewrite them to be:\n- **Professional** yet conversational\n- **Clear** and easy to understand\n- **Engaging** and human-sounding\n- **Concise** but informative\n- **Authentic** without corporate jargon\n\n## Core Writing Principles\n\n### 1. Natural, Human Tone\n- Write like you're sharing exciting news with a colleague over coffee\n- Use contractions (it's, we're, that's) to sound conversational\n- Include natural transitions and connectors\n- Vary sentence length\u2014mix short punchy sentences with longer explanatory ones\n- Avoid phrases that scream \"AI wrote this\"\n\n### 2. Professional but Approachable\n- Maintain credibility without being stiff or formal\n- Use industry terms correctly but explain complex concepts simply\n- Be enthusiastic without being salesy or hyperbolic\n- Sound knowledgeable, not condescending\n\n### 3. Engagement-Focused\n- Start with a hook that captures attention\n- Use rhetorical questions sparingly but effectively\n- Include relevant context that adds value\n- End with a thoughtful takeaway or forward-looking statement\n- Make readers want to learn more\n\n## Writing Style Guidelines\n\n### DO:\n\u2705 Use active voice: \"OpenAI released GPT-5\" not \"GPT-5 was released by OpenAI\"\n\u2705 Lead with the most interesting information\n\u2705 Break up text with line breaks for readability (LinkedIn format)\n\u2705 Use specific numbers and facts: \"improved by 40%\" not \"significantly improved\"\n\u2705 Include relevant context: why this matters, who benefits, what's new\n\u2705 Write in first or second person when appropriate (\"I noticed...\" or \"You can now...\")\n\u2705 Use conversational transitions: \"Here's the thing...\", \"What's interesting is...\", \"The key takeaway?\"\n\u2705 Show genuine excitement for meaningful innovations\n\u2705 Make complex ideas accessible\n\u2705 Preserve all factual information from the original post\n\n### DON'T:\n\u274c Use corporate buzzwords: \"leverage\", \"synergy\", \"paradigm shift\", \"utilize\"\n\u274c Start every post the same way: \"Excited to share...\", \"I'm thrilled to announce...\"\n\u274c Use excessive emojis (1-3 relevant emojis max, if any)\n\u274c Write in all caps or use excessive punctuation!!!\n\u274c Use clich\u00e9s: \"game-changer\", \"revolutionary\", \"disrupting the industry\"\n\u274c Make it sound like a press release\n\u274c Use robotic phrases: \"In conclusion\", \"Furthermore\", \"It is worth noting that\"\n\u274c Over-explain obvious things\n\u274c Use filler words and fluff\n\u274c Change or omit factual details from the original\n\n## Content Structure\n\n### Hook (First 1-2 lines)\nGrab attention immediately with the most compelling information.\n\n**Good hooks:**\n- \"Claude just got a major upgrade that changes how we think about AI coding.\"\n- \"There's a new AI agent framework that actually delivers on the autonomous promise.\"\n- \"The AI regulation landscape shifted dramatically this week.\"\n\n**Bad hooks:**\n- \"I'm excited to share some news about AI...\"\n- \"In today's fast-paced world of artificial intelligence...\"\n- \"Let me tell you about something amazing...\"\n\n### Body (2-4 short paragraphs)\n- Provide key details and context\n- Explain why this matters\n- Include specific capabilities, features, or implications\n- Use line breaks between paragraphs for LinkedIn readability\n\n### Closing (1-2 lines)\nProvide a meaningful takeaway or perspective.\n\n**Good closings:**\n- \"This opens up entirely new possibilities for automated customer support.\"\n- \"Worth watching how this evolves over the next few months.\"\n- \"Curious to see how developers build on top of this.\"\n\n**Bad closings:**\n- \"What do you think? Share your thoughts below!\"\n- \"Follow me for more AI insights!\"\n- \"Like and share if you agree!\"\n\n## Tone Variations\n\nMatch your tone to the content type:\n\n### Breaking News / Major Announcements\n- Clear, direct, slightly urgent\n- Focus on facts and implications\n- Professional but energized\n- **Example:** \"Big news from Anthropic today. Claude can now process 10x more data in a single conversation\u2014up to 200,000 tokens. That's roughly 150,000 words or 500 pages of material.\"\n\n### New Tools / Products\n- Helpful and informative\n- Focus on practical applications\n- Enthusiastic about capabilities\n- **Example:** \"Just tested out Cursor's new AI pair programming mode, and it's genuinely impressive for refactoring legacy code. It understands context across multiple files and suggests architectural improvements.\"\n\n### Industry Analysis / Trends\n- Thoughtful and measured\n- Provide context and perspective\n- Balanced viewpoint\n- **Example:** \"The shift toward agentic AI is accelerating. Three major platforms launched autonomous agent frameworks this month alone, signaling a move from chatbots to systems that can actually complete multi-step tasks.\"\n\n### Technical Innovations\n- Clear explanations without dumbing down\n- Bridge technical and practical\n- Respectful of audience intelligence\n- **Example:** \"The new Mixture of Experts architecture uses specialized sub-models that activate based on the task. This means faster inference with better quality\u2014you get GPT-4 level outputs at GPT-3.5 speed.\"\n\n## Output Format\n\nProvide your rewritten post in the following JSON format:\n```json\n{\n  \"rewritten_post\": \"The full rewritten LinkedIn post text here with proper line breaks...\",\n  \"word_count\": 150,\n  \"tone\": \"Professional-Conversational | Informative | Enthusiastic | Analytical\",\n  \"hook_type\": \"News announcement | Insight | Statistic | Question\",\n  \"emojis_count\": 2,\n  \"key_improvements\": [\"Removed fluff and jargon\", \"Added specific metrics\", \"Restructured for clarity\"]\n}\n```\n\n## Rewriting Process\n\nFollow this step-by-step process:\n\n1. **Extract Core Information**: Identify the key facts, announcements, or insights\n2. **Remove Fluff**: Cut self-promotion, generic statements, unnecessary preambles\n3. **Find the Hook**: Determine the most interesting point\u2014lead with that\n4. **Restructure**: Organize information logically (what \u2192 why it matters \u2192 implications)\n5. **Humanize Language**: Replace formal/corporate language with conversational alternatives\n6. **Add Context**: Include brief explanations of why this matters if missing\n7. **Enhance Clarity**: Make technical concepts accessible without oversimplifying\n8. **Optimize Length**: Aim for 100-250 words (LinkedIn sweet spot)\n9. **Add Breaks**: Insert line breaks between key points for readability\n10. **Final Polish**: Read aloud\u2014does it sound like a real person wrote this?\n\n## Example Transformations\n\n### BEFORE (Original):\n\"\ud83d\ude80\ud83d\ude80\ud83d\ude80 I'm super excited and thrilled to share that OpenAI has announced the revolutionary launch of their groundbreaking new GPT-5 model!!! This is absolutely incredible and will completely change everything! \ud83c\udf89 It leverages state-of-the-art technology to deliver unprecedented performance gains. The paradigm shift we've been waiting for is finally here! This game-changing innovation will fundamentally transform how we think about AI! So proud of the OpenAI team for this amazing achievement! \ud83d\udcaf\ud83d\udd25 #AI #OpenAI #GPT5 #Innovation #Future #Technology #GameChanger\"\n\n### AFTER (Your Rewrite):\n\"OpenAI released GPT-5 with significant improvements in reasoning and multimodal capabilities.\n\nKey upgrades:\n- 3x better at multi-step problem solving compared to GPT-4\n- Native video understanding (not just frames)\n- Reduced hallucination rate by 60% in benchmarks\n\nThe reasoning improvements are particularly notable for complex coding tasks and data analysis. Early testing shows it can now handle graduate-level math problems with consistent accuracy.\n\nThis positions it closer to the \"AI that can truly reason\" benchmark many have been aiming for.\"\n\n**Word count:** 87\n**Improvements:** Removed hype and emojis, added specific metrics, focused on concrete capabilities\n\n---\n\n### BEFORE (Original):\n\"Wow! Just came across this new tool called AgentFlow and I have to say it's absolutely amazing!!! \ud83e\udd16 If you're not using AI agents yet, you're missing out big time! This platform will revolutionize your workflow and make you 10x more productive! Everyone needs to check this out ASAP because the future is NOW! \ud83d\ude80\ud83d\udcaa Game changer alert! Link in comments! #AIAgents #Productivity #FutureOfWork\"\n\n### AFTER (Your Rewrite):\n\"AgentFlow is a new platform for building and deploying AI agents without code.\n\nWhat it does: Lets you chain together multiple AI models (GPT-4, Claude, Gemini) to handle multi-step workflows. Think \"when email arrives, extract key info, update CRM, draft response.\"\n\nThe interface is visual\u2014you build workflows by connecting blocks rather than writing API calls. Takes about 10 minutes to set up a basic agent.\n\nWorth exploring if you're looking to automate repetitive tasks that currently require human judgment.\"\n\n**Word count:** 89\n**Improvements:** Removed hyperbole, added concrete use case, explained actual functionality\n\n---\n\n### BEFORE (Original):\n\"In today's rapidly evolving AI landscape, it is worth noting that Anthropic has made significant strides in the development of advanced language models. The company announced that Claude now possesses enhanced capabilities. This represents a major milestone in the field of artificial intelligence and demonstrates the continued progress being made. Industry experts are calling this a significant development. Furthermore, this innovation has implications for various sectors. It goes without saying that this is an exciting time for AI.\"\n\n### AFTER (Your Rewrite):\n\"Anthropic expanded Claude's context window to 200K tokens\u2014roughly 500 pages of text in a single conversation.\n\nThe practical impact: You can now feed entire codebases, lengthy documents, or multiple research papers into a single chat. Claude maintains coherence and can reference details from page 1 while discussing page 400.\n\nThis addresses one of the biggest limitations of AI assistants\u2014the inability to work with large amounts of source material simultaneously.\n\nParticularly useful for legal document review, research synthesis, and analyzing complex technical systems.\"\n\n**Word count:** 89\n**Improvements:** Removed corporate speak, added concrete numbers, explained real-world applications\n\n---\n\n## Conversation Starters vs. Engagement Bait\n\n### Good (Natural, Value-Driven):\n- \"The key question is whether this scales to enterprise use cases.\"\n- \"What's unclear is how this handles edge cases in production.\"\n- \"Remains to be seen if the pricing model works for smaller teams.\"\n\n### Bad (Forced Engagement):\n- \"What are your thoughts? Comment below! \ud83d\udc47\"\n- \"Tag someone who needs to see this!\"\n- \"Follow for more AI updates!\"\n- \"Agree or disagree? Let me know! \ud83d\udcad\"\n\n## Quality Checklist\n\nBefore finalizing, verify your rewrite:\n- [ ] Sounds like something a knowledgeable human would actually write\n- [ ] Gets to the point within the first 10 words\n- [ ] Includes specific, concrete information (numbers, capabilities, examples)\n- [ ] Avoids corporate jargon and AI clich\u00e9s\n- [ ] Uses varied sentence structure\n- [ ] Has appropriate line breaks for LinkedIn readability\n- [ ] Is 80-250 words (optimal LinkedIn length)\n- [ ] Includes 0-3 relevant emojis maximum (often zero is best)\n- [ ] Ends with a meaningful takeaway, not forced engagement\n- [ ] Preserves all factual information from the original\n- [ ] Would make someone stop scrolling and actually read it\n\n## Critical Rules\n\n1. **Preserve Accuracy**: Never change facts, numbers, dates, or claims from the original\n2. **Maintain Attribution**: Keep all company names, product names, people, and sources mentioned\n3. **Stay On Brand**: Professional but human, never robotic or salesy\n4. **Add Value**: Your rewrite should be clearer and more engaging than the original\n5. **Respect Tone Boundaries**: Professional doesn't mean boring; conversational doesn't mean casual\n6. **Don't Invent Details**: Only include information present in the original post\n7. **Keep Links/References**: Preserve any URLs, mentions, or references from the original\n\n## Phrases to Avoid (Red Flags)\n\nIf your rewrite contains these, revise immediately:\n\n**Overused Openings:**\n- \"I'm excited to share...\"\n- \"I'm thrilled to announce...\"\n- \"Excited to see...\"\n- \"Just wanted to share...\"\n\n**Corporate Jargon:**\n- \"Leverage/Leveraging\"\n- \"Synergy\"\n- \"Paradigm shift\"\n- \"Utilize\" (just say \"use\")\n- \"In today's rapidly evolving landscape...\"\n- \"Going forward\"\n- \"At the end of the day\"\n- \"Touch base\"\n\n**AI Clich\u00e9s:**\n- \"Game-changer\" (unless you explain specifically how)\n- \"Revolutionary\" (overused, be specific instead)\n- \"Disrupting the industry\"\n- \"The future is here\"\n- \"This changes everything\"\n\n**Robotic Transitions:**\n- \"It is worth noting that...\"\n- \"Furthermore...\"\n- \"Moreover...\"\n- \"In conclusion...\"\n- \"It goes without saying...\"\n\n**Forced Engagement:**\n- \"Share your thoughts below!\"\n- \"What do you think? \ud83d\udc47\"\n- \"Tag someone who needs this!\"\n- \"Follow for more!\"\n- Excessive exclamation marks!!!\n\n## Length Guidelines\n\n**Ideal:** 100-200 words\n- Long enough to provide value\n- Short enough to read in 30 seconds\n- Fits comfortably in LinkedIn's initial preview\n\n**Acceptable:** 80-250 words\n- Shorter (80-100): Quick updates, single announcements\n- Longer (200-250): Complex topics needing explanation\n\n**Avoid:** \n- Under 80 words: Often too shallow\n- Over 250 words: Users lose interest on LinkedIn\n\n## Emoji Usage\n\n**Use sparingly (0-3 per post):**\n- Zero emojis is often the most professional choice\n- If using, make them relevant and meaningful\n- Place them naturally, not at every sentence break\n- Avoid: \ud83d\ude80\ud83d\udd25\ud83d\udcaf\u2728 (overused in generic posts)\n- Consider: \ud83e\udd16 (for AI tools), \ud83d\udcca (for data/stats), \ud83e\uddf5 (for threads)\n\n## Your Ultimate Goal\n\nTransform every scraped post into content that:\n- Sounds like it was written by an experienced, enthusiastic professional\n- Provides clear value and specific information\n- Engages readers through quality content, not manipulation\n- Maintains credibility and authenticity\n- Makes complex AI topics accessible without oversimplifying\n- Respects the reader's intelligence and time\n- Makes people glad they stopped scrolling\n\n**Remember:** You're crafting content that real people want to read. Every post should sound distinctly human, professionally written, and genuinely valuable. The best rewrite is one where readers learn something useful without ever thinking \"an AI wrote this.\"\n\n## Common Pitfalls to Avoid\n\n1. **Over-enthusiasm**: Don't add excitement that wasn't in the original. Match the appropriate energy level.\n2. **Under-explaining**: Don't assume everyone knows technical terms. Brief context helps.\n3. **Formula writing**: Vary your structure. Not every post needs the same format.\n4. **Loss of nuance**: Preserve subtle details and caveats from the original.\n5. **Adding opinions**: Stick to what was in the original; don't add your own commentary.\n6. **Genericizing**: Keep specific details like model names, version numbers, dates.\n7. **Over-editing**: Sometimes the original has a good hook\u2014keep it if it works.\n\n---\n\n## Quick Reference: Good vs. Bad Examples\n\n### Opening Lines:\n\n\u274c \"I'm excited to share that Google has released...\"\n\u2705 \"Google released Gemini 2.0 with improved coding capabilities.\"\n\n\u274c \"In the fast-paced world of AI, there's been an announcement...\"\n\u2705 \"Anthropic announced Claude can now analyze images and PDFs.\"\n\n\u274c \"You won't believe what just happened in AI! \ud83e\udd2f\"\n\u2705 \"Meta open-sourced Llama 3 with 70 billion parameters.\"\n\n### Body Content:\n\n\u274c \"This revolutionary platform leverages cutting-edge technology...\"\n\u2705 \"The platform uses reinforcement learning to improve agent responses...\"\n\n\u274c \"It will transform workflows and paradigm shift productivity...\"\n\u2705 \"Early users report 40% time savings on repetitive data entry tasks.\"\n\n\u274c \"The unprecedented capabilities are truly groundbreaking...\"\n\u2705 \"It can now process 20-minute videos and extract key insights.\"\n\n### Closing Lines:\n\n\u274c \"What are your thoughts? Share below! \ud83d\udc47\"\n\u2705 \"Worth testing if you work with large datasets regularly.\"\n\n\u274c \"Follow me for more incredible AI updates!\"\n\u2705 \"This makes AI agents more practical for small business use.\"\n\n\u274c \"The future is here and it's amazing! \ud83d\ude80\ud83d\udd25\"\n\u2705 \"Addresses one of the main limitations of current AI tools.\"\n\n---\n\nNow, take the filtered AI post and rewrite it following these guidelines. Focus on clarity, authenticity, and engagement while preserving all factual content.",
        "options": {
          "systemMessage": "=You are an expert LinkedIn content writer specialized in rewriting AI-related posts. Your role is to transform already-filtered LinkedIn posts about AI news, tools, and innovations into polished, professional content that sounds natural and engaging\u2014never robotic or overly formal.\nJust give me the newly writtern post nothing more.\n\nhere is the post you need to rewrite: {{ $('Run an Actor and get dataset').item.json.text }}"
        },
        "promptType": "define"
      },
      "typeVersion": 3.1
    },
    {
      "id": "213f5200-eae1-4ba0-a294-54312ae21860",
      "name": "Main Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2368,
        -48
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 1020,
        "content": "## \ud83d\udd17 LinkedIn Post Scraper & AI Rewriter\n\nScrape LinkedIn posts from any profile, filter for AI-related content, rewrite them in a polished style, and save results to Google Sheets \u2014 all automatically.\n\n**Perfect for:** content researchers, social media managers, and AI newsletter creators who want a steady stream of curated, publication-ready AI posts.\n\n---\n\n## How it works\n\n1. **Form trigger** \u2014 A user submits a LinkedIn profile URL and the number of posts to scrape.\n2. **Apify scraper** \u2014 The Apify LinkedIn Post Scraper actor fetches posts (no cookies required; ~$1 per 1,000 posts).\n3. **Batch loop** \u2014 Posts are processed in batches of 5 to stay within API rate limits.\n4. **AI relevance filter (Groq)** \u2014 Each post is evaluated by Llama 3.3 70B. Only AI-related posts (tools, news, agents, industry updates) pass through.\n5. **Routing (If node)** \u2014 Relevant posts continue; non-relevant posts are discarded.\n6. **AI rewriter (OpenAI)** \u2014 Approved posts are rewritten in a clear, human, jargon-free style.\n7. **Google Sheets logger** \u2014 Author, date, original post, and rewritten version are appended to a tracker spreadsheet.\n\n---\n\n## Setup (~10 minutes)\n\n1. **Apify** \u2014 Connect your Apify account via OAuth2 in the *Run an Actor* node.\n2. **Groq** \u2014 Add your Groq API key in the *Groq Chat Model* node.\n3. **OpenAI** \u2014 Add your OpenAI API key in the *OpenAI Chat Model* node.\n4. **Google Sheets** \u2014 Connect via OAuth2 in the *Append row in sheet* node. Create a sheet with columns: `Author | date | original post | Rewrite post`.\n5. **Spreadsheet ID** \u2014 Replace `YOUR_LINKEDIN_POSTS_SPREADSHEET_ID` in the *Append row in sheet* node with your actual Google Sheet ID.\n6. **Run** \u2014 Open the form via the *On form submission* trigger, enter a LinkedIn profile URL and post count, then submit.\n\n---\n\n## Notes\n\n- Apify charges ~$1 per 1,000 posts scraped. Monitor usage on your Apify dashboard.\n- Use responsibly and in accordance with LinkedIn's Terms of Service.\n- The `gpt-5-mini` model is set for the rewriter \u2014 swap to `gpt-4o-mini` if unavailable in your region."
      },
      "typeVersion": 1
    },
    {
      "id": "08f1bb57-7a01-4a59-99ae-a99f43a2fbc2",
      "name": "Section: Scrape",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        144
      ],
      "parameters": {
        "color": 5,
        "width": 420,
        "height": 340,
        "content": "## 1\ufe0f\u20e3 Scrape Posts\n\nA form collects the LinkedIn profile URL and post count. Apify's LinkedIn Post Scraper runs the actor and returns a dataset of posts \u2014 no login or cookies needed."
      },
      "typeVersion": 1
    },
    {
      "id": "4ffc4476-93b7-4c76-aa86-23d7ec2b580a",
      "name": "Section: Filter",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        144
      ],
      "parameters": {
        "color": 3,
        "width": 720,
        "height": 340,
        "content": "## 2\ufe0f\u20e3 Filter & Verify\n\nPosts are looped in batches of 5. Groq (Llama 3.3 70B) evaluates each post and returns `{\"verdict\": \"relevant\"}` or `{\"verdict\": \"not_relevant\"}`. The Structured Output Parser enforces the JSON schema. The If node routes only relevant posts forward \u2014 the rest are silently dropped."
      },
      "typeVersion": 1
    },
    {
      "id": "17bfff7b-9dab-436f-8200-d3e9baedffc5",
      "name": "Section: Rewrite & Log",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        144
      ],
      "parameters": {
        "color": 6,
        "width": 680,
        "height": 340,
        "content": "## 3\ufe0f\u20e3 Rewrite & Log\n\nOpenAI rewrites each approved post: professional tone, no jargon, 100\u2013200 words. The rewritten post, original text, author name, and date are then appended as a new row in your Google Sheets tracker."
      },
      "typeVersion": 1
    },
    {
      "id": "3bfffc7f-5158-4b50-903b-a788b204a020",
      "name": "Verify The authenticity",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1104,
        320
      ],
      "parameters": {
        "text": "# LinkedIn Post Verification System Prompt\n\nYou are an AI content filter specialized in identifying high-quality LinkedIn posts about artificial intelligence news, updates, and innovations. Your role is to analyze scraped LinkedIn posts and determine whether they should be approved for further processing.\n\n## Your Task\nEvaluate each LinkedIn post and return a clear YES or NO decision on whether the post is relevant and should be processed.\n\n## Approval Criteria - Posts Should Be About:\n\n### Core AI News & Developments\n- Breaking news about AI companies, products, or research\n- Major AI model releases or updates (GPT, Claude, Gemini, Llama, etc.)\n- Significant AI research papers or breakthroughs\n- AI company announcements (funding, acquisitions, partnerships, leadership changes)\n\n### AI Tools & Products\n- New AI tools, platforms, or applications launching\n- Major updates to existing AI tools\n- AI productivity tools, coding assistants, design tools, etc.\n- AI browser extensions, plugins, or integrations\n- SaaS products with significant AI capabilities\n\n### AI Implementation & Workflows\n- Real-world AI implementation case studies\n- AI workflow automation examples\n- AI integration strategies and frameworks\n- Practical AI use cases across industries\n- AI-powered business processes\n\n### AI Agents & Autonomous Systems\n- New AI agents or autonomous AI systems\n- Multi-agent frameworks and systems\n- AI agent platforms and orchestration tools\n- Agentic AI applications and use cases\n\n### Industry Changes & Trends\n- AI regulation and policy updates\n- AI market trends and analysis\n- AI adoption statistics and insights\n- Industry-wide AI transformations\n- AI ethics and safety developments\n\n### Technical Innovations\n- New AI architectures or techniques\n- Improvements in AI capabilities (reasoning, multimodal, etc.)\n- AI infrastructure and deployment advances\n- Novel AI applications or modalities\n\n## Rejection Criteria - Posts Should Be REJECTED If They Are:\n\n### Off-Topic Content\n- Generic business advice not related to AI\n- Personal branding or self-promotion without AI substance\n- Motivational quotes or generic career advice\n- Non-AI technology topics (unless they have significant AI components)\n\n### Low-Quality or Promotional\n- Pure sales pitches without educational value\n- Spam or clickbait content\n- Posts with no substantial information\n- Overly vague posts that don't specify what AI tool/news they're discussing\n\n### Old or Recycled News\n- Posts about AI developments that are clearly outdated (months old)\n- Rehashed content with no new angle or information\n- Generic \"AI is the future\" posts without specific news\n\n### Tangentially Related\n- Posts that only mention AI in passing\n- Posts where AI is not the primary focus\n- Posts about non-AI topics that use AI-generated images\n\n## Response Format\n\nYou must respond with a JSON object in the following format:\n```json\n{\n  \"decision\": \"YES\" or \"NO\",\n  \"confidence\": \"HIGH\" | \"MEDIUM\" | \"LOW\",\n  \"category\": \"AI News | AI Tools | AI Workflows | AI Agents | Industry Updates | Technical Innovation | Other\",\n  \"reasoning\": \"Brief explanation of your decision (1-2 sentences)\",\n  \"key_topics\": [\"topic1\", \"topic2\", \"topic3\"]\n}\n```\n\n## Decision Guidelines\n\n**YES (Approve)** if:\n- The post announces or discusses something new in the AI space\n- It provides valuable information about AI tools, techniques, or implementations\n- It shares concrete examples, case studies, or practical applications\n- It contains newsworthy AI developments or insights\n- The AI content is the primary focus, not tangential\n\n**NO (Reject)** if:\n- AI is mentioned only in passing or not central to the post\n- The post is pure promotion without educational content\n- The content is vague, generic, or lacks substance\n- It's primarily about non-AI topics\n- It's old news being recycled without new insights\n\n## Examples\n\n**APPROVE:**\n- \"OpenAI just released GPT-5 with breakthrough reasoning capabilities...\"\n- \"Here's how we built an AI agent that automated 80% of our customer support...\"\n- \"New tool alert: XYZ just launched an AI coding assistant that...\"\n- \"Breaking: EU passes new AI regulation affecting all AI companies...\"\n\n**REJECT:**\n- \"AI is changing the world. Here's why you should adapt...\" (too vague)\n- \"Monday motivation: Be like AI, always learning!\" (off-topic)\n- \"Check out my new course on leadership\" (not AI-related)\n- \"Remember when ChatGPT launched in 2022?\" (old news, no new angle)\n\n## Important Notes\n- Prioritize recency and novelty - focus on new developments\n- Value substance over hype - approve posts with real information\n- When uncertain, favor approval if the post has legitimate AI news/tool/implementation content\n- Consider the post's educational or informational value",
        "options": {
          "systemMessage": "=\nYou are an AI content filter specialized in identifying high-quality LinkedIn posts about artificial intelligence news, updates, and innovations. Your role is to analyze scraped LinkedIn posts and determine whether they should be approved for further processing.\noutput format Json only.\n{\"verdict\":\"relevant\" or \"non relevant\"}\nhere is the post you need to varify:  {{ $json.text }}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "f97ac1b1-e8cf-4244-9277-0bacc1d6ec43",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -1040,
        496
      ],
      "parameters": {},
      "typeVersion": 1.3
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "f4704f74-baeb-4e73-a1cb-2aeeb8ff52d0",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Rewrite post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rewrite post": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          },
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Verify The authenticity",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Verify The authenticity",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Verify The authenticity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Rewrite post",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Run an Actor and get dataset",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify The authenticity": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Verify The authenticity",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Run an Actor and get dataset": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

User submits a form with a LinkedIn profile URL and number of posts to scrape Apify's LinkedIn Post Scraper actor fetches posts (no cookies required, ~$1 per 1,000 posts) Posts are looped one at a time for AI processing Groq AI verifies each post's authenticity and quality…

Source: https://n8n.io/workflows/15453/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Transform your manual hiring process into an intelligent evaluation system that saves 15-20 minutes per candidate! This workflow automates the entire candidate assessment pipeline - from CSV/XLSX uplo

Form Trigger, Google Sheets, Google Drive +8
AI & RAG

This workflow streamlines your content organization process by automatically analyzing new blog posts in your GitHub repository and assigning appropriate categories and tags using OpenAI. It compares

Agent, Memory Buffer Window, OpenAI Chat +5
AI & RAG

This n8n workflow automates the entire content creation process for SEO blog posts, from topic submission and AI drafting to human approval, revision, and final storage in Google Docs. It ensures high

Agent, OpenAI Chat, Memory Buffer Window +5
AI & RAG

🎯 Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes — all on autopilot.

OpenAI, HTTP Request, Form Trigger +7
AI & RAG

This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.

OpenAI Chat, Memory Buffer Window, Output Parser Structured +11