使用Twilio Webhook通过短信发送自动预约提醒

初级

这是一个Support Chatbot领域的自动化工作流,包含 3 个节点。主要使用 Code、Twilio、Webhook 等节点。 使用Twilio Webhook通过短信发送自动预约提醒

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)

使用的节点 (3 个)

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "9e7a0fea-06bb-4067-9643-ade20a9b3e94",
      "name": "提醒 Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        80,
        240
      ],
      "webhookId": "appointment-reminder-webhook",
      "parameters": {
        "path": "appointment-reminder",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 1
    },
    {
      "id": "670667bb-06eb-4db0-8976-1f7edcbd9f42",
      "name": "提取预约数据",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        240
      ],
      "parameters": {
        "jsCode": "// This node extracts and formats the appointment data from the incoming webhook.\n// The expected webhook payload from your booking software should look something like this:\n// {\n//   \"customer_name\": \"John Doe\",\n//   \"customer_phone\": \"+14155552671\",\n//   \"appointment_id\": \"appt_12345\",\n//   \"appointment_service\": \"Consultation\",\n//   \"appointment_time\": \"2025-08-04 14:00:00\"\n// }\n\nconst webhookData = $input.item.json.body || {};\n\n// Basic data extraction and validation\nconst customerName = webhookData.customer_name || 'Valued Customer';\nconst customerPhone = webhookData.customer_phone;\nconst appointmentTime = webhookData.appointment_time || 'today';\nconst serviceName = webhookData.appointment_service || 'your appointment';\nconst appointmentId = webhookData.appointment_id || 'no-id-provided';\n\nif (!customerPhone) {\n  throw new Error('No customer phone number found in webhook data');\n}\n\n// Format the appointment time for the SMS message\n// You can customize the date formatting here if needed.\nconst formattedTime = new Date(appointmentTime).toLocaleString('en-US', {\n  weekday: 'short',\n  month: 'short',\n  day: 'numeric',\n  hour: 'numeric',\n  minute: 'numeric'\n});\n\nreturn {\n  json: {\n    customer_name: customerName,\n    customer_phone: customerPhone,\n    appointment_time: formattedTime,\n    service_name: serviceName,\n    appointment_id: appointmentId,\n    raw_data: webhookData\n  }\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "a50e0125-c361-48b7-8f6c-b001e548ccfb",
      "name": "发送 SMS 提醒",
      "type": "n8n-nodes-base.twilio",
      "position": [
        544,
        240
      ],
      "parameters": {
        "to": "={{ $json.customer_phone }}",
        "message": "={{ 'Hi ' + $json.customer_name + ', this is a friendly reminder for your ' + $json.service_name + ' appointment on ' + $json.appointment_time + '. We look forward to seeing you! - ' + $('Send SMS Reminder').parameters.from }}",
        "options": {}
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Reminder Webhook": {
      "main": [
        [
          {
            "node": "Extract Appointment Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Appointment Data": {
      "main": [
        [
          {
            "node": "Send SMS Reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

这是一个初级难度的工作流,适用于Support Chatbot等场景。适合 n8n 新手,包含 1-5 个节点的简单工作流

需要付费吗?

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

工作流信息
难度等级
初级
节点数量3
分类1
节点类型3
难度说明

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

作者
David Olusola

David Olusola

@dae221

I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - david@daexai.com

外部链接
在 n8n.io 上查看 →

分享此工作流