8
n8n 中文网amn8n.com

连接Retell语音代理至自定义函数

中级

这是一个Support, AI, IT Ops领域的自动化工作流,包含 7 个节点。主要使用 Set, Webhook, RespondToWebhook 等节点,结合人工智能技术实现智能自动化。 连接Retell语音代理至自定义函数

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "f4f5d195bb2162a0972f737368404b18be694648d365d6c6771d7b4909d28167"
  },
  "nodes": [
    {
      "id": "693e094e-0329-455d-9c42-ba398dd40955",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -500,
        -160
      ],
      "webhookId": "825f729b-34e1-4c34-8687-f48b7118b749",
      "parameters": {
        "path": "hotel-retell-template",
        "options": {
          "responseData": "={\"response\":\"Your booking is confirmed\"}"
        },
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "6172b8b6-4950-4b7f-a60c-ce782139f24c",
      "name": "响应 Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        300,
        -160
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "6ebeaeb7-4ec5-4f5d-b8d5-3fd51ca8604c",
      "name": "[替换我!] 设置响应",
      "type": "n8n-nodes-base.set",
      "position": [
        -100,
        -160
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "4159ec1f-4bd6-4473-90e5-a0c24e2bf302",
              "name": "response",
              "type": "string",
              "value": "Your booking has been confirmed!"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "86c16dd4-0d9d-40bb-a495-02c1a2ac06f1",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -340
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 360,
        "content": "### 🧠 在此处放置您的逻辑!"
      },
      "typeVersion": 1
    },
    {
      "id": "f8be07ca-1d3f-46cb-b858-bb22b15efe0f",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -340
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 360,
        "content": "### Retell 自定义函数 Webhook"
      },
      "typeVersion": 1
    },
    {
      "id": "94ec297f-aa00-4358-b1f9-834438548a19",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        -340
      ],
      "parameters": {
        "color": 5,
        "width": 300,
        "height": 360,
        "content": "### Retell 自定义函数响应"
      },
      "typeVersion": 1
    },
    {
      "id": "baff741b-8cd3-4f7d-a56f-5029e1babc26",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1500,
        -700
      ],
      "parameters": {
        "color": 7,
        "width": 880,
        "height": 1220,
        "content": "## 将 Retell 语音智能体连接到自定义函数"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {
    "Webhook": [
      {
        "body": {
          "args": {
            "guest-name": "Mike Smith",
            "hotel-name": "Agent Studios",
            "total-cost": "190",
            "check-in-date": "2025-03-29",
            "check-out-date": "2025-03-30",
            "number-of-nights": 1,
            "room-type-booked": "Deluxe Suite"
          },
          "call": {
            "call_id": "playground",
            "latency": {},
            "call_type": "web_call",
            "tool_mocks": [],
            "transcript": "Agent: \nUser: Hi, I would like to make a reservation for me and my wife on March 29th. We have a budget of 250 euros. Can you help me with that?\nAgent: Good day, and welcome to Agent Studios. I'm Luigi, and I'm here to assist you with your reservation. May I have your name and email address, please?\nUser: My name is Mike Smith, and my email address is mike@yahoo.com.\nAgent: Thank you, Mike. For your stay on March 29th, we have the Deluxe Suite available, which is priced at 190 euros per night. This fits within your budget of 250 euros. Would you like to proceed with booking the Deluxe Suite for one night?\nUser: Yes, that sounds great! Please proceed with the booking for the Deluxe Suite for one night on March 29th.\n",
            "transcript_object": [
              {
                "role": "agent",
                "words": [],
                "content": ""
              },
              {
                "role": "user",
                "words": [
                  {
                    "end": 1,
                    "word": "Hi, ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "I ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "would ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "like ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "to ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "make ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "a ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "reservation ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "for ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "me ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "and ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "my ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "wife ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "on ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "March ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "29th. ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "We ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "have ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "a ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "budget ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "of ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "250 ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "euros. ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "Can ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "you ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "help ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "me ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "with ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "that?",
                    "start": 1
                  }
                ],
                "content": "Hi, I would like to make a reservation for me and my wife on March 29th. We have a budget of 250 euros. Can you help me with that?"
              },
              {
                "role": "agent",
                "words": [
                  {
                    "end": 2,
                    "word": "Good ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "day, ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "and ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "welcome ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "to ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "Agent ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "Studios ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "I'm ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "Luigi, ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "and ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "I'm ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "here ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "to ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "assist ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "you ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "with ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "your ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "reservation. ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "May ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "I ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "have ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "your ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "name ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "and ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "email ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "address, ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "please?",
                    "start": 2
                  }
                ],
                "content": "Good day, and welcome to Agent Studios. I'm Luigi, and I'm here to assist you with your reservation. May I have your name and email address, please?"
              },
              {
                "role": "user",
                "words": [
                  {
                    "end": 3,
                    "word": "My ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "name ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "is ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "Mike ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "Smith, ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "and ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "my ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "email ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "address ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "is ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "mike@yahoo.com.",
                    "start": 3
                  }
                ],
                "content": "My name is Mike Smith, and my email address is mike@yahoo.com."
              },
              {
                "role": "agent",
                "words": [
                  {
                    "end": 4,
                    "word": "Thank ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "you, ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Mike. ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "For ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "your ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "stay ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "on ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "March ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "29th, ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "we ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "have ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "the ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Deluxe ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Suite ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "available, ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "which ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "is ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "priced ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "at ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "190 ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "euros ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "per ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "night. ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "This ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "fits ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "within ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "your ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "budget ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "of ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "250 ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "euros. ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Would ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "you ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "like ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "to ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "proceed ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "with ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "booking ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "the ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Deluxe ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Suite ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "for ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "one ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "night?",
                    "start": 4
                  }
                ],
                "content": "Thank you, Mike. For your stay on March 29th, we have the Deluxe Suite available, which is priced at 190 euros per night. This fits within your budget of 250 euros. Would you like to proceed with booking the Deluxe Suite for one night?"
              },
              {
                "role": "user",
                "words": [
                  {
                    "end": 5,
                    "word": "Yes, ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "that ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "sounds ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "great! ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "Please ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "proceed ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "with ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "the ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "booking ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "for ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "the ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "Deluxe ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "Suite ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "for ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "one ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "night ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "on ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "March ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "29th.",
                    "start": 5
                  }
                ],
                "content": "Yes, that sounds great! Please proceed with the booking for the Deluxe Suite for one night on March 29th."
              }
            ],
            "transcript_with_tool_calls": [
              {
                "role": "agent",
                "words": [],
                "content": ""
              },
              {
                "role": "user",
                "words": [
                  {
                    "end": 1,
                    "word": "Hi, ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "I ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "would ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "like ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "to ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "make ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "a ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "reservation ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "for ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "me ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "and ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "my ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "wife ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "on ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "March ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "29th. ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "We ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "have ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "a ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "budget ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "of ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "250 ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "euros. ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "Can ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "you ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "help ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "me ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "with ",
                    "start": 1
                  },
                  {
                    "end": 1,
                    "word": "that?",
                    "start": 1
                  }
                ],
                "content": "Hi, I would like to make a reservation for me and my wife on March 29th. We have a budget of 250 euros. Can you help me with that?"
              },
              {
                "role": "agent",
                "words": [
                  {
                    "end": 2,
                    "word": "Good ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "day, ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "and ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "welcome ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "to ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "Agent ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "Studios ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "I'm ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "Luigi, ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "and ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "I'm ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "here ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "to ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "assist ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "you ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "with ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "your ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "reservation. ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "May ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "I ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "have ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "your ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "name ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "and ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "email ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "address, ",
                    "start": 2
                  },
                  {
                    "end": 2,
                    "word": "please?",
                    "start": 2
                  }
                ],
                "content": "Good day, and welcome to Agent Studios. I'm Luigi, and I'm here to assist you with your reservation. May I have your name and email address, please?"
              },
              {
                "role": "user",
                "words": [
                  {
                    "end": 3,
                    "word": "My ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "name ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "is ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "Mike ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "Smith, ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "and ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "my ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "email ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "address ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "is ",
                    "start": 3
                  },
                  {
                    "end": 3,
                    "word": "mike@yahoo.com.",
                    "start": 3
                  }
                ],
                "content": "My name is Mike Smith, and my email address is mike@yahoo.com."
              },
              {
                "role": "agent",
                "words": [
                  {
                    "end": 4,
                    "word": "Thank ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "you, ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Mike. ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "For ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "your ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "stay ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "on ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "March ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "29th, ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "we ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "have ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "the ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Deluxe ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Suite ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "available, ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "which ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "is ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "priced ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "at ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "190 ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "euros ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "per ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "night. ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "This ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "fits ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "within ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "your ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "budget ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "of ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "250 ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "euros. ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Would ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "you ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "like ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "to ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "proceed ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "with ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "booking ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "the ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Deluxe ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "Suite ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "for ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "one ",
                    "start": 4
                  },
                  {
                    "end": 4,
                    "word": "night?",
                    "start": 4
                  }
                ],
                "content": "Thank you, Mike. For your stay on March 29th, we have the Deluxe Suite available, which is priced at 190 euros per night. This fits within your budget of 250 euros. Would you like to proceed with booking the Deluxe Suite for one night?"
              },
              {
                "role": "user",
                "words": [
                  {
                    "end": 5,
                    "word": "Yes, ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "that ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "sounds ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "great! ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "Please ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "proceed ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "with ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "the ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "booking ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "for ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "the ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "Deluxe ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "Suite ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "for ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "one ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "night ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "on ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "March ",
                    "start": 5
                  },
                  {
                    "end": 5,
                    "word": "29th.",
                    "start": 5
                  }
                ],
                "content": "Yes, that sounds great! Please proceed with the booking for the Deluxe Suite for one night on March 29th."
              },
              {
                "name": "send_email_confirmation",
                "role": "tool_call_invocation",
                "arguments": "{\"room-type-booked\":\"Deluxe Suite\",\"number-of-nights\":1,\"check-in-date\":\"2025-03-29\",\"check-out-date\":\"2025-03-30\",\"guest-name\":\"Mike Smith\",\"total-cost\":\"190\",\"hotel-name\":\"Agent Studios\"}",
                "tool_call_id": "ae23cddc1dec67cf"
              }
            ],
            "retell_llm_dynamic_variables": {}
          },
          "name": "send_email_confirmation"
        },
        "query": {},
        "params": {},
        "headers": {
          "host": "your-instance.app.n8n.cloud",
          "accept": "application/json, text/plain, */*",
          "cf-ray": "925f6cd523d6c77a-SEA",
          "cdn-loop": "cloudflare; loops=1; subreqs=1",
          "cf-ew-via": "15",
          "cf-worker": "n8n.cloud",
          "x-real-ip": "100.20.5.228",
          "cf-visitor": "{\"scheme\":\"https\"}",
          "user-agent": "axios/1.7.7",
          "cf-ipcountry": "US",
          "content-type": "application/json",
          "x-is-trusted": "yes",
          "content-length": "12572",
          "accept-encoding": "gzip, br",
          "x-forwarded-for": "100.20.5.228, 172.71.147.101",
          "cf-connecting-ip": "100.20.5.228",
          "x-forwarded-host": "your-instance.app.n8n.cloud",
          "x-forwarded-port": "443",
          "x-forwarded-proto": "https",
          "x-forwarded-server": "traefik-prod-users-gwc-44-68df68bcf-shrw2",
          "x-retell-signature": "v=1742916370585,d=f2a2305f630c02e30127dabb9db80a9756c0ed03318245e5c4b5745620ac7b72"
        },
        "webhookUrl": "https://your-instance.app.n8n.cloud/webhook/hotel-retell-template",
        "executionMode": "production"
      }
    ]
  },
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "[Replace me!] Set response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "[Replace me!] Set response": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 客户支持, 人工智能, IT 运维

需要付费吗?

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

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

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

作者
Agent Studio

Agent Studio

@agentstudio

We are a product studio that helps organizations leverage no-code and generative AI to automate internal processes and launch new digital products. LinkedIn: https://www.linkedin.com/in/baptistej/

外部链接
在 n8n.io 查看

分享此工作流