How to Create a Flow for an Instagram Chatbot

The flow builder is the main tool to set up your bot to welcome newsubscribers, 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.

Below, you can find a detailed table of contents. Use it as a map to comfortably find all of the possible triggers and elements to get started adding them to your bot’s flow.

Choosing a Trigger for Your Flow

默认情况下,有流”欢迎消息。”"Standard reply," "Story mention," "Unsubscribe from bot," and quick reactions to the story in the form of emoji. You can create your own new triggers to get more functionality.

Choose your bot. Navigate to the “Bot Structure" tab and choose a trigger.

Welcome Message Flows

The flow starts after a user subscribes to your chatbot — i.e. after the user sends your business page a direct message.

A user can be a subscriber of your Instagram chatbot, but not a subscriber of your Instagram business account profile. You can use the Filter element to check the status of your profile subscription.

This flow introduces your bot to users. Here, you can write a little about your bot and its features – how the bot can be useful, what information the bot can provide, how often the bot will send messages, and the content of those messages.

Story Mention

The flow starts when users mention the business account linked to your chatbot in their Instagram story.

流开始,那些mentio的用户帐户ns your account must be public, and their story must be open to everyone.

With this trigger, you can quickly respond to all mentions of your service, building communication with your customers.

We recommend you personalize the content of the message depending on your business niche to send users relevant information.

Users who mention you in their stories become your chatbot subscriber.

You can set up a cool-down interval for launching a flow between 1 minute and 24 hours — so your bot won’t launch a second time within the specified interval. To set the interval, clickEdit Triggerand select a time.

Comment on Your Post

The flow starts when a user leaves a comment on your Instagram post.

Such a flow can be used to answer frequently asked questions from users about your current event. For example, questions about the price, delivery, registration, or whether a product is in stock.

We recommend you personalize the content of the message depending on the context of the post itself and your business niche to send users relevant information.

The trigger is disabled by default. To enable the trigger, toggle the switch to the active position.

You can also create and configure your own trigger to launch the flow only when a specific keyword or comment on a specific post is received.

To do this, clickCreate a new trigger。Select "Comment on your post."

Next, choose whether to reply to comments on any post or a specific one.

For the "For specific post" option, select a post from the list.

Write from one to severalkeywordsthat will start the flow.

You can also set your callback interval from 1 minute to 24 hours — the flow will not restart when the same keyword is entered.

ClickAdd

To change your trigger settings, for example, to select a new post, add a keyword, or set a callback interval, click "Edit the trigger."

Please note that after a new user leaves a comment on your post, they will be added to the list of your chatbot subscribers, but you will not be able to send them a campaign or a message. However, after this user contacts you via the chatbot, you can send them a campaign or a message.

Comment on Your Live Video

The flow starts when a viewer posts a comment during your Instagram live video stream.

Such a flow can be used to answer frequently asked questions from users about your current event. For example, questions about the price or whether a product is in stock.

We recommend you personalize the content of the message depending on your business niche to send users relevant information.

The trigger is disabled by default. To enable the trigger, toggle the switch to the active position.

You can also create and configure your own trigger to launch the flow only when a specific keyword or comment is received.

To do this, clickCreate a new trigger。Select "Comment on your live video."

Write from one to severalkeywordsthat will start the flow.

You can also set the callback interval from 1 minute to 24 hours — the flow will not restart when the same keyword is entered.

ClickAdd

You can also change your trigger settings: add a keyword or set a callback interval. To do this, click "Edit the trigger."

Please note that after a new user leaves a comment on your live video, they will be added to the list of your chatbot subscribers, but you will not be able to send them a campaign or a message. However, after this user contacts you via the chatbot, you can send them a campaign or a message.

Emoji reactions

The flow starts after a user reacts to your company's Instagram story with an emoji.

With the help of such a flow, you can offer a client a discount, visit a store or a trial lesson, send the address of your location, ask a question, engage in a dialogue, and send a link to helpful materials.

We recommend you change the content of the message depending on the context of the story itself and the niche of your business to send users relevant information.

Standard Reply

The flow will launch in response to any user question that is outside your bot’s scenario, or by sending an image to a bot. You can add a message with information that a manager will contact them during business hours and reply to the user.

You can set up a cool-down interval for launching a flow between 1 minute and 24 hours — so your bot won’t launch a second time within the specified interval.

Unsubscription from Bot

This is a flow with one message element that will launch after a user unsubscribes using the/stopor/unsubscribecommand.

Trigger Flow

You can add keywords — triggers, that your bot will react to and launch your flow.

Click “Create a new trigger." Write your command using one or several words. For example, you can use the words “Order," “Tickets," “Price," or “Delivery."

If the user enters part of a keyword linked to your command, your bot will suggest prompts such as a button with the name of your trigger. When the user clicks the button, the flow will launch.

