8
n8n 中文网amn8n.com

使用Bright Data + Google Gemini分析竞争对手LinkedIn帖子并导入Google Sheets

中级

这是一个Market Research, AI Summarization领域的自动化工作流,包含 15 个节点。主要使用 Set, GoogleSheets, ManualTrigger, Agent, BrightData 等节点。 使用Bright Data + Google Gemini分析竞争对手LinkedIn帖子并导入Google Sheets

前置要求
  • Google Sheets API 凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "741fe657cb1cf25e93c97c159943779bc83f3af267584292298f2b35e660e8e8",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "089eafd4-4423-4b01-a485-834677db5599",
      "name": "自动修复输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        816,
        224
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "b2eb7bf1-66e1-4e19-8287-892855249b83",
      "name": "Google Gemini聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        816,
        432
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "F7LQ42cm1uM82fqY",
          "name": "Google Gemini(PaLM) Api account 3"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0ca67eb7-7184-4345-be33-39c3b2c4bb3d",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1008,
        432
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"summary\": \"This LinkedIn post recaps highlights from the FWD: London event. Instead of listing them directly, it encourages viewers to watch a highlight video to experience the energy and insights from the event firsthand.\",\n  \"post_intent\": \"Event recap\",\n  \"engagement_level\": \"Medium\",\n  \"engagement_reason\": \"With 107 likes and 2 comments, the post shows moderate engagement for a brand with over 200,000 followers.\",\n  \"audience_insight\": \"The tone is enthusiastic and community-driven, targeting marketers and event attendees interested in industry trends and networking.\",\n  \"marketing_takeaway\": \"Use video content with real attendee testimonials to create an authentic event recap that resonates emotionally with the audience.\"\n}\n"
      },
      "typeVersion": 1.3
    },
    {
      "id": "b86899c5-dee9-4338-83fe-c45c31ed4bce",
      "name": "Google Gemini 聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        640,
        224
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "n9BHNq14xYTWe3L5",
          "name": "Google Gemini(PaLM) Api account 2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "85f6f87b-068f-4dc2-9c11-63e7ca70495b",
      "name": "开始分析 (手动触发器)",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7c8a2664-5cb4-486c-8d30-8249e93160e9",
      "name": "设置 LinkedIn 帖子 URL",
      "type": "n8n-nodes-base.set",
      "position": [
        192,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c602fcde-572b-43c9-b9e3-bb1ae11d3b22",
              "name": "post URL",
              "type": "string",
              "value": "https://www.linkedin.com/posts/intuitmailchimp_could-we-list-all-the-highlights-from-fwd-activity-7340710211919200257-nX-0?utm_source=share&utm_medium=member_desktop&rcm=ACoAAFdhxw8BWbiroAhA6UhfplFYDs0hSzkiyWU"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "76238a8c-14bb-4f5d-800f-77d1e2e5a277",
      "name": "抓取 LinkedIn 帖子详情",
      "type": "@brightdata/n8n-nodes-brightdata.brightData",
      "position": [
        528,
        0
      ],
      "parameters": {
        "urls": "=[{\"url\":\"{{ $json[\"post URL\"] }}\"}]",
        "resource": "webScrapper",
        "dataset_id": {
          "__rl": true,
          "mode": "list",
          "value": "gd_lyy3tktm25m4avu764",
          "cachedResultName": "LinkedIn posts"
        },
        "requestOptions": {}
      },
      "credentials": {
        "brightdataApi": {
          "id": "lDByWafjWjWDBc6n",
          "name": "BrightData account 3"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "170d8bff-7b8a-4a67-bf89-ad780632bfc4",
      "name": "帖子分析器代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        704,
        0
      ],
      "parameters": {
        "text": "=You are a social media strategist analyzing LinkedIn posts for competitive intelligence.\n\nHere is the data for one post:\n\nCompany Name: {{ $json.user_id }}\nCompany Profile URL: {{ $json.use_url }}\nFollowers: {{ $json.user_followers }}\n\nPost Title: {{ $json.title }}\nPost Text: {{ $json.post_text }}\nPost URL: {{ $json.url }}\nPosted Date: {{ $json.date_posted }}\n\nLikes: {{ $json.num_likes }}\nComments: {{ $json.num_comments }}\n\nTop Comment:\n\"{{ $json.top_visible_comments[0].comment }}\" by {{ $json.top_visible_comments[0].user_name }} ({{ $json.top_visible_comments[0].user_title }})\n{% endfor %}\n\nNow, please answer the following:\n\n1. Summary: Summarize the content of this post in 2–3 sentences.\n2. Post Intent: What is the likely goal of this post? (e.g., product promotion, event recap, employer branding, thought leadership, etc.)\n3. Engagement Analysis: Based on the number of likes and comments, how would you rate the engagement (Low / Medium / High)? Why?\n4. Audience Insight: What can we infer about the company’s target audience or tone of communication from this post?\n5. Marketing Takeaway: What is one actionable idea a competitor brand can learn from this post?\n",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.1
    },
    {
      "id": "8d3e1161-812c-40cf-aec5-aacc0b8df594",
      "name": "保存分析到 Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1136,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "Summary": "={{ $json.output.summary }}",
            "Post Intent": "={{ $json.output.post_intent }}",
            "Audience Insight": "={{ $json.output.audience_insight }}",
            "Engagement Level": "={{ $json.output.engagement_level }}",
            "Engagement Reason": "={{ $json.output.engagement_reason }}",
            "Marketing Takeaway": "={{ $json.output.marketing_takeaway }}"
          },
          "schema": [
            {
              "id": "Summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Post Intent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Post Intent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Engagement Level",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Engagement Level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Engagement Reason",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Engagement Reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Audience Insight",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Audience Insight",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Marketing Takeaway",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Marketing Takeaway",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qGGC5ey8UcltA0zCDibxhECutXC9-F7bh_NwtYE4WaM/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1qGGC5ey8UcltA0zCDibxhECutXC9-F7bh_NwtYE4WaM",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qGGC5ey8UcltA0zCDibxhECutXC9-F7bh_NwtYE4WaM/edit?usp=drivesdk",
          "cachedResultName": "Competitor's post analyzer"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "mDYlDMn1RvTGfyvI",
          "name": "Google Sheets account 4"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "de5cdf4d-dcbf-46f3-9319-2bc27bdbd73b",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -944
      ],
      "parameters": {
        "color": 5,
        "width": 352,
        "height": 1136,
        "content": "## 🟩 **第一部分:🔗 URL 输入和触发器**"
      },
      "typeVersion": 1
    },
    {
      "id": "7f46600f-5845-42e7-ab16-11b647e33b0b",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -1152
      ],
      "parameters": {
        "color": 3,
        "width": 512,
        "height": 1328,
        "content": "## 🟨 **Section 2: 🧠 Data Extraction + AI Analysis**\n\n### 🧩 Nodes Involved:\n\n* `📦 Scrape LinkedIn Post Details (Bright Data)`\n* `🤖 Analyze Post with AI Agent`\n\n  * `🔮 Gemini Model (Chat)`\n  * `🧰 Auto-Fix Output JSON`\n  * `🧾 Structured Output Parser`\n\n### 🧠 What's Happening:\n\nThis is the **core engine** of the automation. First, Bright Data scrapes all the post content — including text, comments, engagement stats, and media. Then, an AI agent (powered by Google Gemini) analyzes this post using a smart prompt to return **insightful and structured output**.\n\n### ⚙️ Step-by-Step:\n\n1. **🔍 Scrape**: Bright Data extracts all key metadata from the LinkedIn post.\n2. **🧠 AI Agent**: The extracted data is passed to an AI model (Gemini), which:\n\n   * Summarizes the post\n   * Identifies its purpose (event, promotion, etc.)\n   * Rates engagement\n   * Infers target audience\n   * Suggests a marketing takeaway\n3. **🛠 Output Parser**: The response is auto-validated and structured into clean JSON.\n\n### 💡 How Beginners Can Use It:\n\n* Even if you don’t know how AI or APIs work, this section handles all the **complex reasoning**.\n* Just sit back and let AI tell you:\n\n  * What your competitors are posting\n  * How engaging those posts are\n  * What lessons you can learn from them\n* It's perfect for **content strategists, social media teams, or consultants**.\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "be30c642-32ec-4257-acf0-9f232cc83e03",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -928
      ],
      "parameters": {
        "color": 6,
        "width": 272,
        "height": 1104,
        "content": "## 🟦 **Section 3: 📊 Save to Sheet**\n\n### 📘 Node Involved:\n\n* `📤 Save Analysis to Google Sheet`\n\nCopy this spreadsheet:\nhttps://docs.google.com/spreadsheets/d/1EKF6MLQN9suxGDzqlkARkDnSA-x75IpJbB0PXIx_E1Q/edit?usp=sharing\n\n### 🧠 What's Happening:\n\nThis final node **stores the AI-generated analysis** in a connected Google Sheet. Each new LinkedIn post you analyze adds a new row — turning your sheet into a **real-time intelligence database**.\n\n### 📈 Output Example:\n\n| Company   | Post Title             | Engagement | Intent      | Takeaway                                       |\n| --------- | ---------------------- | ---------- | ----------- | ---------------------------------------------- |\n| Mailchimp | FWD: London Highlights | Medium     | Event Recap | Use testimonial videos for better event recall |\n\n### 🧾 How Beginners Can Use It:\n\n* All the insights get saved automatically — **no copy-paste needed**.\n* This sheet can be shared with your marketing team, used in slide decks, or reviewed weekly.\n* It becomes a **live knowledge hub** of what competitors are saying and how well it's working.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4fbea865-7a0e-426d-896e-a8d9aff74353",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1648,
        -560
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 320,
        "content": "======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "77113e0d-98f4-4426-9d2d-e9822d6b10df",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1648,
        -224
      ],
      "parameters": {
        "color": 4,
        "width": 1289,
        "height": 2722,
        "content": "## 🌟 **LinkedIn Competitive Intelligence Automation**\n\n> Analyze any public LinkedIn post from competitors, influencers, or market leaders using Bright Data + AI — and store the analysis directly into Google Sheets.\n\n---\n\n## 🟩 **Section 1: 🔗 URL Input & Trigger**\n\n### 🎛️ Nodes Involved:\n\n* `⚡ Start Analysis (Manual Trigger)`\n* `✍️ Set LinkedIn Post URL`\n\n### 🧠 What's Happening:\n\nThis section is your **starting point**. The workflow begins when a user manually triggers the automation by clicking a button in n8n. Then, the user **inputs the LinkedIn post URL** they want to analyze.\n\n### 🔍 Explanation:\n\n* This trigger node allows anyone (even non-developers) to launch the analysis with **just a click**.\n* The `Set` node is used to **manually insert the LinkedIn post URL** — the only required input!\n\n### 🛠 How Beginners Can Use It:\n\n* You don’t need coding or scraping knowledge.\n* Just copy any public LinkedIn post URL, paste it into the `Set` node, and hit “Execute Workflow.”\n* This makes it perfect for **marketing interns, assistants, or analysts** to run competitive analysis.\n\n---\n\n## 🟨 **Section 2: 🧠 Data Extraction + AI Analysis**\n\n### 🧩 Nodes Involved:\n\n* `📦 Scrape LinkedIn Post Details (Bright Data)`\n* `🤖 Analyze Post with AI Agent`\n\n  * `🔮 Gemini Model (Chat)`\n  * `🧰 Auto-Fix Output JSON`\n  * `🧾 Structured Output Parser`\n\n### 🧠 What's Happening:\n\nThis is the **core engine** of the automation. First, Bright Data scrapes all the post content — including text, comments, engagement stats, and media. Then, an AI agent (powered by Google Gemini) analyzes this post using a smart prompt to return **insightful and structured output**.\n\n### ⚙️ Step-by-Step:\n\n1. **🔍 Scrape**: Bright Data extracts all key metadata from the LinkedIn post.\n2. **🧠 AI Agent**: The extracted data is passed to an AI model (Gemini), which:\n\n   * Summarizes the post\n   * Identifies its purpose (event, promotion, etc.)\n   * Rates engagement\n   * Infers target audience\n   * Suggests a marketing takeaway\n3. **🛠 Output Parser**: The response is auto-validated and structured into clean JSON.\n\n### 💡 How Beginners Can Use It:\n\n* Even if you don’t know how AI or APIs work, this section handles all the **complex reasoning**.\n* Just sit back and let AI tell you:\n\n  * What your competitors are posting\n  * How engaging those posts are\n  * What lessons you can learn from them\n* It's perfect for **content strategists, social media teams, or consultants**.\n\n---\n\n## 🟦 **Section 3: 📊 Save to Sheet**\n\n### 📘 Node Involved:\n\n* `📤 Save Analysis to Google Sheet`\n\n### 🧠 What's Happening:\n\nThis final node **stores the AI-generated analysis** in a connected Google Sheet. Each new LinkedIn post you analyze adds a new row — turning your sheet into a **real-time intelligence database**.\n\n### 📈 Output Example:\n\n| Company   | Post Title             | Engagement | Intent      | Takeaway                                       |\n| --------- | ---------------------- | ---------- | ----------- | ---------------------------------------------- |\n| Mailchimp | FWD: London Highlights | Medium     | Event Recap | Use testimonial videos for better event recall |\n\n### 🧾 How Beginners Can Use It:\n\n* All the insights get saved automatically — **no copy-paste needed**.\n* This sheet can be shared with your marketing team, used in slide decks, or reviewed weekly.\n* It becomes a **live knowledge hub** of what competitors are saying and how well it's working.\n\n---\n\n## ✅ **Final Benefits**\n\n✨ **For Agencies / Consultants**\nOffer LinkedIn post benchmarking as a service.\n\n📊 **For Marketing Teams**\nUnderstand what kind of content performs well.\n\n📚 **For Beginners**\nRun complex AI + scraping analysis without writing a single line of code.\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "91600209-67e6-4f17-bb39-f88b807a3ed5",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        -928
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 240,
        "content": "## 如果您通过此链接加入 Bright Data,我将获得一小笔佣金 — 感谢您支持更多免费内容!"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Post Analyzer agent": {
      "main": [
        [
          {
            "node": "Save Analysis to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set LinkedIn Post URL": {
      "main": [
        [
          {
            "node": "Scrape LinkedIn Post Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Post Analyzer agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Post Analyzer agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Scrape LinkedIn Post Details": {
      "main": [
        [
          {
            "node": "Post Analyzer agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Analysis (Manual Trigger)": {
      "main": [
        [
          {
            "node": "Set LinkedIn Post URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 市场调研, AI 摘要总结

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量15
分类2
节点类型9
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Yaron Been

Yaron Been

@yaron-nofluff

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

外部链接
在 n8n.io 查看

分享此工作流