How to Get Your Data From is great, but it can be a bit of a process to get that sweet, sweet data back from it. Here’s how to send yourself the values that users enter in your chatbot.

Step one. Put an iframe with your landbot url on your page:


Step two. Add the following script to your page. This will allow you to create an access point for your chatbot:

<script src=”"></script>

Step three. Create an access point:

const myBot = new LandbotAP(“my-bot”);

Step four. Add a listener to your access point. is just an example, call the event whatever ya darn well please.

landbot.on(“color-selected”, (data) => {
console.log(“My data: “, data);
// do whatever you want with this spicy new data

Step five. Add this to the text box in the step right after the user inputs the value you want to receive:

Landbot.send(‘color-selected’, ‘@color’);

If you want to sent multiple variables, send an object with your arguments:

Landbot.send(‘color-selected’, {
color: ‘@color’,
name: ‘@name’

Done! Happy chatbottin’!

Join my email list with billions of your fellow Chatbot Lords for more insights on hacking into the mainframe.

Friendship and heavy metal.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store