40% OFF chatbot services

Get an annual plan by September 30

How to Create an Automated Facebook Chatbot Flow

SendPulse allows you to create automated Facebook chatbot flows when a bot provides subscribers with some information according to a pre-determined scenario.

The flow builder is the main tool to set up your bot to welcome new subscribers, assist users, sell products, and notify a manager about users’ questions in the chatbot. Also, a chatbot can gather information and send it to your system for future use. All you need is to create keywords, design the bot’s structure, and drag-and-drop elements in the SendPulse flow builder.

It’s important to think about the architecture and logic structure of your bot carefully. A well-designed bot will let users easily get a reply to their questions or place an order successfully by providing the necessary information.

Flow Blocks


This element is always the start of a flow. Add a button to link it to other blocks.


Within the “Message” element select the text element type and add the text of your message. Also, you can add emoji and variables to personalize your messages.

To add a variable click {} in the right corner of the text block and choose the variable you want to add from the drop-down menu. If you have a value for this variable in the user’s contact information, they will receive a message with the value filled in.

Adding a button to a message

You can add the following types of variables:

  • Custom variables for contacts. You can transfer variables when a user subscribes. Set and update variables manually in the "Audience" section. Set and update variables automatically in the flow with the following elements: "Action - set variable," "User input," and "API request."
  • System variables. You can insert the text of the last message from the subscriber using the last_message variable. You can also display the subscriber ID using contact_id.
  • Global variables. You can create your own variables in the bot settings and use messages with predefined values that will be general to all of your subscribers. By default, $bot_name and $bot_id are available.


You need to add a button or user input element to the message element if you want to connect it with other elements in your flow. This is one of the most important elements for communicating with your users - buttons engage users and let them chose a direction for your bot to take them to the next part of your flow.

Click the "+ Add button" to add a button to the message.

Adding a button to a message

Select the type of button: "Continue flow," "Link" or "Payment."

Name your button in the first field. Note, you are limited to 20 characters. Also, you can add emoji to the button’s text.

The text on the button should be easily understandable - it’s important for users to understand what will happen when they click on the button and know what specifically they need to choose. Make sure that the next element in your flow corresponds to what the button says it will do to maintain the logic of your bot.

For a button with the "Link" type, you can also attach a link to a third-party resource.

After the button details are set, click "Add."

Saving a button in a message

We recommend adding “Back” and “Back to main” buttons after all the information you add, so users can change their choice and choose another path through your flow. This prevents the logic of your bot from being trapped or broken with one message.

Not more than three buttons can be added under one element.


Diversify your messages by using visual content that relates to your text.

To add an image click on the “Add” button and choose the “Image” element, then upload your image.

Uploading images to a message

For better display in Messenger choose an image resolution of 500 px in width and 200 px in height. It looks both good for desktop and mobile apps.


The carousel format allows you to showcase up to 10 cards. In one card you can add an image, title – with up to 40 characters, description – with up to 80 characters and 3 buttons with link to an external source or with a phone number to call. To add more cards click + on the right.

The service allows you to add up to ten cards in one element. To switch between the cards, click the arrow buttons. To delete a card, click the cross button. 

If you add two or more cards in the editor field, they will show up in a row and go beyond the block.


You can add files in any format excluding executable files, with a size of up to 5 MB. Attach your brochures, tickets, commercial proposals, or other additional media.


Divide long texts into passages up to 4 lines with the “Delay” element. This element will imitate typing by showing the typing animation and gives your user a rest before the next message.

Click the “Add” button and choose the “Delay” element. Enter a value in seconds - from 1 to 5.

Input indicator details

A message is not sent when the indicator is shown. Correlate the time of typing and the size of the message it is displayed before.

User Input

You can gather information from users and save it to a variable for future use. Users can enter any value and you only need to set up the type of validation for this value - string (for text values), number, date, phone number, email address, or a URL.

Activate “Wait for the subscriber's response”. Choose the validation type, add a warning message for users who enter the wrong value, and choose the variable where you want to store information.

Input indicator details

You can also choose the period to wait for a response from the user. If the user does not respond within the selected time, the wait for a response from the user will expire and the chatbot will no longer check the entered data for validity to record user's response.

You can divide your scenario and send the next message, depending on whether the user entered the requested data (green dot branch) or not (red dot branch).

Input indicator details

Also, under the message, you can add quick replies buttons – so users can choose from predefined responses instead of typing their own.

Сlick Quick replies in the User input element and enter values for the buttons – you can add up to 10 Quick reply buttons.

Quick Replies

Also there is another type of quick reply, this one does not save user’s information – but you can use it to extend the limits of button amounts and tie each button to the next branch of the flow.

Adding a quick reply

Type the text and press "Enter" to save it. The input field in quick replies is limited to 20 characters. Click the cross in the quick reply box to delete it.

To add a new element to the "Message" block, click "Add" and select the necessary element.

Adding new elements to a message

Delete an element with the bin button, move it up and down with the arrow buttons. The buttons appear when you pause a mouse pointer on an element.


It allows you to link another flow to the one you are creating. Drag the "Flow" block to the editor and link it to a button or a quick reply, which will trigger this flow. In the "Flow" panel, open the "Start another flow" drop-down menu and select the flow you want to add.

Selecting a flow


