Wait for message and respond WhatsApp

Hi everyone. I’m working on automating a WhatsApp bot for a client, and I’m running into an issue related to handling message confirmations in the flow.

We’re using a service called Ycloud, which provides WhatsApp coexistence. This allows my client to keep using their WhatsApp Business account on their phone without losing access to the number, while I handle the automation through webhooks.

Since Ycloud is not the official WhatsApp API, the entire workflow is based on webhooks and HTTP requests for sending and receiving messages.

So far, everything works fine.

Inside the flow, my AI agent generates a JSON payload to request a delivery quote from the Uber Direct API. That request is sent successfully, and when I receive the response from Uber, I send the quote back to the user via an HTTP request.

The problem starts when the user replies “yes” to confirm the price. That reply does NOT return to the same part of the flow, but instead gets sent back to the initial webhook, as if it were the beginning of a new conversation.

Because of that, the flow breaks and the user’s “yes” gets lost, since the AI agent can’t link that confirmation to the previous step, even though it has memory.

In short, what I need is a way to pause the flow and wait for the user’s response, similar to how it works with the official WhatsApp API or Telegram, where you can maintain a conversational state and resume the process after the user replies.

Has anyone faced this issue when working with Ycloud or any other unofficial WhatsApp provider?

Is there any way to implement a “wait for response and continue” mechanism using webhooks, or some sort of session tracking that would make this possible?

Any advice or experience would be greatly appreciated.

Hola Emiliano! Has tratado usando Redis en n8n? Lo que yo estoy haciendo es crear un STACK de estados, así es fácil darle seguimiento a la conversación. Sé que REDIS también se puede usar cuando tienes un usuario que manda mensajes línea por línea, pero eso si no he implementado.

Una pregunta también, estamos trabajando en algo similar, cómo ves usar YCloud para esta funcionalidad de coexistencia? Tendrias que crear una cuenta para cada cliente o cómo lo andan manejando?

Una cosa extra, si haces tracking con REDIS al ser una memoria caché va a ser súper rápido todo, para usar redis debes tener el modo “n8n queue mode” preferiblemente.

Saludos

Hola Andres, muchas gracias por esa opción la intentaré haber como funciona!

Respondiendo tu pregunta acerca de Ycloud, ya que solo usamos la función webhooks que esta en su sección developers tu puedes tener varios números en la misma cuenta, no se con exactitud cual sea el máximo, pero ahorita estamos manejando 3 números distintos sobre la misma cuenta, espero y esto responda tu pregunta!

Saludos.

Hola Emiliano! Va cualquier cosa no dudes en consultarme. Y muchas gracias por tu respuesta sobre YCloud, lo vamos a considerar como opción.

Un saludo y éxito con sus automatizaciones.