8
n8n 中文网amn8n.com

🤖 出租车服务提供商

高级

这是一个Support, AI领域的自动化工作流,包含 30 个节点。主要使用 If, Set, Code, Redis, Switch 等节点,结合人工智能技术实现智能自动化。 出租车服务提供商(生产就绪,第4部分)

前置要求
  • Redis 服务器连接信息
  • PostgreSQL 数据库连接信息
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "i8gsrw37GcVGRJZl",
  "meta": {
    "instanceId": "daae7bb90c8655b08e0b68de8a52b1178f2812f6a234efb0b0509279dbb70b3e",
    "templateCredsSetupCompleted": true
  },
  "name": "🤖 出租车服务提供商",
  "tags": [
    {
      "id": "no8Mb078mvRgw7PS",
      "name": "DEMO",
      "createdAt": "2025-04-30T05:34:10.330Z",
      "updatedAt": "2025-04-30T05:34:10.330Z"
    },
    {
      "id": "HkWjtKABHywZbLBH",
      "name": "Provider",
      "createdAt": "2025-05-01T17:04:09.852Z",
      "updatedAt": "2025-05-01T17:04:09.852Z"
    }
  ],
  "nodes": [
    {
      "id": "33853542-a6d4-4d1f-9f8c-3e932a75dc80",
      "name": "流程触发器",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -3420,
        340
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "2279a1b4-9e71-44e9-82dd-642d11067985",
      "name": "输入",
      "type": "n8n-nodes-base.set",
      "notes": "provider_no: test",
      "position": [
        -3200,
        340
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "b533fd57-6652-4cd0-a056-e5e07a5c9792",
      "name": "测试触发器",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -3420,
        540
      ],
      "webhookId": "6d1966ae-57f4-4ed4-ac1c-5bef7d4a2a67",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "b01750d1-3cd7-4a88-802d-46b5c6a330ed",
      "name": "测试字段",
      "type": "n8n-nodes-base.set",
      "notes": "service_no: test",
      "position": [
        -3200,
        540
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "854b7943-176e-4d25-8d7e-d31e468788a7",
      "name": "AI 代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        -1520,
        260
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "972e9699-1041-4a22-b698-c353c4cc3b9b",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "onError": "continueErrorOutput",
      "position": [
        -1140,
        240
      ],
      "parameters": {},
      "executeOnce": false,
      "typeVersion": 2
    },
    {
      "id": "7ae20b2c-b8ff-4d79-95a8-69a57a5b8d12",
      "name": "xAI @grok-2-1212",
      "type": "@n8n/n8n-nodes-langchain.lmChatXAiGrok",
      "position": [
        -1640,
        520
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "42155bbd-0637-4d5c-9f98-318a8fb85137",
      "name": "创建预订数据",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        -1340,
        520
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "fa91d89e-e7a5-49ce-9785-741324b04d82",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3740,
        280
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "17c9399a-3edc-4178-b11f-cf1c140962a6",
      "name": "提供商编号",
      "type": "n8n-nodes-base.redis",
      "notes": "{session_id}:service:providers TTL 5m",
      "position": [
        -1720,
        260
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "10af93f1-1fc0-42c4-8a2c-d1218cca5261",
      "name": "计算器",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        -1180,
        520
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0c1af92d-b06f-4131-a915-c52c7b376db6",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2960,
        220
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "49c5fae8-e8fd-48ff-9b46-e7ead2143f08",
      "name": "如果活跃",
      "type": "n8n-nodes-base.if",
      "position": [
        -2280,
        620
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "cef93e89-5fc9-43c8-b439-de662546b85c",
      "name": "提供商缓存",
      "type": "n8n-nodes-base.redis",
      "notes": "TTL 15m service:{channel_no}:{service_no}:data",
      "onError": "continueRegularOutput",
      "position": [
        -2760,
        340
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "489cdc19-baf9-4d76-ae07-6635f32ed1cd",
      "name": "加载提供商数据",
      "type": "n8n-nodes-base.postgres",
      "onError": "continueRegularOutput",
      "position": [
        -2280,
        420
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 2.6,
      "alwaysOutputData": true
    },
    {
      "id": "0a1712ce-77b2-4727-8655-b2a984cdbe42",
      "name": "保存提供商缓存",
      "type": "n8n-nodes-base.redis",
      "notes": "TTL 15m",
      "onError": "continueRegularOutput",
      "position": [
        -2000,
        600
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "6fa2bb5c-001e-4990-8988-3be5c5b66c51",
      "name": "解析提供商",
      "type": "n8n-nodes-base.code",
      "position": [
        -2280,
        260
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "86059a88-4e06-4902-abad-90e2326191b1",
      "name": "提供商",
      "type": "n8n-nodes-base.set",
      "position": [
        -2000,
        260
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "fd44c532-6185-4377-8c18-ecc2275f4eb2",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1800,
        900
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d038d1b6-f288-4f85-9b3c-fc0b31cf80c8",
      "name": "错误输出1",
      "type": "n8n-nodes-base.set",
      "notes": "Please retry.",
      "position": [
        -320,
        1000
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "c6644e68-d8c0-4007-a19f-c3784d00971a",
      "name": "如果评分",
      "type": "n8n-nodes-base.if",
      "position": [
        -540,
        180
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "d625bb63-34db-4b75-a67f-71f878b7d095",
      "name": "带评分的输出",
      "type": "n8n-nodes-base.set",
      "position": [
        -240,
        120
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "1889ebcf-d231-4e8c-9877-e282591c19ba",
      "name": "不带评分的输出",
      "type": "n8n-nodes-base.set",
      "position": [
        -240,
        300
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "3cfe653d-efde-4479-a89d-09c460218cc0",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -620,
        40
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "619c94e8-6d93-49d6-8540-13d01d7cda79",
      "name": "如果有效?",
      "type": "n8n-nodes-base.if",
      "position": [
        -880,
        200
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "6b039236-37f7-4aab-86d4-bcd540f8e43c",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        40
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8e82564f-61a3-45d7-a43f-142ad0d5b06b",
      "name": "测试输出",
      "type": "n8n-nodes-base.set",
      "position": [
        -320,
        640
      ],
      "parameters": {},
      "notesInFlow": false,
      "typeVersion": 3.4
    },
    {
      "id": "94d7a371-a6de-44eb-a50c-665b0bf60d48",
      "name": "### 需要帮助?",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        540
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9690413c-c097-463c-99d8-83f13f301e94",
      "name": "回调",
      "type": "n8n-nodes-base.executeWorkflow",
      "notes": "Demo Call Back",
      "position": [
        140,
        120
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "a8f96f00-9f5b-4e06-bb9d-ac36f0504e05",
      "name": "提供商缓存开关",
      "type": "n8n-nodes-base.switch",
      "notes": "NO CACHE FOR demo",
      "position": [
        -2560,
        340
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "timezone": "Etc/UTC",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "vuso7W8t402BPcT2",
    "executionOrder": "v1"
  },
  "versionId": "28fad365-85a7-4c8e-ae98-fb93f1a91d60",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "If Valid?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Output1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Input": {
      "main": [
        [
          {
            "node": "Provider Cache",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Output1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Score": {
      "main": [
        [
          {
            "node": "Output w/ Score",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Output w/o Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Provider": {
      "main": [
        [
          {
            "node": "Provider Number",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Active": {
      "main": [
        [
          {
            "node": "Save Provider Cache",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Test Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Valid?": {
      "main": [
        [
          {
            "node": "If Score",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Test Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Test Fields": {
      "main": [
        [
          {
            "node": "Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flow Trigger": {
      "main": [
        [
          {
            "node": "Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Test Trigger": {
      "main": [
        [
          {
            "node": "Test Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Output1": {
      "main": [
        [
          {
            "node": "Call Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Provider": {
      "main": [
        [
          {
            "node": "Provider",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Provider Cache": {
      "main": [
        [
          {
            "node": "Provider Cache Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output w/ Score": {
      "main": [
        [
          {
            "node": "Call Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Provider Number": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output w/o Score": {
      "main": [
        [
          {
            "node": "Call Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "xAI @grok-2-1212": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Load Provider Data": {
      "main": [
        [
          {
            "node": "If Active",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Booking Data": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Save Provider Cache": {
      "main": [
        [
          {
            "node": "Provider",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Provider Cache Switch": {
      "main": [
        [
          {
            "node": "Parse Provider",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Parse Provider",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Load Provider Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 客户支持, 人工智能

需要付费吗?

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

工作流信息
难度等级
高级
节点数量30
分类2
节点类型14
难度说明

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

作者
ChatPayLabs

ChatPayLabs

@chatpaylabs

Production Ready AI n8n Workflow Templates Startup Fundraising 💰 Support Us 🦄

外部链接
在 n8n.io 查看

分享此工作流