n8n

How to Automate WhatsApp Booking Management?

Handle secure booking requests coming from chat. The flow receives encrypted form data, reads the current screen, and returns the right options in real time. It fits teams that schedule visits, classes, or service slots over WhatsApp.

An incoming webhook collects a POST with three encrypted parts. The next step converts base64 strings into binary and uses a private key to unlock the data, which is a safe mix of RSA and AES. A parser cleans the payload and finds the screen value. A switch sends the data to the right branch, such as grouping appointment times or reading seat choices. One branch groups times by date and builds a clear list. Another branch extracts seats from the payload. The reply is then encrypted again and sent back through the webhook with a 200 code.

Set the webhook URL in your WhatsApp Business Platform app and paste your private key in the decryption node. Map field names to match your flow and adjust the switch rules for your screens. Expect faster replies, fewer errors, and clear choices for users. Good fits include clinics, salons, service teams, and training centers that take bookings inside chat.

What are the key features?

  • Webhook receiver takes POST requests and returns a 200 response when done.
  • Base64 converter prepares encrypted parts for decryption.
  • Hybrid decryption uses RSA to unlock the AES key and AES to open the payload.
  • JSON parser standardizes fields and exposes the current screen.
  • Switch node routes to the right branch based on screen values such as appointment or seats.
  • Appointment logic groups times by date to build a clean list for the user.
  • Second branch extracts seat data from the payload for selection steps.
  • Response is re encrypted and returned through the webhook to keep data secure.

What are the benefits?

  • Reduce manual scheduling from 60 minutes to 5 minutes per day
  • Streamline booking replies by up to 70 percent with instant routing
  • Eliminate up to 90 percent of copy and paste errors
  • Handle up to 5 times more chat requests at the same time
  • Keep sensitive booking data encrypted from start to finish
  • Connect WhatsApp chat with booking logic without extra tools

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You will need accounts with WhatsApp Business Platform. See the Tools Required section above for links to create accounts with these services.
  3. Open the Webhook node and set the path to flow, method to POST, and response mode to respond via another node. Copy the test and production URLs.
  4. In your WhatsApp Business Platform app settings, set the webhook endpoint to the production URL and enable POST requests to send the encrypted fields.
  5. Open the Decryption Code node and paste your RSA private key in the provided section. Keep the header and footer lines intact.
  6. Open the move to base64 node and confirm the field names match encrypted_flow_data, encrypted_aes_key, and initial_vector from your request.
  7. Review the JSON Parser node and make sure it extracts the screen value and other fields you need.
  8. In the Switch node, add rules for each screen your flow uses, for example APPOINTMENT or SEATS. Match the exact case of your payload.
  9. Open Data Extraction Code and map appointment_date and start_time fields to your data structure. Adjust the grouping if your format is different.
  10. Open Data Extraction Code1 and map the seat data path from decryptedPayload if your flow includes seat choice steps.
  11. Check Encrypt Return and Encrypt Return1 to confirm they read the initial vector and output the encrypted body that your chat step expects.
  12. Run a test from your WhatsApp Business Platform sandbox, send a sample request, and confirm a 200 response with the expected encrypted body.
  13. If decryption fails, verify the private key, base64 inputs, and that the AES mode and initial vector match your sender settings.
  14. Turn on the workflow and monitor executions. Adjust Switch rules and mapping as you add more screens.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

WhatsApp Business Platform

Sign up

Service conversations: $0 (unlimited; effective Nov 1, 2024)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.