Segment customers based on their personal information and history of receiving your previous messages. Select the Filter element in the left sidebar and drag it after the element that will start your branching scripts.

Then select the condition itself. You can filter by:

  • variable value (all types - string, number, email, phone, and link);
  • assigned tag;
  • participation in the flow;
  • campaigns received

Combine conditions by adding the operators “any” or “all,”, or add independent additional conditions.

After adding conditions, add the additional flow elements to each of the Filter element options if the condition is met (green dot) or not met (red dot).


Only you can see the “Action” element, it will not provide content to your users. Choose this element from the left panel and drop it near the block you want to link. Then choose which action you want to add.

Choosing an action

Open the Chat

Choose the “Open the chat” action for a personal consultation - this is for cases when chatbot’s work is done and the user wants personal communication. This action will open a live chat with the bot’s admin. 

You can turn off bot auto-replies when opening a chat flows. This will help in cases where the subscriber is already waiting for a manager and so that the bot won’t send a message at that moment.

Also, you can set up email notifications for the manager about an open chat that will be sent to the email addresses used to register the account or enable web notifications in the browser.

Unsubscribe from the Bot

Users can unsubscribe from your bot with the /stop and /unsubscribe commands, but also you can set up that automatically. Use the “Unsubscribe from the bot” action for the branch of your scenario where you need to delete users from your audience list to never send them messages again.

Add Tags

Add tags to mark user’s preferences and use them to create more personalized campaigns in the future.

Remove Tags

Remove an existing tag from a user if it becomes irrelevant.

Add Variables

Add a value for the variable to use information in the future - it can be information about an order or personal data, which will help filter your audience for targeted campaigns.

For numbers and dates, you can specify dynamic values. To add or subtract the value of a variable, type in value +1 or -1. If the current value is empty, the count will be from zero for numbers and from the current date for dates.

Use this opportunity to keep the information in your system always up to date. For example, if you have a limited supply and need to count it, complete or implement a survey, you can add additional flow branches depending on the value of the variable.

Send Webhooks

Add this action after an event, about which you want to be notified. For example, if a specific client just made an order. Your CRM will get a POST request with that subscribers’ data, and any variables and tags that the bot gathered.

To add an element to the flow choose the “Send webhook” action. In the first field enter a name for the webhook so that you can easily find it by name in your system and filter it. In the second field add a link to your handler where the POST request will be sent.

Create deal

You can integrate a chatbot with your CRM. To do this, add the “Action - Сreate deal” element after a specific user action, for example, clicking the Submit order button.

Select a pipeline and deal stage — the pipeline and stage to place a deal card. Then, enter a deal name. You can also add a variable to the deal name to pass custom data.


It is a period during which no automated messages will be sent to a subscriber. It can be set in minutes, hours, or days.

API Request

Send requests to a third party server to create objects or retrieve data. Get data and use it in your chatbot messages.

You can save the received data to a variable or add it to a message as JSONPath.

Drag the "API Request" element to the workspace, connect it to the element, after which you want to retrieve data. Select the type of request and enter the URL to send the request to.

Selecting a flow

After testing the request and receiving a successful response, configure the mapping settings. If you need to save the value from the response to a variable, select the key from the received request and the variable to save to. If you want to use the received value once without saving it to a variable, copy {{$ ['somekey'] ['nestedkey']}} and use it in the next message element.

Selecting a flow

Random choise

Send elements from your chatbot script at random for A/B testing, creating quizzes, and more. You can customize the size of the recipient group for each option and send random information and test different chatbot scenarios.

Drag the item "Random choise" element to the working area, connect it to the item you start branching the script from.

Adjust the ratio for each option — what percentage of users will receive each option. The higher the value, the more users will get this option.

How to Build an Automated Flow

Create a new trigger. On the new trigger panel, click the "Create a flow" button.

Creating a new flow

Add a text message in the "Message" block. If you are planning more than one block in the flow, add a button to the message. Click "Apply" to save the changes.

Saving changes in flow blocks

Add all the blocks you need. Remember to click "Apply" for every block you add to save its content.

Click the zoom buttons to zoom the editor in or out. Drag the editor field to have more space for a flow.

Zoom buttons

Drag a line from a button in one block to another block to link them.

Once all the blocks of the flow are added, click "Save" to save the flow and bind it to a trigger.

Also, you can save the flow and send it to yourself. You will receive the first message of the flow in your Facebook account. In this way, you can test the flow work.

"Save and exit" saves the flow and closes the editor.

Saving a flow

The automated flow is ready.

How to create a welcome message flow for different subscription widgets

To allow users who will subscribe through different subscription widgets to receive different welcome message flows, create subscription flows for a specific subscription widget. Check out our instructions for setting up welcome messages for widgets.

How to track statistics for active flows

The service allows you to track general chatbot statistics in the "Statistics" tab.

Test campaign

You can view the number of sent and read messages and transitions for the whole flow and separately for each message in the "Bot structure" tab.

You can also track statistics on button clicks for messages in the flow and statistics on users for whom the "Action" and "Pause" elements were triggered. Click the number on a button to view users who pressed the button.

Rate this article about "How to Create an Automated Facebook Chatbot Flow"

User Rating: 5 / 5 (1)

    Other useful articles

    Popular in Our Blog

    Try a free chatbot for Facebook Messenger