8
n8n 中文网amn8n.com

🔍🛠️ Tavily搜索与提取 - 模板

高级

这是一个自动化工作流,包含 17 个节点。主要使用 Set, HttpRequest, ChainLlm, ChatTrigger, LmChatOpenAi 等节点。 🤖🔍 终极免费 AI 驱动研究员(Tavily 网络搜索与提取)

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "QqbYH25we4JDZrZD",
  "meta": {
    "instanceId": "31e69f7f4a77bf465b805824e303232f0227212ae922d12133a0f96ffeab4fef"
  },
  "name": "🔍🛠️ Tavily搜索与提取 - 模板",
  "tags": [],
  "nodes": [
    {
      "id": "e029204b-2e05-4262-b464-7c1b3a995f91",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -780,
        -940
      ],
      "parameters": {
        "color": 4,
        "width": 520,
        "height": 940,
        "content": "## Tavily API搜索端点"
      },
      "typeVersion": 1
    },
    {
      "id": "6c47edec-6c6e-460d-b098-f9a26caa5f8e",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -940
      ],
      "parameters": {
        "color": 6,
        "width": 640,
        "height": 720,
        "content": "## Tavily API提取端点"
      },
      "typeVersion": 1
    },
    {
      "id": "cacae1d1-c9ec-4c2f-ba5d-f782257697cc",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1240,
        -940
      ],
      "parameters": {
        "color": 3,
        "width": 420,
        "height": 540,
        "content": "## Tavily API文档"
      },
      "typeVersion": 1
    },
    {
      "id": "16e977f4-e72d-474c-a04b-3f3ad51cc322",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1240,
        -360
      ],
      "parameters": {
        "width": 420,
        "height": 360,
        "content": "## Tavily用例"
      },
      "typeVersion": 1
    },
    {
      "id": "7e4d0b3c-761d-42b9-bbbe-6ceb366fdc6f",
      "name": "Tavily搜索",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -580,
        -180
      ],
      "parameters": {
        "url": "https://api.tavily.com/search",
        "body": "={\n    \"api_key\": \"tvly-YOUR_API_KEY\",\n    \"query\": \"What is n8n?\",\n    \"search_depth\": \"basic\",\n    \"include_answer\": false,\n    \"include_images\": true,\n    \"include_image_descriptions\": true,\n    \"include_raw_content\": false,\n    \"max_results\": 5,\n    \"include_domains\": [],\n    \"exclude_domains\": []\n}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "47c0bfcf-a187-4b15-b208-2458c934d5f7",
      "name": "Tavily提取",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        40,
        -400
      ],
      "parameters": {
        "url": "https://api.tavily.com/extract",
        "body": "={\n    \"api_key\": \"tvly-YOUR_API_KEY\",\n    \"urls\": [\n        \"https://en.wikipedia.org/wiki/Artificial_intelligence\"\n    ]\n}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "47791d39-087b-4104-aa0d-ef98deee945c",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1940,
        -1020
      ],
      "parameters": {
        "color": 7,
        "width": 660,
        "height": 1020,
        "content": "## Tavily API概述"
      },
      "typeVersion": 1
    },
    {
      "id": "76b291bc-8c34-44f1-b366-09c9f51089e2",
      "name": "获取顶部结果",
      "type": "n8n-nodes-base.set",
      "position": [
        -700,
        140
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a73e848c-f7e7-4b3a-ae99-930c577b47be",
              "name": "results",
              "type": "object",
              "value": "={{ $json.results.first() }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "4b098e57-eff2-4e70-9429-23b5c3d936c2",
      "name": "Tavily提取顶部搜索",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -480,
        140
      ],
      "parameters": {
        "url": "https://api.tavily.com/extract",
        "body": "={\n    \"api_key\": \"{{ $('Tavily API Key').item.json.api_key }}\",\n    \"urls\": [\n        \"{{ $json.results.url }}\"\n    ]\n}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "f593e164-1c9d-46e6-a619-39fe621c829f",
      "name": "筛选 > 90%",
      "type": "n8n-nodes-base.set",
      "position": [
        -920,
        140
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8fd0cfc4-7adc-45f9-a278-d217e362ebfb",
              "name": "results",
              "type": "array",
              "value": "={{ $json.results.filter(item => item.score > 0.80) }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "fadd100c-0335-42c2-9c3d-48e6d17eb2f9",
      "name": "Tavily搜索主题",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1140,
        140
      ],
      "parameters": {
        "url": "https://api.tavily.com/search",
        "body": "={\n    \"api_key\": \"{{ $json.api_key }}\",\n    \"query\": \"{{ $('Provide search topic via Chat window').item.json.chatInput }}\",\n    \"search_depth\": \"basic\",\n    \"include_answer\": false,\n    \"include_images\": true,\n    \"include_image_descriptions\": true,\n    \"include_raw_content\": false,\n    \"max_results\": 5,\n    \"include_domains\": [],\n    \"exclude_domains\": []\n}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "1bc5a21f-0f96-4951-9c88-0bec00b9c586",
      "name": "OpenAI聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -240,
        300
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "jEMSvKmtYfzAkhe6",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "994bb3ee-598b-4d3f-bcfc-16c9cca36657",
      "name": "总结网页内容",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -260,
        140
      ],
      "parameters": {
        "text": "=Summarize this web content and provide in Markdown format:  {{ $json.results[0].raw_content }}",
        "promptType": "define"
      },
      "typeVersion": 1.5
    },
    {
      "id": "d5520da7-f6bc-470e-ab96-e04097041f08",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1680,
        40
      ],
      "parameters": {
        "color": 5,
        "width": 1800,
        "height": 400,
        "content": "## Tavily搜索和提取与AI总结示例"
      },
      "typeVersion": 1
    },
    {
      "id": "9bd6c18e-aabf-4719-b9c4-ac91b36891a1",
      "name": "Tavily API密钥",
      "type": "n8n-nodes-base.set",
      "position": [
        -1360,
        140
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "035660a9-bb58-4ecb-bad3-7f4d017fa69f",
              "name": "api_key",
              "type": "string",
              "value": "tvly-YOUR_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "41f36ad7-7a2b-4732-89ec-fe6500768631",
      "name": "通过聊天窗口提供搜索主题",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1580,
        140
      ],
      "webhookId": "6b8f316b-776e-429a-8699-55f230c3a168",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "0213756a-35c4-46a8-9b79-2e8a81852177",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1420,
        320
      ],
      "parameters": {
        "color": 7,
        "height": 80,
        "content": "### Tavily API密钥"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e1f22fbb-9663-405c-b7b1-7e8b2d54ad0f",
  "connections": {
    "Filter > 90%": {
      "main": [
        [
          {
            "node": "Get Top Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Top Result": {
      "main": [
        [
          {
            "node": "Tavily Extract Top Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tavily API Key": {
      "main": [
        [
          {
            "node": "Tavily Search Topic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize Web Page Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Tavily Search Topic": {
      "main": [
        [
          {
            "node": "Filter > 90%",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tavily Extract Top Search": {
      "main": [
        [
          {
            "node": "Summarize Web Page Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Provide search topic via Chat window": {
      "main": [
        [
          {
            "node": "Tavily API Key",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级

需要付费吗?

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

工作流信息
难度等级
高级
节点数量17
分类-
节点类型6
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Joseph LePage

Joseph LePage

@joe

As an AI Automation consultant based in Canada, I partner with forward-thinking organizations to implement AI solutions that streamline operations and drive growth.

外部链接
在 n8n.io 查看

分享此工作流