Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 1.91 KB

README.md

File metadata and controls

65 lines (42 loc) · 1.91 KB

Unoapi Cloud with Typebot

Get the typebot source or image and change the env WHATSAPP_CLOUD_API_URL to you Unoapi url (ex: http://localhost:9876

In your typebot flow go to Share > Whatsapp image

Click on Add WA Phone Number image

Click in continue

In the System User Token, put the token from the Unoapi env (authToken ) image

In the Phone number ID, put the phone number without the + sign, ex 55999999999 ) image

Put the callback url and token in the unoapi redis or .env config, exemple below.

image

image

  "webhooks":[
    {
      "urlAbsolute":"YOUR TYPEBOT URL"
      "token":"Bearer YOR TOKEN",
      "header":"Authorization"
    }
  ],

And click in submit on typebot image

After, enable the integration on typebot and click in Publish. image

Lists with typebot

Some observations before using list on Typebot, by default Typebot is not ready to work with lists, so has some limitations.

  • Use max of 3 itens in the list, if you use more will be send another list

How to use

To use lists, you need to use the text bubble followed by button input. image

image

Config unoapi to not send message to type for some numbers

To work with this, set a unique id field in webhook json in redis or if use envs config, the id of webhook is a string default

For exemplo, if your session number is Y and you want do webhook with id W to never send more message to number X

ttl param is in seconds

To remove a phone number your black, send ttl with 0, with ttl -1, never expire

curl -i -X POST \
http://localhost:9876/Y/blacklist/W \
-H 'Content-Type: application/json' \
-H 'Authorization: 1' \
-d '{ 
  "ttl": -1, 
  "to": "X"
}'