Getting Started with Landbot
Introduction to Landbot 🌍
Creating & Setting Up Your Account 👥
Create your Landbot account: sign up, confirm your email and get started
Common reasons for not receiving account activation email
How the Landbot free trial works
Account Settings
Build Your First Bot 🛠️
Builder Interface Tour
How to build an agent in Landbot
Managing Data in Your Agent: A Guide to Using Fields
Languages and Translations in Landbot
Organize your flow with Bricks
Flow logic: how your agent decides what comes next
How to test your agent
How to debug your agent's flow without code
Starting Point
Build it for me!
Launch and Share Your Bot 🚀
Build a bot
Bot's Settings
Bot General Settings
Web bots: Second Visit Settings
Custom System Messages
Hidden Fields (Get params / UTMs from url and use it as variables)
How to set up SEO & Tracking
Typing Emulation (Message Delay)
Messages, Questions and Logic & Technical blocks
Messages
Question blocks
Buttons block
Ask for a Name block
Ask for an Email block
Ask a question block
Ask for a Phone block
Ask for a date block
Forms block
Multiple-Choice Questions with the Buttons Block
Question: Address block
Question: Autocomplete block
Question: File block
Ask for a number block
Question: Picture Choice block
Rating block
Question: URL block
Question: Yes/No block
Opinion scale block
Logic & Technical blocks
Code Blocks
Dynamic Data
How to Use the Dynamic Data Block in Landbot
Get the array's index of the user selection and extract information from array
Formulas
How to Perform Basic Calculations
Get started with the Formulas block
Formulas - Regex
Formulas - Date
Formulas - String
Formulas - Logical
Formulas - Math
Formulas - Object
Formulas - Comparison
Formulas - Array
Persistent Menu
Trigger Automation
Webhook
Landbot System Fields: Pre-created fields
Set a Field block
Any of the above Output
Global Keywords 🌍
Keyword Jump
Lead Scoring block
Jump To block
How to split bot traffic with the A/B Test block
Conditions block: check Fields and split the conversation
Conditions block: check dates, visitors and team members online
Close Chat block
How to ask a question based on a variable not being set (empty URL params)
Business Hours block
Custom Goals
Inactivity Trigger block
Share & Embed
Redirect Users
How to redirect visitors to a URL (web only)
How to add a Click-to-Call/Email/WhatsApp button
Redirect User Based on Language Input (DeepL)
Generate a URL that has variables from user answers
Popup on Exit Intent
Share
Customized Embed Actions
How to redirect user to another url in your site with Livechat open to continue conversation
How to Detect Visitors Browser
Customize and embed your WhatsApp Widget
Modifying Embed Size
Detect if bot was opened
Customized Behavior in Mobile Browsers
Load script and display bot on click button
Launch Bot On Exit Intent
Display Bot During Business Hours Only (Livechat & Popup)
Open / Close a Web bot (embedded)
Launching a bot depending on browser language
How to pass WordPress logged in user data to Landbot
Set the flow depending on the url path (for embedded landbots)
How to launch a Landbot by clicking a button
Open LiveChat bot as soon as page loads
Detect if a visitor is on Mobile/Tablet or Desktop
Embed
How to embed your agent into your website
Embed Landbot in an iframe
Landbot in Wix
Landbot in your web with Google Tag Manager
Landbot in Webflow
Embed in Sharetribe
Landbot in Shopify
Embedding Landbot in Carrd
Landbot in Wordpress
Landbot in Squarespace
Proactive message: get visitors' attention before they open the chat
Design section (web bots)
Verification & Security
Validate phone number with SMS verification (with Vonage Verify)
Cookie consent banner (full page / full page embed)
Add Captcha Verification (Non-Embedded Bots)
Bricks
How to disable a bot
Account Settings and Billing
Billing
Privacy and Security
Teammates
Startup Discounts
NGOs and Educational Organizations Discount
AI in Landbot
Landbot AI Agent
AI Agent - Interactive components
AI Agent block
AI Agent Setup - Best Practices
Tips to migrate from old AI Assistants to AI Agents
How to Create Custom Instructions for a Landbot AI Agent
AI Agent In Action - Live Implementation Example
Capture, generate and use data with AI Agents
Structuring your AI Agent Knowledge Base
Custom AI Integrations
Create a JSON format response from OpenAI in WhatsApp
Responses API
Connect OpenAI Assistant with Landbot
AI in WhatsApp
How to build a FAQ chatbot with GPT-3
GPT-4 in Landbot
OpenAI
Prompt Engineering for GPT-3
Build a Customer Service Bot with ChatGPT and Extract Information
Google Gemini in Landbot
Build a Chatbot with DeepSeek
AI Task block Overview
Landbot MCP and Plugin
What is the Landbot MCP?
How to get started with the Landbot MCP
How to build, test and publish an agent with the Landbot MCP
How to fix common problems with the Landbot MCP
How to style your Landbot web chat with the Landbot MCP
Integrations with Landbot
Native Integrations
Airtable
Airtable integration block
Get data filtered from Airtable with a Brick- Shop example
20 different ways to GET and filter data from Airtable
How to add/update different field types in Airtable (POST, PATCH & PUT)
How to Create, Update, Retrieve and Delete records in Airtable (POST, PATCH, GET & DELETE)
Get more than 100 items from Airtable
Insert Multiple Records to Airtable with a Loop
How to Get an Airtable Token
Advanced filters formulas Airtable block
Airtable usecase: Create an event registration bot with limited availability
Update Multiple Records in Airtable Using a Loop
Reservation bot with Airtable
Calendly
Dialogflow
Dialogflow & Landbot course
Dialogflow & Landbot intro: What is NLP, Dialogflow and what can you do with it?
Dialogflow & Landbot lesson 1: Create your first agent and intent in Dialogflow
Dialogflow & Landbot lesson 2: Get the JSON Key
Dialogflow & Landbot lesson 3: Setting up of Dialogflow in Landbot
Dialogflow & Landbot lesson 4: Training phrases and responses for a FAQ
Dialogflow & Landbot lesson 5: Entities and Landbot variables
Dialogflow & Landbot lesson 6: Redirect user depending on Dialogflow response parameters (intent, entities and more)
Integrations > Dialogflow Block
How to extract parameters from Dialogflow response with Formulas
Dialogflow Integration Dashboard
Dialogflow in Unsupported Languages (& Multilingual)
Dialogflow - How to get JSON Key
Google Sheets
Google Sheets Integration: Insert, Update and Retrieve data
How to use Google Sheets to create a simple verification system for returning visitors
Google Sheets integration (new version)
How to give unique Coupon Codes (with Google Spreadsheets)
How to use Google Spreadsheet as a Content Management System for your bot
HubSpot
MailChimp
Salesforce
Segment
SendGrid
Send an Email
Sendgrid Integration Dashboard
How to create a custom SendGrid email - (Custom "from" email)
Slack
Stripe
Zapier
How to Configure the Landbot and Zapier Integration Using the Zapier Block
Zapier Integration Dashboard
How to insert a row to Google Spreadsheet by Zapier
How to generate a document with PDFMonkey by Zapier
Send WhatsApp Templates from Zapier
How to Send Emails from Your Landbot Using Gmail via Zapier
Get Opt-ins (Contacts) from Facebook Leads using Zapier
How to extract data from an external source with Zapier and use it in Landbot
Zapier trigger
How to complete a digital signature flow by Zapier
Make a survey with Landbot and display the results in a Notion table using Zapier
Custom Integrations
ActiveCampaign
Google Calendar
Google Fonts
Google Maps
Embed Google Maps
Google Maps API Key for Address block
Extract Data With Google Maps Geocoding API
Calculate Distances With Google Maps API
Google Meet
IFTTT
Integrately
Intercom
Make
Connecting MySQL with Make.com (formerly Integromat)
Send WhatsApp Message Template from Make
Make Integration With Trigger Automation Block
How to send an email through Sendinblue by Make.com (formerly Integromat)
Get Opt-ins (Contacts) from Facebook Leads using Make
How to extract data from an external source with Make.com and use it in Landbot
OCR
Pabbly
Paragon
Pipedream
PDF Monkey
Store Locator Widgets
Xano
Zendesk
Send an Email with Brevo
Shopify in Landbot: Get Order Information
Send Leads to Zoho CRM
Landbot + n8n Integration: How to Connect Using the n8n Block
How to Integrate Landbot with n8n using Webhooks
WhatsApp Channel
Getting started!
WhatsApp Testing
Build a WhatsApp Bot - Best Practices and User guide
Build a WhatsApp Bot - Best Practices for Developers
Types of Content and Media you can use in WhatsApp 🖼
1. WhatsApp Article Directory
WhatsApp Integration & Pricing FAQ
Adding & Managing your WhatsApp Channel
Meta Business Verification - Best Practices 🇬🇧
WhatsApp Number Deletion (WA Channel management)
Adding a WhatsApp number to your account
WhatsApp’s Messaging Policy: New Accepted Industry verticals
Meta processes guide: Meta Business Verification, Official Business Account (OBA) requests, Appeals
Existing WhatsApp Number Migration
Key Insights for Migrating to WhatsApp Business API Cloud
How to's, Compatibility & Workarounds
WhatsApp bots - Feature Compatibility Guide
WhatsApp: Show a Different Flow on Return Visits
WhatsApp - Get user out of error message loop
How to do Meta ads conversion tracking in WhatsApp bot using the Conversion API
Getting Subscribers: Opt-in, Contacts
How to get Opt-ins (Contacts) for your WhatsApp 🚀
WhatsApp Quality Rating and Message Delivery
Opt-In/out block for WhatsApp 🚀
Opt-in Check Block
Contact Subscribe Block: Manage Opt-ins and Audiences
New Contacts: Import, Segment, and Organize Easily
WhatsApp Channel Settings
Parent Bot/Linked Bot - Add a main bot to your WhatsApp number
WhatsApp Channel Panel (Settings)
Growth Tools for WhatsApp
Messaging and contacting your users
WhatsApp Campaigns 💌
WhatsApp Message Templates: request them and get them approved
Audience block
WhatsApp Marketing Playbook: Best Practices for Leadgen
WhatsApp Error Logs: Troubleshooting guide
Audiences
WhatsApp for Devs
How to calculate the number of days between two selected dates (WhatsApp)
Creating a Loop in WhatsApp
Recognise the users input when sending a Message Template with buttons
Trigger Event if User Abandons Chat
Calculate Distances in WhatsApp
Send Automated Message Templates based on Dates
How to Let Users Opt-Out of Your WhatsApp Messages via API
reply from Slack: How to create an integration to allow agents reply WhatsApp users from Slack (with Node JS)
Set Up a Delay Timer in Bot
Notify Teammates of Chat via WhatsApp
Native blocks for WhatsApp
Other Channels - Messenger and APIChat
Facebook Messenger
The Facebook Messenger Ultimate Guide
Types of content you can use in Messenger bots 🖼
How to Preview a Messenger bot
API Chat (for Developers)
Human Takeover & Inbox
Metrics and Data Management
For Developers & Designers
JavaScript and CSS
CSS and Design Customizations
Design Customizations
Advanced (Custom CSS & Custom JS)
Components CSS Library Index
Background Class CSS
Identify Blocks CSS
Buttons Class CSS
Header Class CSS
Media Class CSS
Message Bubble Class CSS
Miscellaneous Classes CSS
CSS Customization Examples: "Back to School" Theme
Get started guide for CSS Design in Landbot
CSS Customization Examples: Call To Action: WhatsApp
CSS Examples: Lead Gen
CSS Customization Examples: "Translucid"
CSS Customization Examples: "Minimalist" Theme
Dynamic Data CSS
Form Block CSS
CSS for Typewriter Effect
CSS Customization Examples: Carrd Embed Beginner
Dynamically Change a Bot's Background
Proactive Message Customizations with Javascript and CSS
Landbot v3 - Web CSS - RTL
CSS Customization Examples: Video Bubble
Dynamically Change Any Style
CSS Customization Examples: CV Template
Change Landbot custom CSS dynamically from parent page onload
Widget/Bubble Customizations with Javascript and CSS
JavaScript
How to change Avatar dynamically
Javascript in WhatsApp
Landbot JavaScript Integration
Different ways to format numbers with JS
How to display an HTML Table and a List in Landbot v3 web
Trigger a Global Keyword with JS (web v3)
Create Dynamic Shopping Cart with JS and CSS
Add a Chart (with Chart JS library) in your Landbot
Different ways to format numbers with JS (WhatsApp)
Pop up modal to embed third party elements
Landbot API
Send WhatsApp Messages with Landbot API
How to "send" a user to a specific point in the flow with Javascript and with the API
APIs
Get Opt-ins (Contacts) using Landbot API
MessageHooks - Landbot Webhooks
Resume flow based on external process with Landbot API (Request, Set, Go)
Tracking
Google Analytics - Track Events (Not embedded)
Google Analytics - Track Events (Embedded)
Meta Pixel - Track Events (only Embedded)
How Track Google Analytics Events in Landbot with Google Tag Manager (GTM)
Google Adwords - How to track Google Adwords in Landbot
Set a timer to get the time spent during the flow
Workarounds and How To's
Workflows
How to build an event registration Landbot (to be used in one screen by many attendees) (web only)
How to let user select a time of booking (with a minimum 45 minutes notice)
Send Files Hosted in Landbot to Your Google Drive with Make
Two-Step Email Verification
Fixing Web Bot Loading Issues for iOS Devices in Meta Campaigns with Disclaimers
Progress Bar Workaround
Skip Welcome Message
How to Add User Verification to Your Chatbot
How to set up questions with a countdown
HTML Template for Emails
Creating a Simple Cart in WhatsApp
Creating Masks for User Input (2 examples)
More Topics
Table of Contents
- All Categories
- Getting Started with Landbot
- Build Your First Bot 🛠️
- Flow logic: how your agent decides what comes next
Flow logic: how your agent decides what comes next
Updated
by Desirée M
Flow logic is how a Landbot agent decides which block comes next: it checks what the visitor said or did and sends them down the path that fits. Most decisions use a few logic blocks, mainly the Conditions block to check a saved answer and the Formulas block to calculate or change a value.
What do you need to know before you add flow logic?
Before you add flow logic, make sure you know three basics, which How to build an agent in Landbot explains step by step:
● Outputs: every conversation starts at the Starting Point and moves to the next block through outputs. A block that branches has one output per path, such as one per button in a Buttons block. See How do blocks connect to the next step?
● Fields: question blocks save the visitor's answers in Fields, so later blocks can check them. See How do Fields keep the visitor's answers? and Managing Data in Your Agent: A Guide to Using Fields.
● Any of the above: one output for all the buttons that lead to the same next step. See the Any of the above Output article.
Fields can also get a value without asking the visitor: Landbot System Fields are filled in for you, a Set a Field block gives a Field the value you choose, and Hidden Fields take values from the page URL.
How to split the conversation based on a saved answer
To split the conversation based on a saved answer, add a Conditions block: it checks a Field and sends the visitor down its green output when the condition is true, or its red output when it's false. Use it when the next step depends on something the visitor said earlier. A choice the visitor just made with a button doesn't need one, because each button already has its own output.
In this example, a plant shop agent, Leafy Corner, asks how many hours of direct sun the visitor's spot gets with an Ask for a number block and saves the answer in @sun_hours. A Conditions block then checks whether @sun_hours is GREATER THAN 4:
● Green output (true), more than 4 hours of sun: "Plenty of light! ☀️ An Aloe vera will love that spot."
● Red output (false), 4 hours or fewer: "A shadier spot, then. 🌱 A Snake plant is happy with little light."

