evolution-api icon indicating copy to clipboard operation
evolution-api copied to clipboard

Botões do Typebot Reconhecidos como Botões do WhatsApp [PT][FEAT]

Open kaiquerp opened this issue 2 years ago • 3 comments

Título: [Botões do Typebot Reconhecidos como Botões do WhatsApp]

Descrição Detalhada:

Seria muito interessante ao invés de usar o n8n ou até mesmo codificações avançadas a Evolution API reconhecer os botões(Opções) do typebot nativas como opões de botões para o whatsapp

Racional:

Muitos os entusiastas que hoje estão aplicando seus projetos as vezes não tem um conhecimento avançado como eu mesmo não tenho com muito custo consegui fazer mais não é algo como o typebot fornece.

Exemplos de Uso:

A utulização se expante com muitas opções, no meu caso mesmo seria interessante o cliente responder uma determinada questão com uma determinada palavra sem nada a mais ou a menos, com isso limitariamos o cliente responder determinada ação com determinada opção facilitando integrações

Possíveis Implementações:

Acho que não preciso de me aprofundar pois é infinito as possibilidades de usar a evolution que ja está integrada aos botões e facilidade de arrasta e solta do Typebot

kaiquerp avatar Mar 28 '24 04:03 kaiquerp

@kaiquerp

Botões só funcionam na API oficial do WhatsApp. Quando se usa botões e faz a conexão do Whatsapp (evo + typebot) os botões são convertidos em strings.

No typebot (viewer) vai aparecer os botões normalmente, mas no Whatsapp são convertidos em lista de strings

Sem typebot: [Opção 1] [Opção 2] [Opção 3]

Um exemplo no Whatsapp ▶️Opção 1 ▶️opção 2 ▶️Opção 1

Luis-Fernando-Developer avatar Apr 02 '24 23:04 Luis-Fernando-Developer

Não vamos trabalhar com botões, pois é um recurso muito instável

DavidsonGomes avatar May 08 '24 13:05 DavidsonGomes

Hey everyone,

I'm on WABA Cloud (Meta Business API) and felt the same frustration — Typebot choice inputs were rendering as plain ▶️ Option text instead of native interactive buttons.

Since the maintainer closed this as "won't fix" (understandable — native buttons are indeed flaky on Baileys/WhatsApp Web), I went ahead and forked the repo and built a custom Docker image to solve it for my own use case.

What I implemented (WABA Cloud only):

Typebot choice input blocks now render as native WhatsApp reply buttons (up to 3 options per group) — following the same grouping pattern used in Typebot's official WhatsApp integration For 4+ options, instead of a list message, it sends multiple grouped button messages (batches of 3), which is more reliable with the Cloud API The last text bubble before the choice is used as the button body (no duplicate messages) Button titles are automatically truncated to 20 chars with deduplication to avoid API 400 errors Rich text formatting (bold, italic, strikethrough) is properly converted to WhatsApp markdown Why this won't be an official fix:

It only works with Meta Cloud API — Baileys doesn't support interactive reply buttons The Evolution API serves a much broader audience using Baileys, where this would be a no-op or worse The maintainer's "unstable" concern is valid for Baileys; on WABA Cloud it's actually quite solid If you're on WABA Cloud and want this, my fork is at: https://github.com/pedrolucasoliva/evolution-api. Docker image: pedrolucasoliva/evolution-api:custom

Happy to answer questions for anyone trying to set it up.

pedrolucasoliva avatar Mar 28 '26 22:03 pedrolucasoliva