Share feedback, ideas and get community help

Updated 4 months ago

[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:
Plain Text
{
  "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"
        }
      ]
    }
  ]
}
Attachments
image.png
image.png
image.png
i
F
B
37 comments
You send WABA list message with this payload?
No, this is response payload! Bot send list, user choice, i transform list_reply to text ( to Input be seted )
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.
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.
is this flow
Attachment
image.png
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
for me its better to setup through your webhook response as variables
Attachment
image.png
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
sorry i dont get it, how you can send that payload to typebot from your handler?
here some flow, but without menu, working!!
Attachment
image.png
Typebot have a endpoint to this!
Same that set in Meta app
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.
I have other flows, with inputs and buttons and work ok! Just have error after list message 😿
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
@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?
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?
after pause flow, other messages not continue flow, here examples!
Can you tell me how can easily reproduce?
Do you have a simpler example?
Here.
  • Text buble -> wait with pause -> input after -> text bubble
Attachment
image.png
this example in whatsapp!
*first message is start condition
Attachment
image.png
@Baptiste exported typebot
wpp example
Attachment
image.png
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 )
and without pause flow work!
Attachment
image.png
i'm using @next docker tag!
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
Add a reply
Sign up and join the conversation on Discord