You can also restrict the callback for a specific period of time.

Learn more:How to Manage Chatbot Flow Triggers

If the user enters part of a keyword linked to your command, your bot will suggest prompts such as a button with the name of your trigger. When the user clicks the button, the flow will launch.

To disable this feature, go to your chatbot settings and select the "Disable bot suggestions when entered messages do not match a keyword" option.

在创建触发器,单击Create flowbutton and start editing it.

Building Your Flow

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.

Formulate the bot’s tasks, divide its functions into sections, think of how you will connect the elements, and start creating your bot’s flow using our drag-and-drop builder. You can also use services like X-Mind, Miro, or Coggle to create a preliminary customer journey map.

Start

You can choose the first element that launches your flow: "Message," "Filter," "Randomizer," and "API Request."

For example, using the "Filter" and "API Request" elements, you can check the subscriber's data and personalize your communication by starting your flow only for those users who have or do not have the requested data or branch your flow and send different messages. Using the "Randomizer" element, you can diversify your chatbot's auto-replies or create an A/B test.

To make an element a start element, connect the desired element to the “Start.”

To see which trigger starts your flow, click on the "Start."

The "Message" Element

Using the "Message" element, you can create a message of any type and add various blocks to it: text, video, gallery, buttons, user data request, and so on.

You can add the "Message" element to any part of your flow. For example, in the last element of your flow, you can thank your users, confirm their order, and send personalized information usingvariables, asking if the information is correct.

Text

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.

You can add the following types of variables:

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

Button

To connect the "Message" element with other elements in your flow, add a button or user input element to the message element. This is one of the most important elements for communicating with your users — buttons engage users and let them choose a direction for your bot to take them to the next part of your flow.

You can add up to three buttons in one "Message" element.

To add a button, click+ Add button。选择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.

To allow the user to continue the conversation by clicking on the link button, you need to activate the "Link Tracking" option in the chatbot settings under the "General" tab.

We recommend adding “Back" and “Back to main menu" 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.

Image

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

To add an image click on theAddbutton, choose the “Image" element, then upload your image. You can add images in JPG and PNG formats up to 5MB in size.

To upload an image from a link, select "Upload image by URL" in the drop-down menu and specify the link to the image in the field.

You can also specify a dynamic path to the image. For example, using the "API request" element or ana360 event,launching the flow via API, you can send a product picture and use this variable in the following message, displaying order data to the client.

To do this, select a variable or specify aJSON pathin the field and pass the path to the image in the variable's value. Thus, each client will receive an image according to their order.

Card

The carousel format allows you to showcase up to 10 cards. In one card, you can add an image, title – with up to 80 characters, and a description – with up to 80 characters and 3 buttons with a link to another flow or an external source.

To add more cards, click+on the right.

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

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, e.g., string (for text values), number, date, phone number, email address, URL, regular expression, or image or document.

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 you want to store information to.

The received email address, phone number, and other user data are saved in the automatically generated mailing list from our Email service.

Enter the time to wait for a response.

You can also create quick reply buttons under the message so that the user does not need to enter their own values. Instead, they select their response from the existing ones. You can add up to 10 quick reply buttons.

You can add quick replies for data with the "String," "Number," and "Regular expressions" validation types. For example, enter a specific word by the user, enter the quantity of a product, or select a product category.

For data with the "Phone" and "Email" validation types, the messenger prompts the users to use the contact details of their account.

Learn more: "How to Use Regular Expressions in Chatbots"


For example, if you have a request in the message element — "Click a number to get specific information." The validation type will be "Number." If the user enters a non-numeric value, they will see an error.

Another example: "Leave a link to your Facebook account." You should choose the "URL" validation type here.

Learn more:How to Add a User Input Element

Quick Replies

You can also add another type of buttons — "Quick Replies," (preset replies for chatbot users) which do not save user data (unlike data saved with the "User input" function). However, you can use it to expand the number of buttons and link each button to the next branch of your scenario.

Likewise, you can use buttons as an additional menu to improve navigation for your chatbot.

To add quick reply buttons, click "Quick replies" in the editing panel of the "Message" element, and enter a name for the button with up to 20 characters.

You can use emoji in your button text and add up to 10 buttons to the message element.

快速回复按钮显示to the user immediately below the text input field. Users can hide the buttons and reveal them by clicking in the text input field on the corresponding icon located on the right.

You can combine "Quick reply" buttons and regular buttons, but users will receive an additional emoji message in this case.

After sending the next message, quick replies disappear. To quickly get a message with these buttons, we recommend creating atrigger和一个流触发。然后,我把流n themenu, which is always shown to the user and expands when the "/" icon is pressed.

Moving Elements

By default, each element you add is placed at the end of the message element you are working on. Hover over the element that you want to move up or down and click on the corresponding button.

