
1. Place both PHP files on your server.
2. Replace 'YOUR_VOICEFLOW_API_KEY' and 'YOUR_FRESHCHAT_API_KEY' in flush-buffer.php.
3. Set Freshchat webhook to: https://yourdomain.com/freshchat-webhook.php
4. Add a cron job to run flush-buffer.php every minute:
   * * * * * php /path-to/flush-buffer.php
5. Check:
   - log.txt: for raw webhook data
   - chat_buffer.json: for buffered user messages
   - voiceflow_replies.txt: to see what was sent to and received from Voiceflow
