report_01HTE5BBJMH64GT031DSJXNBTX
Hi guys, I'm new to botpress and I've run into a hurdle. I'm building a WhatsApp customer loyalty chatbot. In short, the user can enter a receipt number and using the make integration by
@fresh-fireman-491, the recepit number is sent to make and searched in a google sheets containing valid receipts. If the reciept number is found, the user earns points which are contained in a botpress table which can be redeemed at anytime.
The challenge I'm facing is that the google sheet is updated periodically and not in real time (approximately after every 6hrs) so when the user sends their receipt number they have to wait and after some time, earn their points. I've tried a couple of soulutions.
1. Implementing a delay in the execute code:
await new Promise((resolve) => setTimeout(resolve, 2 * 60 * 1000))
The 2 minute delay above works fine in the emulator but when I publish the bot to WhatsApp, it keeps returning the previous message before the delay (which is "your request has been submitted for processing")
2. Implementing a delay in make.com
I tried implementing a delay between the time Make.com receives a webhook from botpress and the time it sends a webhook response but that returns an error. The output JSON file has nothing in it
Please help. All suggestions are welcome.
https://cdn.discordapp.com/attachments/1224529690333806623/1224529691168477346/Screenshot_424.png?ex=661dd325&is=660b5e25&hm=612a818ebe39ad800e890c7e2011a95172e0a1040c16885b20e6532a87b36cdb&