8
n8n 中文网amn8n.com

酒店预订系统

高级

这是一个Social Media领域的自动化工作流,包含 22 个节点。主要使用 Set, Gmail, Filter, Switch, GoogleSheets 等节点。 使用 Gmail 和 Google Sheets 实现酒店宾客旅程自动化

前置要求
  • Google 账号和 Gmail API 凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "FgamqYDVNixmK2gV",
  "meta": {
    "instanceId": "f080fafc9937b6b383f471ad8cc35ad1727032832bd16212f900e0577db46644",
    "templateCredsSetupCompleted": true
  },
  "name": "酒店预订系统",
  "tags": [],
  "nodes": [
    {
      "id": "7befd68e-1976-4e76-a283-f00955b26582",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        336
      ],
      "parameters": {
        "color": 6,
        "width": 512,
        "height": 240,
        "content": "🏨 入住前欢迎邮件自动化"
      },
      "typeVersion": 1
    },
    {
      "id": "c25c0e43-0a84-449a-856f-e0c37d166bc8",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        400,
        640
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "db181591-4b20-4919-acf7-de13edddd5a0",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        592,
        640
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0583a748-dcd8-401e-8462-d9cf9920940f",
              "name": "Hotel Name",
              "type": "string",
              "value": "Mr. Wonderful"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "42dcd64c-0fba-4886-957e-fe6f76ac0171",
      "name": "条件分支",
      "type": "n8n-nodes-base.switch",
      "position": [
        1184,
        672
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "welcome email",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "a94938f6-a07d-49d4-a279-73cb2e6a3a6e",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ Boolean(Math.ceil(DateTime.fromFormat($json['Check-in Date'], 'M/d/yyyy HH:mm:ss').diff(DateTime.now(), 'days').days) > 0 && Math.ceil(DateTime.fromFormat($json['Check-in Date'], 'M/d/yyyy HH:mm:ss').diff(DateTime.now(), 'days').days) <= 2) }}",
                    "rightValue": 2
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Write Review",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b78e6271-d55b-43a5-b44f-c44c2e3d9c0b",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ Boolean(Math.abs(DateTime.fromFormat($json['Check-out Date'], 'M/d/yyyy HH:mm:ss').diff(DateTime.now(), 'days').days) >= 1 && Math.abs(DateTime.fromFormat($json['Check-out Date'], 'M/d/yyyy HH:mm:ss').diff(DateTime.now(), 'days').days) <= 2) }}",
                    "rightValue": 1
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {},
        "looseTypeValidation": true
      },
      "typeVersion": 3.2
    },
    {
      "id": "136a56f4-c7e3-4231-ac45-ecc17bb381bd",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        336
      ],
      "parameters": {
        "color": 6,
        "width": 416,
        "height": 256,
        "content": "⭐ 住后评价请求自动化"
      },
      "typeVersion": 1
    },
    {
      "id": "de93fa3f-c28f-4738-95b7-1115f0d2c33e",
      "name": "欢迎邮件",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1744,
        608
      ],
      "webhookId": "0ad03fe4-6be0-4c11-8087-9c62cfeab4b1",
      "parameters": {
        "sendTo": "={{ $json['Guest Email'] }}",
        "message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Hotel Reservation Confirmation</title>\n</head>\n<body style=\"font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; background-color: #f4f7fa; margin: 0; padding: 20px 0;\">\n    \n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" style=\"max-width: 600px; margin: 0 auto; background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1);\">\n        \n        <!-- Header -->\n        <tr>\n            <td style=\"background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%); background-color: #2c5aa0; color: white; padding: 30px 40px; text-align: center;\">\n                <h1 style=\"font-size: 28px; margin: 0 0 10px 0; font-weight: 300;\">[Hotel Name]</h1>\n                <p style=\"font-size: 16px; opacity: 0.9; margin: 0;\">Luxury & Comfort Redefined</p>\n            </td>\n        </tr>\n        \n        <!-- Main Content -->\n        <tr>\n            <td style=\"padding: 40px;\">\n                \n                <!-- Greeting -->\n                <div style=\"font-size: 18px; color: #333; margin-bottom: 20px;\">\n                    Dear <strong>{{ $json['Guest Name'] }}</strong>,\n                </div>\n                \n                <!-- Confirmation Message -->\n                <div style=\"background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%); background-color: #e8f5e8; border-left: 4px solid #28a745; padding: 20px; margin: 25px 0; border-radius: 8px;\">\n                    <p style=\"color: #155724; font-weight: 500; margin: 0;\">🎉 We're thrilled to welcome you to [Hotel Name]! Your reservation is confirmed for {{ $json['Check-in Date'] }} to {{ $json['Check-out Date'] }}.</p>\n                </div>\n                \n                <!-- Reservation Details Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"display: flex; align-items: center; font-size: 20px; color: #2c5aa0; margin-bottom: 20px; font-weight: 600;\">\n                        <span style=\"margin-right: 12px; font-size: 24px;\">🏨</span>\n                        Your Reservation Details\n                    </h2>\n                    \n                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" style=\"background: #f8f9fa; border-radius: 8px; padding: 25px;\">\n                        <tr>\n                            <td style=\"padding: 12px 0; border-bottom: 1px solid #e9ecef;\">\n                                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                    <tr>\n                                        <td style=\"font-weight: 600; color: #495057;\">Reservation ID:</td>\n                                        <td style=\"color: #2c5aa0; font-weight: 500; text-align: right;\">{{ $json['Booking ID'] }}</td>\n                                    </tr>\n                                </table>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"padding: 12px 0; border-bottom: 1px solid #e9ecef;\">\n                                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                    <tr>\n                                        <td style=\"font-weight: 600; color: #495057;\">Room Type:</td>\n                                        <td style=\"color: #2c5aa0; font-weight: 500; text-align: right;\">{{ $json['Room Type'] }}</td>\n                                    </tr>\n                                </table>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"padding: 12px 0; border-bottom: 1px solid #e9ecef;\">\n                                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                    <tr>\n                                        <td style=\"font-weight: 600; color: #495057;\">Number of Guests:</td>\n                                        <td style=\"color: #2c5aa0; font-weight: 500; text-align: right;\">{{ $json['Guest Count'] }}</td>\n                                    </tr>\n                                </table>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"padding: 12px 0; border-bottom: 1px solid #e9ecef;\">\n                                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                    <tr>\n                                        <td style=\"font-weight: 600; color: #495057;\">Check-in:</td>\n                                        <td style=\"color: #2c5aa0; font-weight: 500; text-align: right;\">{{ $json['Check-in Date'] }} (3:00 PM)</td>\n                                    </tr>\n                                </table>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"padding: 12px 0;\">\n                                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                    <tr>\n                                        <td style=\"font-weight: 600; color: #495057;\">Check-out:</td>\n                                        <td style=\"color: #2c5aa0; font-weight: 500; text-align: right;\">{{ $json['Check-out Date'] }} (11:00 AM)</td>\n                                    </tr>\n                                </table>\n                            </td>\n                        </tr>\n                    </table>\n                </div>\n                \n                <!-- Amenities Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"font-size: 20px; color: #2c5aa0; margin-bottom: 20px; font-weight: 600;\">\n                        <span style=\"margin-right: 12px; font-size: 24px;\">🅿️</span>\n                        What You Need to Know\n                    </h2>\n                    \n                    <div style=\"background: white; margin: 12px 0; padding: 15px 20px; border-radius: 8px; border-left: 4px solid #2c5aa0; box-shadow: 0 2px 8px rgba(0,0,0,0.05);\">\n                        <div style=\"font-weight: 600; color: #2c5aa0; margin-bottom: 5px;\">Free WiFi</div>\n                        <div style=\"color: #666;\">Network: HotelGuest | Password: welcome2024</div>\n                    </div>\n                    \n                    <div style=\"background: white; margin: 12px 0; padding: 15px 20px; border-radius: 8px; border-left: 4px solid #2c5aa0; box-shadow: 0 2px 8px rgba(0,0,0,0.05);\">\n                        <div style=\"font-weight: 600; color: #2c5aa0; margin-bottom: 5px;\">Complimentary Breakfast</div>\n                        <div style=\"color: #666;\">Available daily from 7:00 AM - 10:00 AM</div>\n                    </div>\n                    \n                    <div style=\"background: white; margin: 12px 0; padding: 15px 20px; border-radius: 8px; border-left: 4px solid #2c5aa0; box-shadow: 0 2px 8px rgba(0,0,0,0.05);\">\n                        <div style=\"font-weight: 600; color: #2c5aa0; margin-bottom: 5px;\">Parking</div>\n                        <div style=\"color: #666;\">Available on-site for $15/night</div>\n                    </div>\n                    \n                    <div style=\"background: white; margin: 12px 0; padding: 15px 20px; border-radius: 8px; border-left: 4px solid #2c5aa0; box-shadow: 0 2px 8px rgba(0,0,0,0.05);\">\n                        <div style=\"font-weight: 600; color: #2c5aa0; margin-bottom: 5px;\">Fitness Center</div>\n                        <div style=\"color: #666;\">Open 24/7 for all guests</div>\n                    </div>\n                </div>\n                \n                <!-- Contact Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"font-size: 20px; color: #2c5aa0; margin-bottom: 20px; font-weight: 600;\">\n                        <span style=\"margin-right: 12px; font-size: 24px;\">📞</span>\n                        Contact Us\n                    </h2>\n                    \n                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                        <tr>\n                            <td width=\"50%\" style=\"padding-right: 10px;\">\n                                <div style=\"background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); background-color: #f8f9fa; padding: 20px; border-radius: 8px; text-align: center; border: 2px solid #e9ecef;\">\n                                    <div style=\"font-weight: 600; color: #2c5aa0; margin-bottom: 10px;\">Front Desk</div>\n                                    <div style=\"color: #495057; font-weight: 500;\">\n                                        <a href=\"tel:+15551234567\" style=\"color: #2c5aa0; text-decoration: none;\">+1 (555) 123-4567</a>\n                                    </div>\n                                </div>\n                            </td>\n                            <td width=\"50%\" style=\"padding-left: 10px;\">\n                                <div style=\"background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); background-color: #f8f9fa; padding: 20px; border-radius: 8px; text-align: center; border: 2px solid #e9ecef;\">\n                                    <div style=\"font-weight: 600; color: #2c5aa0; margin-bottom: 10px;\">Concierge</div>\n                                    <div style=\"color: #495057; font-weight: 500;\">\n                                        <a href=\"mailto:concierge@yourhotel.com\" style=\"color: #2c5aa0; text-decoration: none;\">concierge@yourhotel.com</a>\n                                    </div>\n                                </div>\n                            </td>\n                        </tr>\n                    </table>\n                </div>\n                \n            </td>\n        </tr>\n        \n        <!-- Footer -->\n        <tr>\n            <td style=\"background: #2c5aa0; color: white; padding: 30px 40px; text-align: center;\">\n                <div style=\"font-size: 18px; margin-bottom: 15px;\">We can't wait to make your stay memorable!</div>\n                <div style=\"opacity: 0.9; font-style: italic;\">\n                    Warm regards,<br>\n                    <strong>The [Hotel Name] Team</strong>\n                </div>\n            </td>\n        </tr>\n        \n    </table>\n    \n</body>\n</html>\n",
        "options": {},
        "subject": "Welcome to Hotel - Your Stay Begins Soon! 🏨"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "NaIYTcsDtoNYLBYA",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "1e7320e3-3824-4151-833c-77c8565852d8",
      "name": "撰写评价",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1712,
        848
      ],
      "webhookId": "0ad03fe4-6be0-4c11-8087-9c62cfeab4b1",
      "parameters": {
        "sendTo": "={{ $('Filter Upcoming Guest').item.json['Guest Email'] }}",
        "message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Thank You for Your Stay - Share Your Experience</title>\n</head>\n<body style=\"font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; background-color: #f4f7fa; margin: 0; padding: 20px 0;\">\n    \n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" style=\"max-width: 600px; margin: 0 auto; background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1);\">\n        \n        <!-- Header -->\n        <tr>\n            <td style=\"background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%); background-color: #2c5aa0; color: white; padding: 30px 40px; text-align: center;\">\n                <h1 style=\"font-size: 28px; margin: 0 0 10px 0; font-weight: 300;\">{{ $('Edit Fields').item.json['Hotel Name'] }}</h1>\n                <p style=\"font-size: 16px; opacity: 0.9; margin: 0;\">Thank You for Choosing Us</p>\n            </td>\n        </tr>\n        \n        <!-- Main Content -->\n        <tr>\n            <td style=\"padding: 40px;\">\n                \n                <!-- Greeting -->\n                <div style=\"font-size: 18px; color: #333; margin-bottom: 20px;\">\n                    Dear <strong>{{ $json['Guest Name'] }}</strong>,\n                </div>\n                \n                <!-- Thank You Message -->\n                <div style=\"background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%); background-color: #e8f5e8; border-left: 4px solid #28a745; padding: 20px; margin: 25px 0; border-radius: 8px;\">\n                    <p style=\"color: #155724; font-weight: 500; margin: 0;\">🙏 Thank you for staying with us from {{ $json['Check-in Date'] }} to {{ $json['Check-out Date'] }}. We hope you had a wonderful experience!</p>\n                </div>\n                \n                <!-- Review Request Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"display: flex; align-items: center; font-size: 20px; color: #2c5aa0; margin-bottom: 20px; font-weight: 600;\">\n                        <span style=\"margin-right: 12px; font-size: 24px;\">⭐</span>\n                        Share Your Experience\n                    </h2>\n                    \n                    <div style=\"background: #f8f9fa; border-radius: 8px; padding: 25px; text-align: center;\">\n                        <p style=\"color: #495057; font-size: 16px; margin-bottom: 25px;\">Your feedback helps us improve and helps future guests make informed decisions. Would you mind taking a moment to share your experience?</p>\n                        \n                        <!-- Google Review Button -->\n                        <div style=\"margin: 20px 0;\">\n                            <a href=\"https://g.page/r/[YOUR_GOOGLE_BUSINESS_ID]/review\" style=\"display: inline-block; background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%); background-color: #4285f4; color: white; padding: 15px 30px; text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 16px; box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);\">\n                                📝 Write a Google Review\n                            </a>\n                        </div>\n                        \n                        <p style=\"color: #666; font-size: 14px; margin-top: 15px;\">It only takes 2 minutes and means the world to us!</p>\n                    </div>\n                </div>\n                \n                <!-- Stay Summary Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"display: flex; align-items: center; font-size: 20px; color: #2c5aa0; margin-bottom: 20px; font-weight: 600;\">\n                        <span style=\"margin-right: 12px; font-size: 24px;\">🏨</span>\n                        Your Recent Stay\n                    </h2>\n                    \n                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" style=\"background: #f8f9fa; border-radius: 8px; padding: 25px;\">\n                        <tr>\n                            <td style=\"padding: 12px 0; border-bottom: 1px solid #e9ecef;\">\n                                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                    <tr>\n                                        <td style=\"font-weight: 600; color: #495057;\">Reservation ID:</td>\n                                        <td style=\"color: #2c5aa0; font-weight: 500; text-align: right;\">{{ $json['Booking ID'] }}</td>\n                                    </tr>\n                                </table>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"padding: 12px 0; border-bottom: 1px solid #e9ecef;\">\n                                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                    <tr>\n                                        <td style=\"font-weight: 600; color: #495057;\">Room Type:</td>\n                                        <td style=\"color: #2c5aa0; font-weight: 500; text-align: right;\">{{ $json['Room Type'] }}</td>\n                                    </tr>\n                                </table>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"padding: 12px 0; border-bottom: 1px solid #e9ecef;\">\n                                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                    <tr>\n                                        <td style=\"font-weight: 600; color: #495057;\">Stay Duration:</td>\n                                        <td style=\"color: #2c5aa0; font-weight: 500; text-align: right;\">{{ $json['Check-in Date'] }} to {{ $json['Check-out Date'] }}</td>\n                                    </tr>\n                                </table>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td style=\"padding: 12px 0;\">\n                                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                    <tr>\n                                        <td style=\"font-weight: 600; color: #495057;\">Guests:</td>\n                                        <td style=\"color: #2c5aa0; font-weight: 500; text-align: right;\">{{ $json['Guest Count'] }}</td>\n                                    </tr>\n                                </table>\n                            </td>\n                        </tr>\n                    </table>\n                </div>\n                \n                <!-- Special Offers Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"font-size: 20px; color: #2c5aa0; margin-bottom: 20px; font-weight: 600;\">\n                        <span style=\"margin-right: 12px; font-size: 24px;\">🎁</span>\n                        Exclusive Offers for Our Valued Guests\n                    </h2>\n                    \n                    <div style=\"background: linear-gradient(135deg, #fff3cd 0%, #fef7e3 100%); background-color: #fff3cd; border-left: 4px solid #ffc107; padding: 20px; margin: 15px 0; border-radius: 8px;\">\n                        <div style=\"font-weight: 600; color: #856404; margin-bottom: 5px;\">🎯 Return Guest Discount</div>\n                        <div style=\"color: #856404;\">Book your next stay and enjoy 15% off with code: WELCOME_BACK</div>\n                    </div>\n                    \n                    <div style=\"background: linear-gradient(135deg, #d1ecf1 0%, #e8f4f7 100%); background-color: #d1ecf1; border-left: 4px solid #17a2b8; padding: 20px; margin: 15px 0; border-radius: 8px;\">\n                        <div style=\"font-weight: 600; color: #0c5460; margin-bottom: 5px;\">📧 Stay Updated</div>\n                        <div style=\"color: #0c5460;\">Follow us on social media for exclusive deals and updates</div>\n                    </div>\n                </div>\n                \n                <!-- Contact Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"font-size: 20px; color: #2c5aa0; margin-bottom: 20px; font-weight: 600;\">\n                        <span style=\"margin-right: 12px; font-size: 24px;\">📞</span>\n                        Stay Connected\n                    </h2>\n                    \n                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                        <tr>\n                            <td width=\"50%\" style=\"padding-right: 10px;\">\n                                <div style=\"background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); background-color: #f8f9fa; padding: 20px; border-radius: 8px; text-align: center; border: 2px solid #e9ecef;\">\n                                    <div style=\"font-weight: 600; color: #2c5aa0; margin-bottom: 10px;\">Questions?</div>\n                                    <div style=\"color: #495057; font-weight: 500;\">\n                                        <a href=\"tel:+15551234567\" style=\"color: #2c5aa0; text-decoration: none;\">+1 (555) 123-4567</a>\n                                    </div>\n                                </div>\n                            </td>\n                            <td width=\"50%\" style=\"padding-left: 10px;\">\n                                <div style=\"background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); background-color: #f8f9fa; padding: 20px; border-radius: 8px; text-align: center; border: 2px solid #e9ecef;\">\n                                    <div style=\"font-weight: 600; color: #2c5aa0; margin-bottom: 10px;\">Email Us</div>\n                                    <div style=\"color: #495057; font-weight: 500;\">\n                                        <a href=\"mailto:guest.services@yourhotel.com\" style=\"color: #2c5aa0; text-decoration: none;\">guest.services@yourhotel.com</a>\n                                    </div>\n                                </div>\n                            </td>\n                        </tr>\n                    </table>\n                </div>\n                \n            </td>\n        </tr>\n        \n        <!-- Footer -->\n        <tr>\n            <td style=\"background: #2c5aa0; color: white; padding: 30px 40px; text-align: center;\">\n                <div style=\"font-size: 18px; margin-bottom: 15px;\">Thank you for being our valued guest!</div>\n                <div style=\"opacity: 0.9; font-style: italic;\">\n                    We look forward to welcoming you back soon,<br>\n                    <strong> {{ $('Edit Fields').item.json['Hotel Name'] }}</strong>\n                </div>\n            </td>\n        </tr>\n        \n    </table>\n    \n</body>\n</html>\n",
        "options": {},
        "subject": "= {{ $json['Guest Name'] }}, thank you for staying with  {{ $('Edit Fields').item.json['Hotel Name'] }} ⭐"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "NaIYTcsDtoNYLBYA",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "a1b1c191-ab75-4b91-821e-c93af3502970",
      "name": "每日早上6点",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        336,
        1520
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 6 * * *"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2ad1c6ca-ddc3-4341-a57b-af2cb0b409f2",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        1280
      ],
      "parameters": {
        "color": 6,
        "width": 496,
        "height": 208,
        "content": "📋 每日入住与退房自动化"
      },
      "typeVersion": 1
    },
    {
      "id": "a026265f-89b7-4eaf-978e-78da9196bc58",
      "name": "获取酒店预订",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        752,
        640
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Welcome Email Sent"
            },
            {
              "lookupColumn": "Write Review Email Sent"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU/edit#gid=0",
          "cachedResultName": "Reservations"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU/edit?usp=drivesdk",
          "cachedResultName": "Hotel Bookings"
        },
        "combineFilters": "OR"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "XruFPA2NpYd9OmBT",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "4d3de6a5-c629-4441-98ad-72fcc7749d18",
      "name": "筛选即将入住的客人",
      "type": "n8n-nodes-base.filter",
      "position": [
        944,
        640
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "8dfa9584-8029-48e0-98c7-37c1d5682610",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json['Welcome Email Sent'] }}",
              "rightValue": ""
            },
            {
              "id": "8b25deed-f37f-4b10-bf77-0dc82ac7c444",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json['Write Review Email Sent'] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "54f73600-b1f4-43e9-8cf1-085c870b2914",
      "name": "筛选今日入住",
      "type": "n8n-nodes-base.filter",
      "position": [
        1008,
        1488
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "acd4f2a7-c6a1-4920-8627-481c450d6ff0",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ DateTime.fromFormat($json['Check-in Date'], 'M/d/yyyy HH:mm:ss').toFormat('M/d/yyyy') }}\n",
              "rightValue": "={{ DateTime.now().toFormat('M/d/yyyy') }}\n"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "56671ab0-8308-43be-bba8-9bdb0785876a",
      "name": "筛选今日退房",
      "type": "n8n-nodes-base.filter",
      "position": [
        1008,
        1696
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "47e1f2e5-d620-478e-bd4f-c993c5f4d2e7",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ DateTime.fromFormat($json['Check-out Date'], 'M/d/yyyy HH:mm:ss').toFormat('M/d/yyyy') }}",
              "rightValue": "={{ DateTime.now().toFormat('M/d/yyyy') }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6d4a09b8-e497-4eff-872b-d607502dc134",
      "name": "添加信息",
      "type": "n8n-nodes-base.set",
      "position": [
        512,
        1520
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0583a748-dcd8-401e-8462-d9cf9920940f",
              "name": "Hotel Name",
              "type": "string",
              "value": "Mr. Wonderful"
            },
            {
              "id": "a61803b1-6de2-4479-85eb-e40a65e12cdf",
              "name": "staff mail a",
              "type": "string",
              "value": "staff@gmail.com"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "f7b35941-581c-4151-bb15-b5819e329bbf",
      "name": "创建邮件HTML",
      "type": "n8n-nodes-base.set",
      "position": [
        1280,
        1568
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a77d772a-a21c-4cf1-be5c-17cdb1e79a06",
              "name": "daily_report",
              "type": "string",
              "value": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Daily Hotel Operations Report</title>\n</head>\n<body style=\"font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; background-color: #f4f7fa; margin: 0; padding: 20px 0;\">\n    \n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" style=\"max-width: 700px; margin: 0 auto; background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1);\">\n        \n        <!-- Header -->\n        <tr>\n            <td style=\"background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%); background-color: #2c5aa0; color: white; padding: 30px 40px; text-align: center;\">\n                <h1 style=\"font-size: 26px; margin: 0 0 10px 0; font-weight: 600;\">📅 DAILY OPERATIONS REPORT</h1>\n                <p style=\"font-size: 18px; opacity: 0.9; margin: 0;\">Sunday 27 July 2025</p>\n                <p style=\"font-size: 14px; opacity: 0.8; margin: 5px 0 0 0;\">{{ $('Add Information').item.json['Hotel Name'] }} - Staff Internal Report</p>\n            </td>\n        </tr>\n        \n        <!-- Main Content -->\n        <tr>\n            <td style=\"padding: 30px 40px;\">\n                \n                <!-- Summary Cards -->\n                <div style=\"display: flex; margin-bottom: 30px;\">\n                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                        <tr>\n                            <td width=\"50%\" style=\"padding-right: 15px;\">\n                                <div style=\"background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%); background-color: #e8f5e8; border-left: 5px solid #28a745; padding: 20px; border-radius: 8px; text-align: center;\">\n                                    <div style=\"font-size: 24px; font-weight: bold; color: #155724;\">1</div>\n                                    <div style=\"color: #155724; font-weight: 600;\">🟢 ARRIVALS TODAY</div>\n                                </div>\n                            </td>\n                            <td width=\"50%\" style=\"padding-left: 15px;\">\n                                <div style=\"background: linear-gradient(135deg, #f8d7da 0%, #fde2e4 100%); background-color: #f8d7da; border-left: 5px solid #dc3545; padding: 20px; border-radius: 8px; text-align: center;\">\n                                    <div style=\"font-size: 24px; font-weight: bold; color: #721c24;\">1</div>\n                                    <div style=\"color: #721c24; font-weight: 600;\">🔴 DEPARTURES TODAY</div>\n                                </div>\n                            </td>\n                        </tr>\n                    </table>\n                </div>\n                \n                <!-- Today's Arrivals Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"display: flex; align-items: center; font-size: 22px; color: #28a745; margin-bottom: 20px; font-weight: 600; border-bottom: 2px solid #28a745; padding-bottom: 10px;\">\n                        <span style=\"margin-right: 12px; font-size: 26px;\">🟢</span>\n                        TODAY'S ARRIVALS (1)\n                    </h2>\n                    \n                    <div style=\"background: #f8f9fa; border-radius: 8px; padding: 20px;\">\n                        <div style=\"background: white; margin: 10px 0; padding: 15px 20px; border-radius: 6px; border-left: 4px solid #28a745; box-shadow: 0 2px 4px rgba(0,0,0,0.1);\">\n                                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                        <tr>\n                                            <td style=\"font-weight: 600; color: #2c5aa0; font-size: 16px;\">John Smith</td>\n                                            <td style=\"text-align: right; color: #666; font-weight: 500;\">ID: HTL001</td>\n                                        </tr>\n                                        <tr>\n                                            <td style=\"color: #666; padding-top: 5px;\">2 guests • Standard Double</td>\n                                            <td style=\"text-align: right; color: #28a745; font-weight: 600; padding-top: 5px;\">Check-in: 3:00 PM</td>\n                                        </tr>\n                                    </table>\n                                </div>\n                    </div>\n                </div>\n                \n                <!-- Today's Departures Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"display: flex; align-items: center; font-size: 22px; color: #dc3545; margin-bottom: 20px; font-weight: 600; border-bottom: 2px solid #dc3545; padding-bottom: 10px;\">\n                        <span style=\"margin-right: 12px; font-size: 26px;\">🔴</span>\n                        TODAY'S DEPARTURES (1)\n                    </h2>\n                    \n                    <div style=\"background: #f8f9fa; border-radius: 8px; padding: 20px;\">\n                        <div style=\"background: white; margin: 10px 0; padding: 15px 20px; border-radius: 6px; border-left: 4px solid #dc3545; box-shadow: 0 2px 4px rgba(0,0,0,0.1);\">\n                                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                        <tr>\n                                            <td style=\"font-weight: 600; color: #2c5aa0; font-size: 16px;\">Sarah Johnson</td>\n                                            <td style=\"text-align: right; color: #666; font-weight: 500;\">ID: HTL002</td>\n                                        </tr>\n                                        <tr>\n                                            <td style=\"color: #666; padding-top: 5px;\">4 guests • Suite</td>\n                                            <td style=\"text-align: right; color: #dc3545; font-weight: 600; padding-top: 5px;\">Check-out: 11:00 AM</td>\n                                        </tr>\n                                    </table>\n                                </div>\n                    </div>\n                </div>\n                \n                <!-- Housekeeping Priorities Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"display: flex; align-items: center; font-size: 22px; color: #6f42c1; margin-bottom: 20px; font-weight: 600; border-bottom: 2px solid #6f42c1; padding-bottom: 10px;\">\n                        <span style=\"margin-right: 12px; font-size: 26px;\">🧹</span>\n                        HOUSEKEEPING PRIORITIES\n                    </h2>\n                    \n                    <div style=\"background: linear-gradient(135deg, #f3e8ff 0%, #faf5ff 100%); background-color: #f3e8ff; border-radius: 8px; padding: 20px;\">\n                        <div style=\"background: white; margin: 8px 0; padding: 12px 18px; border-radius: 6px; border-left: 4px solid #6f42c1;\">\n                                    <span style=\"font-weight: 600; color: #6f42c1;\">Suite</span>\n                                    <span style=\"color: #666;\"> - Clean after Sarah Johnson departure (Booking: HTL002)</span>\n                                </div>\n                    </div>\n                </div>\n                \n                <!-- Front Desk Notes Section -->\n                <div style=\"margin: 30px 0;\">\n                    <h2 style=\"display: flex; align-items: center; font-size: 22px; color: #fd7e14; margin-bottom: 20px; font-weight: 600; border-bottom: 2px solid #fd7e14; padding-bottom: 10px;\">\n                        <span style=\"margin-right: 12px; font-size: 26px;\">📋</span>\n                        FRONT DESK NOTES\n                    </h2>\n                    \n                    <div style=\"background: linear-gradient(135deg, #fff3cd 0%, #fefefe 100%); background-color: #fff3cd; border-radius: 8px; padding: 25px;\">\n                        <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                            <tr>\n                                <td style=\"padding: 8px 0; border-bottom: 1px solid #ffeaa7;\">\n                                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                        <tr>\n                                            <td style=\"font-weight: 600; color: #856404;\">Total arrivals expected:</td>\n                                            <td style=\"text-align: right; color: #856404; font-weight: 500;\">1</td>\n                                        </tr>\n                                    </table>\n                                </td>\n                            </tr>\n                            <tr>\n                                <td style=\"padding: 8px 0; border-bottom: 1px solid #ffeaa7;\">\n                                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                        <tr>\n                                            <td style=\"font-weight: 600; color: #856404;\">Total departures to process:</td>\n                                            <td style=\"text-align: right; color: #856404; font-weight: 500;\">1</td>\n                                        </tr>\n                                    </table>\n                                </td>\n                            </tr>\n                            <tr>\n                                <td style=\"padding: 8px 0; border-bottom: 1px solid #ffeaa7;\">\n                                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                        <tr>\n                                            <td style=\"font-weight: 600; color: #856404;\">Peak check-in time:</td>\n                                            <td style=\"text-align: right; color: #856404; font-weight: 500;\">3:00 PM - 6:00 PM</td>\n                                        </tr>\n                                    </table>\n                                </td>\n                            </tr>\n                            <tr>\n                                <td style=\"padding: 8px 0;\">\n                                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n                                        <tr>\n                                            <td style=\"font-weight: 600; color: #856404;\">Peak check-out time:</td>\n                                            <td style=\"text-align: right; color: #856404; font-weight: 500;\">10:00 AM - 11:00 AM</td>\n                                        </tr>\n                                    </table>\n                                </td>\n                            </tr>\n                        </table>\n                    </div>\n                </div>\n                \n            </td>\n        </tr>\n        \n        <!-- Footer -->\n        <tr>\n            <td style=\"background: #2c5aa0; color: white; padding: 25px 40px; text-align: center;\">\n                <div style=\"font-size: 16px; margin-bottom: 10px;\">🤖 Generated automatically by Hotel Management System</div>\n                <div style=\"opacity: 0.9; font-size: 14px;\">\n                    Report generated at 11:13 PM • Sunday 27 July 2025\n                </div>\n                <div style=\"opacity: 0.8; font-size: 12px; margin-top: 10px;\">\n                    For questions, contact IT Support\n                </div>\n            </td>\n        </tr>\n        \n    </table>\n    \n</body>\n</html>\n"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "af87b761-f185-4b3c-8d2a-6e83739c98c7",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        288
      ],
      "parameters": {
        "width": 480,
        "height": 1056,
        "content": "🏨 酒店宾客沟通自动化"
      },
      "typeVersion": 1
    },
    {
      "id": "a7314fef-efc9-4c72-b1b5-b03ac1f7b625",
      "name": "筛选未发送的欢迎邮件",
      "type": "n8n-nodes-base.filter",
      "position": [
        1456,
        608
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c185dcb7-eec6-48c1-b0fb-9662bfdca7b5",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $('Get Hotel Reservation').item.json['Welcome Email Sent'] }}",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "84f4af1e-ae12-474b-970b-c72cccaa7e4a",
      "name": "筛选未发送的评价请求",
      "type": "n8n-nodes-base.filter",
      "position": [
        1456,
        832
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c185dcb7-eec6-48c1-b0fb-9662bfdca7b5",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json['Write Review Email Sent'] }}",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "fcc8fcde-b050-41cd-900c-655c222d0fa9",
      "name": "标记欢迎邮件为已发送",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1952,
        608
      ],
      "parameters": {
        "columns": {
          "value": {
            "Booking ID": "={{ $('Filter Unsent Welcome Emails').item.json['Booking ID'] }}",
            "Welcome Email Date": "={{ DateTime.now().setZone('Asia/Kolkata').toFormat('M/d/yy HH:mm:ss') }}\n",
            "Welcome Email Sent": "yes"
          },
          "schema": [
            {
              "id": "Booking ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Booking ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Guest Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Guest Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Guest Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Guest Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Check-in Date",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Check-in Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Check-out Date",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Check-out Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Room Type",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Room Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Guest Count",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Guest Count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Welcome Email Sent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Welcome Email Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Welcome Email Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Welcome Email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Booking ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU/edit#gid=0",
          "cachedResultName": "Reservations"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU/edit?usp=drivesdk",
          "cachedResultName": "Hotel Bookings"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "XruFPA2NpYd9OmBT",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "e868be76-2548-409b-a07f-aecad9c8492d",
      "name": "标记评价邮件为已发送",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1936,
        848
      ],
      "parameters": {
        "columns": {
          "value": {
            "Booking ID": "={{ $('Get Hotel Reservation').item.json['Booking ID'] }}",
            "Write Review Email Date": "={{ DateTime.now().setZone('Asia/Kolkata').toFormat('M/d/yy HH:mm:ss') }}",
            "Write Review Email Sent": "yes"
          },
          "schema": [
            {
              "id": "Booking ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Booking ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Guest Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Guest Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Guest Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Guest Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Check-in Date",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Check-in Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Check-out Date",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Check-out Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Room Type",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Room Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Guest Count",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Guest Count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Welcome Email Sent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Welcome Email Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Welcome Email Date",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Welcome Email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Write Review Email Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Write Review Email Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Write Review Email Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Write Review Email Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Booking ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU/edit#gid=0",
          "cachedResultName": "Reservations"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU/edit?usp=drivesdk",
          "cachedResultName": "Hotel Bookings"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "XruFPA2NpYd9OmBT",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "0ca981cf-f1cc-454d-ae86-21a8cd385c0c",
      "name": "发送每日员工报告",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1488,
        1568
      ],
      "webhookId": "6e9adac6-1361-470d-89e6-e205dcfe5adc",
      "parameters": {
        "sendTo": "={{ $('Add Information').item.json['staff mail a'] }}",
        "message": "={{ $json.daily_report }}",
        "options": {},
        "subject": "={{ $('Add Information').item.json['Day of month'] }} {{ $('Add Information').item.json.Month }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "NaIYTcsDtoNYLBYA",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "eec36efc-0b64-4c72-9b93-e15d394e9faf",
      "name": "获取所有预订",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        736,
        1520
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU/edit#gid=0",
          "cachedResultName": "Reservations"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zb-3FQcMOetj4cs1OUOYrpbv-2f3FnQELMPRIyLsNJU/edit?usp=drivesdk",
          "cachedResultName": "Hotel Bookings"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "XruFPA2NpYd9OmBT",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "timezone": "Asia/Kolkata",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "dfc76dc6-5a33-46b3-9af1-689e542ea551",
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Filter Unsent Welcome Emails",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Filter Unsent Review Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Get Hotel Reservation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Review": {
      "main": [
        [
          {
            "node": "Mark Review Email as Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily at 6 AM": {
      "main": [
        [
          {
            "node": "Add Information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Welcome Email": {
      "main": [
        [
          {
            "node": "Mark Welcome Email as Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Information": {
      "main": [
        [
          {
            "node": "Get All Reservations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create E mail HTMl": {
      "main": [
        [
          {
            "node": "Send Daily Staff Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Reservations": {
      "main": [
        [
          {
            "node": "Filter Today's Arrivals",
            "type": "main",
            "index": 0
          },
          {
            "node": "Filter Today's Departures",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Upcoming Guest": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Hotel Reservation": {
      "main": [
        [
          {
            "node": "Filter Upcoming Guest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Today's Arrivals": {
      "main": [
        [
          {
            "node": "Create E mail HTMl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Today's Departures": {
      "main": [
        [
          {
            "node": "Create E mail HTMl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Unsent Welcome Emails": {
      "main": [
        [
          {
            "node": "Welcome Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Unsent Review Requests": {
      "main": [
        [
          {
            "node": "Write Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 社交媒体

需要付费吗?

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

工作流信息
难度等级
高级
节点数量22
分类1
节点类型7
难度说明

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

外部链接
在 n8n.io 查看

分享此工作流