8
n8n 中文网amn8n.com

可靠的Reddit子版块搜索与OAuth2 API认证

中级

这是一个Market Research, Multimodal AI领域的自动化工作流,包含 7 个节点。主要使用 Set, SplitOut, Aggregate, HttpRequest, ExecuteWorkflowTrigger 等节点。 可靠的Reddit子版块搜索与OAuth2 API认证

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "8f5bc3586a09bb005132364a23028fdc8e3d8c8e33cd86682840171acfa0648a",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "b2e203b5-75d0-417b-8f6c-4742f441fc19",
      "name": "当由其他工作流执行时",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -512,
        256
      ],
      "parameters": {
        "inputSource": "jsonExample",
        "jsonExample": "{\n\"Query\": \n\"RealEstateTechnology\",\n\"min_Members\": \n0,\n\"max_members\": \n20000,\n\"limit\":50\n}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "f1c7f1b1-7f54-46d1-88ff-9c5cc5a41fe8",
      "name": "拆分输出",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -16,
        368
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data.children"
      },
      "typeVersion": 1
    },
    {
      "id": "34b65197-d956-47ba-95bb-c56260f24897",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        368
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bd3654bc-51e7-43b0-bb8d-f25838136011",
              "name": "Subreddit",
              "type": "string",
              "value": "={{ $json.data.url }}"
            },
            {
              "id": "78c8656f-ff1a-4e60-b449-4ee5ac909195",
              "name": "Description",
              "type": "string",
              "value": "={{ $json.data.public_description }}"
            },
            {
              "id": "e26fbedf-32f8-4489-8bbf-c8371dba6b43",
              "name": "18+",
              "type": "string",
              "value": "={{ $json.data.over18 }}"
            },
            {
              "id": "7d7dd017-c021-4ef2-bcb7-0bdfa66d7c8a",
              "name": "Members",
              "type": "string",
              "value": "={{ $json.data.subscribers }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "42d35c17-9414-4e2f-b15f-5fc94fa0fd7b",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        336,
        368
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "Subreddit"
            },
            {
              "fieldToAggregate": "Description"
            },
            {
              "fieldToAggregate": "18+"
            },
            {
              "fieldToAggregate": "Members"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8851d902-4c4e-48ec-831c-24785f7efc69",
      "name": "获取多个 Subreddit",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -240,
        256
      ],
      "parameters": {
        "url": "https://oauth.reddit.com/subreddits/search",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $json.Query }}"
            },
            {
              "name": "limit",
              "value": "={{ $json.limit }}"
            }
          ]
        },
        "nodeCredentialType": "redditOAuth2Api"
      },
      "credentials": {
        "redditOAuth2Api": {
          "id": "ienipD71ljXPRzmJ",
          "name": "Reddit account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "11ce97ad-4a31-49d3-af3b-bee886da3e96",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -112
      ],
      "parameters": {
        "width": 1120,
        "height": 640,
        "content": "## 获取多个 Subreddit 替代节点工作流"
      },
      "typeVersion": 1
    },
    {
      "id": "d1fee9c5-3e2c-4f76-9aaa-4254f2694284",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        224
      ],
      "parameters": {
        "color": 6,
        "width": 640,
        "height": 304,
        "content": "# 数据处理"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Split Out": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many Subreddit": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Get many Subreddit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 市场调研, 多模态 AI

需要付费吗?

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

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

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

作者
Christian Moises

Christian Moises

@hyxcreation

I value my time. so I created an Automation for 4 hours to save 20 minutes. I'll post all my works so you'd save that 20 minutes without spending 4 hours to create it. lol.

外部链接
在 n8n.io 查看

分享此工作流