8
n8n 中文网amn8n.com

个人预约预订

初级

这是一个Support Chatbot, AI Chatbot领域的自动化工作流,包含 5 个节点。主要使用 If, Webhook, HttpRequest, RespondToWebhook 等节点。 基于语音的预约预订系统,集成ElevenLabs AI和Cal.com

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "JoBrqIuKn4cnNOJ0",
  "meta": {
    "instanceId": "fcb622cbd5234c565b9b78babeaf0ea2455df9d2aad0d1adff7c1ef99583e685"
  },
  "name": "个人预约预订",
  "tags": [],
  "nodes": [
    {
      "id": "d55eb539-6cdf-423a-b50b-62b9f10bf252",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        620,
        620
      ],
      "webhookId": "6e9d32dc-f5ad-4101-9512-c1adb5b455d1",
      "parameters": {
        "path": "appointment-webhook",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "5e8f1544-74c1-40a9-a1db-c9e67295317b",
      "name": "响应Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1320,
        620
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "b07a2c6d-a08c-4b03-942e-b7c7ab749dbd",
      "name": "在 Cal.com 检查可用时段",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1040,
        520
      ],
      "parameters": {
        "url": "https://api.cal.com/v1/slots",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "startTime",
              "value": "={{ $json.body.startTime }}"
            },
            {
              "name": "endTime",
              "value": "={{DateTime.fromISO($json.body.startTime, { zone: 'Asia/Kolkata' })\n  .set({ hour: 18, minute: 0, second: 0 })\n.format(\"yyyy-MM-dd'T'HH:mm:ssZZ\")}}"
            },
            {
              "name": "eventTypeId",
              "value": "event_type_id"
            },
            {
              "name": "timeZone",
              "value": "Asia/Kolkata"
            }
          ]
        },
        "nodeCredentialType": "calApi"
      },
      "credentials": {
        "calApi": {
          "id": "VmW9lgWo1nXe8zQF",
          "name": "Cal account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1fabd0b8-542b-48ac-b95a-993972cebe88",
      "name": "预订预约",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1040,
        720
      ],
      "parameters": {
        "url": "https://api.cal.com/v1/bookings",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"eventTypeId\": event_type_id,\n  \"start\": \"{{ $json.body.startTime }}\",\n  \"end\": \"{{ DateTime.fromISO($json.body.startTime).plus({ minutes: 30 }).format(\"yyyy-MM-dd'T'HH:mm:ssZZ\") }}\",\n  \"responses\": {\n    \"name\": \"{{ $json.body.name }}\",\n    \"email\": \"{{ $json.body.email }}\"\n  },\n  \"timeZone\": \"Asia/Kolkata\",\n  \"language\": \"en\",\n  \"title\": \"Test\",\n\"metadata\":{}\n} ",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "calApi"
      },
      "credentials": {
        "calApi": {
          "id": "VmW9lgWo1nXe8zQF",
          "name": "Cal account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "61f129f5-0102-4055-9c9e-7eb6e004a403",
      "name": "检查是否为可用时段请求",
      "type": "n8n-nodes-base.if",
      "position": [
        820,
        620
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "249d32bd-5a1d-44fe-8b33-975827cef795",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.body.tool }}",
              "rightValue": "checkAvailableSlot"
            }
          ]
        }
      },
      "typeVersion": 2.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e50b589e-7cf1-424a-b518-5877eee50050",
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Check Is Request For Available Slot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Book an Appointment": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check available slot in Cal.com": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Is Request For Available Slot": {
      "main": [
        [
          {
            "node": "Check available slot in Cal.com",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Book an Appointment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

初级 - 客服机器人, AI 聊天机器人

需要付费吗?

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

工作流信息
难度等级
初级
节点数量5
分类2
节点类型4
难度说明

适合 n8n 新手,包含 1-5 个节点的简单工作流

作者
InfyOm Technologies

InfyOm Technologies

@infyom

We are an AI Automation Agency focusing on various AI Automation Services like, workflow automation, shopify automation, chatbot developerment, custom ai agent development and more.

外部链接
在 n8n.io 查看

分享此工作流