Set Up a Delay Timer in Bot
WhatsApp bots have become increasingly popular for automating conversations and providing quick responses. However, adding a delay between messages can significantly improve the user experience and simulate a more natural conversation flow. By integrating external APIs, we can introduce delays in WhatsApp bots, allowing for more human-like interactions. Here's a step-by-step guide on how to generate a delay in a WhatsApp bot using an external API. On this example, we will use this endpoint https://httpbin.org/delay/.
We will create a simple flow
The API has this endpoint where https://httpbin.org/delay/5 we can set the delay in seconds. Keep in mind the request will timeout after 30 seconds, so the number has to be less than 30.

How to set up the Webhook Block
We will use a GET request to the endpoint mentioned above:

It's very important to save the response in order for the delay to be generated:

Remember to thoroughly test your implementation to ensure that the delays are accurately applied and do not hinder the overall performance of the bot. With a well-implemented delay mechanism, your WhatsApp bot will be better equipped to provide more authentic and realistic interactions, leading to a more enjoyable user experience.