How to Separate Instagram Ads Message on Instagram DM

How to Separate Instagram Ads Message on Instagram DM

Separating Instagram DM Messages According to Message Type

It is possible to separate user DMs according to their message type(if they are coming from an advertisement or not) and trigger a flow which is specified for DM user’s message type.

1- Creating Add on Instagram

Partner needs to create an advertisement on Instagram which directs customers into the DM of Partner’s account.


2- Publish the Bot on Instagram

Publish the MindBehind Chatbot to the Instagram channel. To do this, please follow the document on this link.

3- Arrange the Bot Flow to Separate User’s DMs

A) Put a Logic Action at the beginning of the flow to set a statement.

B) Set the statement as “If the LASTMESSAGETYPE is equals to INSTAGRAM_ADS” and set the connection of this statement to the flow you desired.

C) For the ELSE scenario, you can set a fallback connection. So, if the “if statement” is not satisfied, user will continue to the settled fallback scenario.

After the settlements above, ChatBot will be able to separate users if they forwarded to DM from Instagram Advertisement or not. Just make sure that you save and publish the bot to the Instagram channel after changes.

4- Test

After the flow is designed as described and changes published to the Instagram Channel,

You can send DM to the any advertisement of partner’s Instagram Page with a random text. Since you sent DM by coming from an advertisement, you will continue on the flow that is created for advertisement DMs.

On the other scenario; if you send a DM without directed from an add, the other flow will be continued which is designed for regular DMs.

5- What are the Additional MessageType Settings

If needed, same logic for other messageTypes can also be used, detected. By following the steps below, user DMs could be separated according to mention, reels or image answers.

For Example: If LASTMESSAGETYPE equals IMAGE; — (If the user message is coming as a DM answer to the image that partner shared)

If LASTMESSAGETYPE equals INSTAGRAM_STORY_MENTION; — (If the user message is coming as a DM answer to the Story that partner shared)

If LASTMESSAGETYPE equals REELS; — (If the user message is coming as a DM answer to the Reels that partner shared)

6- What are the Additional MessageValue Settings

It is also possible to separate user DMs according to its “values” instead of “types”.

By using the same structure, messageValue should be stated with the desired user message.

Warning: MessageValue is the direct message that user send, which means it is whatever the user types and sends.


If LASTMESSAGEVALUE equals merhaba; — (If the user message is “merhaba” itself, make that user follow the flow1)

    • Related Articles

    • How to have the Private Reply feature on Instagram

      Private Replies allow businesses to reply to comments made on their posts with a single message on Instagram. Once this message is sent, the conversation ends. Once a user replies to this message, a new conversation begins. When using this feature, ...
    • Instagram: Business Login Documentation

      Business Login for Instagram Business Login for Instagram makes it easier for Instagram users who still need to configure their accounts for API access. In order to make their account access to meta APIs, Instagram users must first convert their ...
    • Instagram Persistent Menu

      What is the Persistent Menu? The Persistent Menu is a user interface element inside Messenger API support for Instagram conversations listing the main features of your Page. This enables users to then easily discover and access them. For more ...
    • How to Publish your Bot to Instagram

      Prerequisites: Before publishing your bot on your Instagram Business account please follow the following steps: First of all, connect your Instagram Business account to a Facebook account.   Select Settings from your Instagram account. At the bottom ...
    • Which Action Types are Supported on Instagram Channel?

      Message Action Limitations & Button Details Send Text Send Image Send Document Send Audio Send Video Send Template Up to 1000 characters Up to 8 MB jpeg, png ❌ Up to 25 MB acc, m4a, wav, mp4 Up to 25 MB, mp4, ogg, avi, mov, webm ❌ ❌: Not supported ...