8
n8n 中文网amn8n.com

社交媒体资料丰富流程

中级

这是一个Lead Generation, AI Summarization领域的自动化工作流,包含 13 个节点。主要使用 If, Set, Code, Wait, FormTrigger 等节点。 使用Extruct.ai收集公司社交媒体资料并存储到Google表格

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "ZKVoifRi8EOLPfvj",
  "meta": {
    "instanceId": "afeb9bf6b44bcf071458717ba2725fb9cfe8e80d1545ad9879e786f1aaf7a15f",
    "templateCredsSetupCompleted": true
  },
  "name": "Social Presence Enrichment Flow",
  "tags": [],
  "nodes": [
    {
      "id": "26c8ff70-f937-4066-85a3-4ed206316ef6",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        1100,
        200
      ],
      "webhookId": "61233cba-6ff5-4736-a38f-3a53c7428723",
      "parameters": {
        "options": {},
        "formTitle": "Company Social Presence",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Name"
            }
          ]
        },
        "formDescription": "Enter the name or website of a company"
      },
      "typeVersion": 2.2
    },
    {
      "id": "3e5d526f-5e91-4e65-b059-6d52d83da2ba",
      "name": "Enrich form input",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1500,
        200
      ],
      "parameters": {
        "url": "={{'https://api.extruct.ai/v1/tables/' + $json.EXTRUCT_TABLE_ID + '/rows'}}",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"rows\": [\n    {\n      \"data\": {\n        \"input\": \"{{ $('On form submission').item.json.Name }}\"\n      }\n    }\n  ],\n  \"run\": true\n} ",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "PnJ0FDuGkKYiN4MZ",
          "name": "Bearer Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "708d9659-14a6-41a5-97cb-39c70abaef6e",
      "name": "获取状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1860,
        200
      ],
      "parameters": {
        "url": "=https://api.extruct.ai/v1/tables/{{ $('Variables').item.json.EXTRUCT_TABLE_ID }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "PnJ0FDuGkKYiN4MZ",
          "name": "Bearer Auth account"
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "19dd9662-b69c-46c3-a11f-4a8ebb0a6d05",
      "name": "If running",
      "type": "n8n-nodes-base.if",
      "position": [
        2040,
        200
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f8432dca-c337-4644-8163-fa83f12e5ded",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status.run_status }}",
              "rightValue": "=running"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "55559824-2794-4f55-8bb2-29518f25a5c7",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        1680,
        200
      ],
      "webhookId": "10face1b-ef18-4357-ad22-0c4f32e25f90",
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "8f7bc242-88b7-47a0-9cfe-a77682f4c7e9",
      "name": "获取数据",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2320,
        200
      ],
      "parameters": {
        "url": "=https://api.extruct.ai/v1/tables/{{ $('Variables').item.json.EXTRUCT_TABLE_ID }}/data",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "PnJ0FDuGkKYiN4MZ",
          "name": "Bearer Auth account"
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "5151b469-d637-43ff-ba70-311375cc1304",
      "name": "Import to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2640,
        200
      ],
      "parameters": {
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "AGhkvHtD8bZNcSya",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "45b98bd7-1ef2-4cfb-b132-51f5485f9580",
      "name": "Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        1260,
        200
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1bfeac42-8afa-409a-806c-8262553270ec",
              "name": "=EXTRUCT_TABLE_ID",
              "type": "string",
              "value": "=YOUR_EXTRUCT_TABLE_ID"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b5b93f8c-6f27-4ec2-a5a6-8991651998a9",
      "name": "Format last input",
      "type": "n8n-nodes-base.code",
      "position": [
        2480,
        200
      ],
      "parameters": {
        "jsCode": "// Get rows from the first object\nconst rows = items[0].json.rows || items[0].json[0]?.rows;\n\n// Take the last row\nconst lastRow = rows[rows.length - 1];\nconst data = lastRow.data;\nlet flatRow = {};\n\n// Transform the data object to a flat object for Sheets\nfor (const key in data) {\n  if (data[key] && data[key].value && data[key].value.answer !== undefined) {\n    flatRow[key] = data[key].value.answer;\n  } else if (data[key] && data[key].value !== undefined) {\n    flatRow[key] = data[key].value;\n  } else {\n    flatRow[key] = '';\n  }\n}\n\nreturn [{ json: flatRow }];"
      },
      "typeVersion": 2
    },
    {
      "id": "1c41a106-b6c8-4913-bd24-f9b88ed8bc46",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        40
      ],
      "parameters": {
        "width": 1020,
        "height": 1640,
        "content": "## Quickstart Guide for Social Presence Enrichment Flow\n\n## 1. Create an Extruct account\n- Sign-up link with 2,500 free credits: www.extruct.ai/\n\n## 2. Prepare Your Tables\n1) Open the Extruct table template using this link: https://app.extruct.ai/tables/shared/VfGemEC1BujAIJx8\nAfter the table loads, find the unique table ID in your browser’s address bar (it will be part of the URL).\n\n![Screenshot](https://images.weserv.nl/?url=raw.githubusercontent.com/zodackwand/extruct_screenshots/main/table_id_from_link.png&w=500)\n\n2) Paste this table ID into the variables block in your n8n flow.\n\n3) Open the provided Google Sheets template: https://docs.google.com/spreadsheets/d/1eeQ7VIbZ94z2ji9NqRT0bXS8bNtixWbUDopOQeM005w/edit?usp=sharing\nMake a copy of this template to your own Google Drive.\n\n4) In the Google Sheets node, paste the link to your own copy of the Google Sheets template.\nMake sure to connect your Google account in this node. If you haven’t connected it before, create a new Google Sheets credential in n8n.\n\n---\n\n## 3. Set Up Authorizations\n- Bearer Token:\nMake sure that each HTTP Request node in the n8n flow uses your personal Extruct API token for Bearer authentication. You can create and find your API token on the API page in the Extruct web app.\n\n---\n\n## 4. Match Output Columns in the Google Sheets Node\n1) If you don’t have any input data in the Google Sheets node, run the flow once with a test form input.\n(It’s normal if you get an error—this step is just to load the input fields.)\n\n2) After running the node, you’ll see the input fields appear.\nNow, drag each field from the input field to the matching column in your Google Sheet copy.\n\n![Screenshot](https://images.weserv.nl/?url=raw.githubusercontent.com/zodackwand/extruct_screenshots/main/drag_input_to_columns.png&w=600)\n\nMake sure that the \"Column to match on\" field is set to \"Company name\".\n\n---\n\n## 5. Activate the Flow\n1) Switch your flow to Active mode in n8n.\n2) Use the provided form (Production URL) to add new companies.\n3) After Extruct processes the data, the enriched company information will automatically appear in your Google Sheets copy.\n\n### If you have any questions, please reach out to us directly in the chat on the Extruct website - we’re happy to help!\n\n## Extra Functionality: Adding Custom Columns\nYou can add your own columns to track additional information:\n1) Add a new column in your Extruct web app table.\n2) Add the same column to your copy of the Google Sheets template.\n3) In the Google Sheets node in n8n, map the new field to the correct column in your sheet."
      },
      "typeVersion": 1
    },
    {
      "id": "1c402902-89ff-41fa-994d-ae97f4706b13",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        40
      ],
      "parameters": {
        "color": 5,
        "width": 340,
        "height": 340,
        "content": "## Input:\n- User submits a company via the form.\n- Variables node sets up required parameters (Table ID)."
      },
      "typeVersion": 1
    },
    {
      "id": "bb21fdaf-7195-4796-a921-a04757c9a41d",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1460,
        40
      ],
      "parameters": {
        "color": 2,
        "width": 740,
        "height": 340,
        "content": "## Enrichment:\nThe flow sends the company data for enrichment and waits until processing is complete.\nIt checks the status in a loop until the data is ready."
      },
      "typeVersion": 1
    },
    {
      "id": "d416707d-e5c6-4c65-83eb-add98f1a2846",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2260,
        40
      ],
      "parameters": {
        "width": 580,
        "height": 340,
        "content": "## Output:\nOnce enrichment is finished, the flow retrieves the results, formats them, and updates your Google Sheet."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b244e3c3-8d9c-4755-b016-786c27785814",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Get status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get data": {
      "main": [
        [
          {
            "node": "Format last input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Variables": {
      "main": [
        [
          {
            "node": "Enrich form input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get status": {
      "main": [
        [
          {
            "node": "If running",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If running": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich form input": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format last input": {
      "main": [
        [
          {
            "node": "Import to Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 潜在客户开发, AI 摘要总结

需要付费吗?

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

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

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

作者
Extruct AI

Extruct AI

@extruct-ai

Turn natural language into structured company data with one API call. Skip the web scraping, HTML parsing, and data cleaning - just describe the companies you're looking for and get back verified, enriched results. Perfect for enriching CRMs, building lead generation workflows, or automating market research. Built by developers who understand that the best company data isn't trapped in static databases - it's live on the web.

外部链接
在 n8n.io 查看

分享此工作流