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 Questions

  • Utility 

  • Action

    Screenshot 2024-11-30 at 2.09.28 PM.png

  1. The Send Message node allows sending text, media, WhatsApp templates, CTA button. You can also add a variable in the message node. 

    Screenshot 2024-11-30 at 2.07.01 PM.png

  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. 

    Screenshot 2024-11-30 at 2.18.21 PM.png

  1. The Send WhatsApp Template node allows you to send Meta-approved WhatsApp templates through the bot

Screenshot 2024-11-30 at 2.23.00 PM.png

  1. The Send CTA Button node allows you to send text, image, video, or document with clickable phone, link, and email options, enabling users to contact you directly.

    Screenshot 2024-11-30 at 2.29.24 PM.png

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

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

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

  5. 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.

  6. 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. The Ask Button lets you add up to three buttons with a header along with header storing following types of data

  • None

  • Text

  • Image

  • Video

  • Document

Add footer and variables if required.

Screenshot 2024-11-30 at 2.41.02 PM.png

  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. The Delay node allows you to set a specific wait time before the bot responds, simulating a more natural conversation flow by adding a delay

Screenshot 2024-11-30 at 2.57.01 PM.png

  1. The Action node allows you to assign a conversation to an agent, unassign it, or close the conversation at any point.

    Screenshot 2024-11-30 at 2.47.31 PM.png

  2. The Assign Conversation node allows you to assign a conversation to your team or an agent for quick and efficient resolution

    Screenshot 2024-11-30 at 3.14.01 PM.png

  3. The Unassign Conversation and Resolve/Close Conversation nodes allow you to unassign a conversation from an agent or close the conversation once it's resolved.

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

  5. 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!