Add a Click-to-Call/Email/WhatsApp button (v3)

The easiest way to add a Click-To-Call button in your bot is with one simple line of code. Learn how!

Here is the flow to follow:

We pull a flow from the button we want to use to a Code block that will trigger the call

In the Code block we will add the following code:

window.open('tel:900300400')

Change the number for your desired one

Connect the output of the Code block to the next block

Happy calling!   🙌

Here is a demo is you want to try it DEMO

Click to Email

Using the same flow, as the example above, you just need to adapt the code in the Code block. For an email will be as follows:

window.open('mailto:abc@example.com?subject=Click%20to%20email&body=Hello%20!')

Bear in mind that "subject" and "boy" are option, but if you are going to use it, you will need to replace spaces between words with %20

Click to WhatsApp

And for the Whats up App, as simple as below:

window.open('https://api.whatsapp.com/send?phone=34633475712')

Note that 34 is the Country Code for Spain, you don't need to add the "+" or the 00 prefix

In case you want to redirect the user, without opening a new tab, but in the same one, please use the following code:

window.location.href = "https://www.landbot.io"


How did we do?