How to create MSG91 Bot


  1. Open Hello, navigate to "Manage," and select "Bots."


  1. Click on the Create Bot button and select type as MSG91[Beta]. 


  1. Name the bot and Save it


  2. Click the "Create Flow" button (top-right corner) to begin creating your bot flow. Name the flow and select the appropriate flow type based on your needs—either Message-based or Fallback.

  1. Defining Intents and Matching
    Add intent keywords (words users may input when interacting with the bot) and enable Case Match and Regex Match based on your requirements:

  • Case Match: Enables case-sensitive keyword recognition. For example, if “Hi” is case-matched, only the exact match “Hi” is accepted, while “hi,” “HI,” or “hI” will be rejected.

  • Regex Match: Use regular expressions (regex) to define text patterns, making it possible to validate, search, or manipulate user input. For example, the regex \d{3}-\d{2}-\d{4} matches a U.S. Social Security number (e.g., 123-45-6789). For more details, click "Learn more" or use tools like ChatGPT to help create regex codes.

  1. If a user doesn’t respond after a set time, enable Nudge Contact to send reminders. Customize the message, number of attempts, and delay time. Save once configured




  2. Now you can add the following nodes in your flow:

  • Send a message or text

  • Ask text or button

  • Utility 

  1. The Send Message node allows one to either send a text or media of any type. You can also add a variable in the message node. 




  2. The Send Media option allows user to send/attach media of the following type

  • Audio

  • Image

  • Video

  • Document


Click on the supported file types button to know more about the files supported by the bot along with their size. 

  1. The Ask Questions node provides user with two options: Ask text and Ask button




  2. The Ask Text button lets user ask questions and store them in either pre-defined variables such as customer_name, customer_mobile and customer_email or custom variables. 




  3. Create the variables by writing the variable name under the store response section.

  4. Validation Settings: This feature helps a  bot  validate the responses received from the user. Enter the no. of attempts along with the message to be shown when user input is invalid.

  5. Post the completion of no. of attempts, the bot can either do the following tasks

  • Drop from the bot

  • Skip the question

  • Proceed to fallback: Upon selecting this option, a fallback option is created allowing you to perform an action of your choice.
     


  1. To validate the response add the max and min no. of character required along with the regex expression if required. 

  2. Ask Button: Add buttons [max 3] along with header storing following types of data

  • None

  • Text

  • Image

  • Video

  • Document

Add footer and variables if required.

  1. Use Utilities to add custom logic or scripts using JavaScript. You can execute APIs and display responses based on your logic.

  2. You can test the script and do the needful changes by clicking on the test script button before saving it. 

  3. Click on the Settings to configure the bot level settings

  4. Configuring Settings

  • Enable Inbox: Select which inboxes to integrate with the bot.

  • Fallback Flow: Choose a custom fallback action in case of no response.

  • Non-response Action: Define the bot’s behavior when the user doesn’t respond.

    

  1. Save all settings, and your MSG91 bot is ready to go!