Continuing the Flow

You can connect the next element after the "Message" element using the button or the "Input" function. You can also continue your flow without waiting for the user's response. We recommend using it with the "Pause" element to check if the subscriber interacted with the flow and send a message after a particular time.

When planning a flow scenario, keep in mind that you cannot both continue your flow using the "Continue" connector and use quick replies.

Connecting Elements

Drag a line from the blue drop of one element to another element to connect them.

Click on the line twice, and you will see a button to remove a connection.

The disconnected elements will be highlighted in yellow; remember that you need to link them to another element.

Elements with empty fields will be highlighted in red, reminding you that you need to fill in fields. For example — if you added a button but did not enter text for it or used a link element but did not enter a URL. You cannot save your flow until you fill in these fields.

Adding a "Flow" Element

You can simplify your bot’s structure and move your subscriber to another flow.

To do this, add an element, then choose the "Flow" element, and select the flow you want to link from the drop-down list.

The "Flow" element will be the last element in this branch of your existing flow. You cannot link it to another element to continue the original flow.

Adding an "Action" Element

You can perform the following actions with the subscriber's data who gets to the "Action" element:

  • open the chat(open a chat with a subscriber in the "Conversations" section);
  • unsubscribe from the bot (unsubscribe a user from bulk and automated messages);
  • add tag(assign a tag to a subscriber);
  • remove tags(remove a tag assigned to a user);
  • add variable(set the variable value to be assigned to the subscriber or updated. You can also create a new variable);
  • send webhook(send a POST request with user data to your URL);
  • create deal(create adeal in your CRMwhen a specific action is performed, for example, clicking the "Buy" button).
  • notify me (send a message on behalf of your chatbot to the system chatbot or Telegram group).

Learn more:How to Use the "Action" Element

Adding a "Filter" Element

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 filter itself. You can filter by variable value, contact name, assigned tag, number of followers, your or another business account’s subscription status, interaction with your flow, campaigns received, last activity, subscription date, day of the week, trigger date and time, or payment.

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

In our example, we filter the values of the variables obtained through the “User input” element by specifying additional conditions.

Also with “Filter” element you can check your Instagram profile subscription status: whether the user is subscribed to your business account, or you to their profile.

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

Learn more:How to Use the Filter Element in the Chatbot Flow Builder

Adding an "API Request" Element

You can query a third-party server to create objects or retrieve information. Get data and use it later in your bot.

Save the received data to a variable, or add it to the next message as JSONPath.

In the elements panel, select the "API Request" element, and drag it after the element from which your script branching begins. Select the type of request and enter the URL to which the request will be sent.

After validating the request and receiving a successful response, save the value to a variable or copy the JSON Path from the response field for subsequent messages.

Learn more:How to Send and Receive Data from External Sources

Adding a "Pause" Element

You can set up a pause between flow elements between 1 minute to 24 hours. Use this to warm up your clients to avoid sending them too many messages at once.

This is the period during which no automatic messages are sent to the subscriber. The pause can be set in minutes, hours, or days.

You can choose to pause in between using the "Time period" option or until a specific time using the "Till Time" option.

选择"Time period" option and set a pause between sending flow elements from 1 minute to 24 hours. Use it in a flow, for example, to warm up a client. After the specified time, the next message will be sent.

Please note: Instagram only allows the following message to be sent after user interaction for 24 hours.

If you select a pause of more than 1 day between elements, you can set the time at which the message will be sent. The system considers the next day any time after 00:00 according to the time zone set in the settings of your personal account.

Also, you can select "Till time" and set a delay until a particular time. For example, you can use this option to indicate business hours or promotion hours.

Also, using the "Pause" element, you can setthe condition for executing the next element of the flow: always or when the subscriber is inactive.

Adding a "Random choice" Element

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, send random information, and test different chatbot scenarios.

拖动项”Random choice" element to the working area, connect it to the element you start branching the script from.

Learn more:How to Use the "Randomizer" Element

Save and Launch Your Flow

When you finished creating your flow and have looked over all of the elements, save your flow before exiting. ClickSave and send it to yourselfto test the flow and check if everything is working correctly.

You can also save an updated version of the flow while leaving the current version unchanged. To do this, clickSave as a new flow。The new flow will be saved in the "Flows" section.

Note: your flow must have at least one "Message" or "Action" element.

After that, you can exit your flow by clickingSave and exit

Analyze Your Results

SendPulse allows you to track general statistics on a chatbot in the "Statistics" tab.

You can see the number of messages sent and read, redirects from the flow, both in total and separately for each message in the "Bot structure" tab.

    Rate this article about "How to Create a Flow for an Instagram Chatbot"

    User Rating:5/5

    Popular in Our Blog

    Try creating a chatbot for Facebook Messenger for free

    Baidu
    map