[Whatsapp] Input after webhook not working

Hello! I'm creating a typebot flow to send WhatsApp list messages and get response in input block, but when I use webhook it doesn't work properly, if I remove webhook from flow, connect last message to input, flow works! I think after webhook, it's like session is over, in viewer docker log: Chat doesn't start: message didn't match any condition, and if i send start msg, bot start to begin... Any idea how fix this? i try wait block with pause the flow, not work too... Image 1 is Whatsapp flow. Image 2 is Typebot builder. Image 3 is Typebot results Analytics. Transformed list payload into text payload:
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "...",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "...",
"phone_number_id": "..."
},
"contacts": [
{
"profile": {
"name": "Felipe Vidal"
},
"wa_id": "..."
}
],
"messages": [
{
"from": "...",
"id": "wamid.HBgMNTU4NTkxMjE2N...U2Rjc4MTE4OAA=",
"timestamp": "1724173238",
"type": "text",
"text": {
"body": "botão 1"
}
}
]
},
"field": "messages"
}
]
}
]
}
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "...",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "...",
"phone_number_id": "..."
},
"contacts": [
{
"profile": {
"name": "Felipe Vidal"
},
"wa_id": "..."
}
],
"messages": [
{
"from": "...",
"id": "wamid.HBgMNTU4NTkxMjE2N...U2Rjc4MTE4OAA=",
"timestamp": "1724173238",
"type": "text",
"text": {
"body": "botão 1"
}
}
]
},
"field": "messages"
}
]
}
]
}
No description
No description
No description
30 Replies
imoclub
imoclub8mo ago
You send WABA list message with this payload?
Felipe Vidal
Felipe VidalOP8mo ago
No, this is response payload! Bot send list, user choice, i transform list_reply to text ( to Input be seted )
imoclub
imoclub8mo ago
so you just capture the title from user list message answer? i dont have any problem to using graphfacebook API but typebot cant handle type message from WABA other than text and reply button so im using n8n to solve any interactive message.
Felipe Vidal
Felipe VidalOP8mo ago
Take pic 1, user select option "Foco", in my webhook i'm receive list_reply and transform in text message. Option "Foco" generate text "botão 1" ( see payload ), like N8N, but coded in service.
Felipe Vidal
Felipe VidalOP8mo ago
is this flow
No description
imoclub
imoclub8mo ago
ahh ok, are you already setup the variables from your webhook handler? i dont see your webhook flow on image so thats why im curious how you can tranform list_reply as text type message
imoclub
imoclub8mo ago
for me its better to setup through your webhook response as variables
No description
Felipe Vidal
Felipe VidalOP8mo ago
I just receive whatsapp payload on my handler, execute any operations ( metrics, indicators, check, etc ), and send to typebot the whatsapp payload ( this case text msg ). like i said, if remove list request, flow work perfectly
imoclub
imoclub8mo ago
sorry i dont get it, how you can send that payload to typebot from your handler?
Felipe Vidal
Felipe VidalOP8mo ago
here some flow, but without menu, working!!
No description
Felipe Vidal
Felipe VidalOP8mo ago
Typebot have a endpoint to this! Same that set in Meta app
imoclub
imoclub8mo ago
so you already save the user sessionID to your database? it wont work if you are using whatsapp integration on typebot, if you are using all flow with typebot API, your case will not have any problem, because for typebot endpoint API you need generate sessionID then Continue Chat.
imoclub
imoclub8mo ago
No description
imoclub
imoclub8mo ago
No description
Felipe Vidal
Felipe VidalOP8mo ago
I have other flows, with inputs and buttons and work ok! Just have error after list message 😿
imoclub
imoclub8mo ago
hmm i dont know man but i have struggle too with it on beginning so thats why im using n8n to handle all whatsapp incoming message on typebot but thanks for your case i hope someone can reproduce it or you can try it with API integration since you have the whatsapp payload handler
Felipe Vidal
Felipe VidalOP8mo ago
@Baptiste I test lot of cases... the last try was remove wait block ( with pause flow true ) and now worked, question is: In whatsapp ( webhook ) the new messages doesn't resume automatically, like web bot?
Baptiste
Baptiste8mo ago
Indeed! let me check the code No in fact pause the flow should work on WhatsApp What makes you think it's not working as expected?
Felipe Vidal
Felipe VidalOP8mo ago
after pause flow, other messages not continue flow, here examples!
Felipe Vidal
Felipe VidalOP8mo ago
No description
Felipe Vidal
Felipe VidalOP8mo ago
No description
Baptiste
Baptiste8mo ago
Can you tell me how can easily reproduce? Do you have a simpler example?
Felipe Vidal
Felipe VidalOP8mo ago
Here. - Text buble -> wait with pause -> input after -> text bubble
No description
Felipe Vidal
Felipe VidalOP8mo ago
this example in whatsapp! *first message is start condition
No description
Felipe Vidal
Felipe VidalOP8mo ago
@Baptiste exported typebot
Felipe Vidal
Felipe VidalOP8mo ago
wpp example
No description
Felipe Vidal
Felipe VidalOP8mo ago
Tracking in Database and chatSession is created and deleted after wait block timeout ( i set to 5 seconds and query in db id = wa-phoneid-myphone )
Felipe Vidal
Felipe VidalOP8mo ago
and without pause flow work!
No description
Felipe Vidal
Felipe VidalOP8mo ago
i'm using @next docker tag!
Baptiste
Baptiste8mo ago
Placing a Wait block before an input does not make sense. Why are you doing this? It should be placed before a long running HTTP request block or something similar

Did you find this page helpful?