8
n8n 中文网amn8n.com

Facebook群组爬虫

初级

这是一个AI领域的自动化工作流,包含 3 个节点。主要使用 Airtop, FormTrigger 等节点,结合人工智能技术实现智能自动化。 使用Airtop提取Facebook群组帖子

前置要求
  • AI 服务 API Key(如 OpenAI、Anthropic 等)

使用的节点 (3)

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "1LBhz8JFWZgT5cui",
  "meta": {
    "instanceId": "28a947b92b197fc2524eaba16e57560338657b2b0b5796300b2f1cedc1d0d355",
    "templateCredsSetupCompleted": true
  },
  "name": "Facebook群组爬虫",
  "tags": [],
  "nodes": [
    {
      "id": "22789f80-781f-42c4-89c4-ebbf32745a05",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ],
      "webhookId": "bf8d7e5f-f886-4586-affa-03c839ce3d70",
      "parameters": {
        "options": {},
        "formTitle": "Facebook Group Scraper",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Facebook Group URL",
              "placeholder": "The URL of the Facebook Group feed you want to scrape",
              "requiredField": true
            },
            {
              "fieldLabel": "Airtop Profile",
              "placeholder": "Airtop Profile authenticated to Facebook",
              "requiredField": true
            }
          ]
        },
        "formDescription": "This automation will extract information from a Facebook group"
      },
      "typeVersion": 2.2
    },
    {
      "id": "31c32d54-5fe3-4125-9e29-029a1c955822",
      "name": "Airtop",
      "type": "n8n-nodes-base.airtop",
      "position": [
        220,
        0
      ],
      "parameters": {
        "url": "={{ $json['Facebook Group URL'] }}",
        "prompt": "This is a Facebook group feed. \nExtract up to 5 non-sponsored posts, for each post extract:\n - Post text\n- Post URL\n- Page/profile URL\n- Timestamp\t\n- Number of likes \n- Number if shares\n- Number of comments\n- Page or profile details\t\n- Post thumbnail",
        "resource": "extraction",
        "profileName": "={{ $json['Airtop Profile'] }}",
        "sessionMode": "new",
        "additionalFields": {
          "outputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"posts\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"post_text\": {\n            \"type\": \"string\",\n            \"description\": \"The text content of the post.\"\n          },\n          \"post_url\": {\n            \"type\": \"string\",\n            \"description\": \"The URL of the post.\"\n          },\n          \"page_profile_url\": {\n            \"type\": \"string\",\n            \"description\": \"The URL of the page or profile that made the post.\"\n          },\n          \"timestamp\": {\n            \"type\": \"string\",\n            \"description\": \"The timestamp of when the post was made.\"\n          },\n          \"number_of_likes\": {\n            \"type\": \"integer\",\n            \"description\": \"The number of likes the post has received.\"\n          },\n          \"number_of_shares\": {\n            \"type\": \"integer\",\n            \"description\": \"The number of times the post has been shared.\"\n          },\n          \"number_of_comments\": {\n            \"type\": \"integer\",\n            \"description\": \"The number of comments on the post.\"\n          },\n          \"page_profile_details\": {\n            \"type\": \"string\",\n            \"description\": \"Details about the page or profile that made the post.\"\n          },\n          \"post_thumbnail\": {\n            \"type\": \"string\",\n            \"description\": \"The URL of the post's thumbnail image.\"\n          }\n        },\n        \"required\": [\n          \"post_text\",\n          \"post_url\",\n          \"page_profile_url\",\n          \"timestamp\",\n          \"number_of_likes\",\n          \"number_of_shares\",\n          \"number_of_comments\",\n          \"page_profile_details\",\n          \"post_thumbnail\"\n        ],\n        \"additionalProperties\": false\n      }\n    }\n  },\n  \"required\": [\n    \"posts\"\n  ],\n  \"additionalProperties\": false,\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\"\n}",
          "paginationMode": "infinite-scroll",
          "parseJsonOutput": true
        }
      },
      "credentials": {
        "airtopApi": {
          "id": "Yi4YPNnovLVUjFn5",
          "name": "Airtop Official Org"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8ada5770-7a77-4e75-8342-f0cad8146e4d",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -980,
        -680
      ],
      "parameters": {
        "color": 5,
        "width": 820,
        "height": 1380,
        "content": "自述文件"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "33402a6d-082e-4fb9-8ad0-90275049a366",
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Airtop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

初级 - 人工智能

需要付费吗?

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

工作流信息
难度等级
初级
节点数量3
分类1
节点类型3
难度说明

适合 n8n 新手,包含 1-5 个节点的简单工作流

作者

Airtop provides an intelligent browser automation API for AI agents, enabling seamless web interaction, including login, navigation, and data extraction from any site, even those with complex authentication - all with natural language instructions.In simple terms, we allow you to automate anything humans can do online, on any site with just words

外部链接
在 n8n.io 查看

分享此工作流