Both replies lead to an "Anything else?" question in the Leafy Corner agent, and its Back to menu button connects to the first block again. A connection back to an earlier block lets visitors go round as often as they like, without you building the menu twice.

Besides GREATER THAN, a Conditions block can check whether a Field is EQUAL TO, CONTAINS or IS SET, and combine several checks so that all of them, or just one, must be true. Conditions block: check Fields and split the conversation shows each operator with an example. To check dates, the visitor's device or country, or whether a team member is online, see Conditions block: check dates, visitors and team members online.
How to calculate or change a value with Formulas
To calculate or change a value, use the Formulas block: it works a value out with a function and saves the result in a Field. Reach for it when a Conditions block can't do the job on its own, such as adding up a score, cleaning up text before you compare it or comparing two Fields.
Pick a formula by the kind of value it works on. To write your first one, follow Get started with the Formulas block.
● Logical formulas: combine checks or choose between two values.
● Comparison formulas: compare values, including two Fields.
● Math formulas: calculate with numbers.
● String formulas: change and clean up text.
● Date formulas: work with dates and times.
● Array formulas: work with lists.
● Object formulas: read values from structured data, such as an API response.
● Regex formulas: find or check text that follows a pattern.
Which block do you need?
The block you need depends on what your agent should decide or do next:
● Give each answer its own path: Buttons block
● Save a value without asking the visitor: Set a Field block
● Decide based on a saved answer: Conditions block: check Fields and split the conversation
● Decide based on the date, the visitor or team members online: Conditions block: check dates, visitors and team members online
● Calculate or transform a value: Get started with the Formulas block
● Take a different path when you're closed: Business Hours block
● Score leads based on their answers: Lead Scoring block
● Split visitors at random to compare two versions: How to split bot traffic with the A/B Test block
● Jump to another part of the flow or another agent: Jump To block
● Send visitors down a path based on the words they type: Keyword Jump
● Let visitors jump to a part of the flow from anywhere by typing a word: Global Keywords
● Keep a menu of options open during the whole conversation: Persistent Menu
● Organize a large flow into groups of blocks: Organize your flow with Bricks
● Reuse a Brick in your other agents: Brick Templates
Every logic block, with its setup, is in the Logic & Technical blocks library.
For WhatsApp
● Let visitors type a keyword instead of tapping a button: Keyword Options, also on Facebook Messenger
● Show returning visitors a different flow: WhatsApp: Show a Different Flow on Return Visits
● Repeat a part of the flow a set number of times: Creating a Loop in WhatsApp
● Get a visitor out of a question they keep failing: WhatsApp - Get user out of error message loop
How to avoid common flow logic mistakes
Most flow logic mistakes leave a visitor stuck or send them down the wrong path. Three habits prevent them:
● Leave no dead ends. Connect both outputs of every Conditions block, and an output for every button. A visitor who reaches an unconnected output ends the conversation there, usually without meaning to.
● Give a Field a value before a Conditions block checks it. When a Conditions block compares an empty Field with GREATER THAN or LESS THAN, the conversation stops at that block and takes neither output. An empty Field also goes down the green output of DOES NOT EQUAL TO and the red output of EQUAL TO. Ask for the value earlier in the flow, or give the Field a starting value with a Set a Field block.
● Compare text in lowercase. EQUAL TO in a Conditions block is an exact match, capitals included, so Aloe vera and aloe vera don't match. Turn the visitor's answer into lowercase with the Lower() formula from String formulas before you check it. To catch a mismatch like this, show the Field's value in a message right before the Conditions block, as How to find out why a Conditions block takes the wrong path explains.
How to keep a large flow easy to manage
To keep a large flow easy to manage, build it from small parts that each do one job, so you can read, test and fix each part on its own.
● Use several small Formulas blocks instead of one long formula. A formula with functions nested inside each other is hard to read, and when it fails you can't tell which function went wrong.
● Split a crowded Conditions block. When one Conditions block checks many things at once, use several blocks in a row, each with one clear question.
● Reuse a part of the flow instead of copying it. Group the blocks into a Brick and send visitors to it with a Jump To block, or connect back to it, as the Leafy Corner agent's Back to menu button does.
How to test your flow logic
To test your flow logic, take every path at least once and try values on both sides of each condition, such as 6 and 4 hours of sun for the Leafy Corner agent. Test your changes in Preview before you publish, then the live agent with its share link, as How to Test Your Bot explains.
When a path goes somewhere you didn't expect, show the Field it depends on in a message right before the block that decides. How to debug your agent's flow without code walks through it step by step.