Buttons and attachments

This article explains how to work with buttons and attachments in Instagram.

How to work with buttons

Instagram does not support sending inline and reply buttons at the same time

Keyboard (reply)

Instagram supports up to 11 reply buttons. The buttons can only be arranged in a line

Example:

Result:

In text (inline)

The buttons can link to third-party resources. Visually, these buttons are identical.

For instructions on configuring buttons, refer to the Buttons section.

How to work with attachments

You can send attachments in the message. For more information about which attachments and how to add them, see the Sending attachments section in the documentation.

Attachment requirements:

Media file type
Supported format
Maximum size

Audio

M4A

5 MB

Image

JPEG, PNG

5 MB

Video

MP4

20 MB

The carousel can contain from 2 to 10 cards (slides).

Let's use a 3-card carousel as an example. To create the cards, you need to enter the following in the Calculator field:

p = [{"title":"TITLE", "description": "IMAGE DESCRIPTION 1", "image": "LINK TO THE IMAGE 1", "buttons":[{"text":"BUTTON TEXT 1"}]},{"title":"TITLE", "description": "CARD DESCRIPTION 2", "image": "LINK TO IMAGE 2", "buttons":[{"text":"BUTTON TEXT 2"}]}, {"title":"TITLE", "description": "CARD DESCRIPTION 3", "image": " LINK TO THE IMAGE 3", "buttons":[{"text":"BUTTON TEXT 3"}]}]

r = send_carousel(p, '')

Copy the link:

The result:

That means you need to assign an array containing the title, description, image, and buttons to a variable p (name the variable differently if you wish). Then, use this variable in the send_carousel(p, "") method.

It leaves #{None} in the "Response" field.

You can add links to the buttons in the carousel cards. When a user clicks the button, they will be directed to the link.

To add a link to a button on the card, include it in the array:

p = [{"title":"title", "description": "CARD DESCRIPTION 1", "image": "LINK TO THE IMAGE 1", "buttons":[{"text":"BUTTON TEXT 1", "url":"LINK FOR THE BUTTON" }]}]

Another optional parameter, payload, has been added to the carousel card buttons. It is not displayed to the client but allows you to analyze the client's choice.

Since carousel cards often require buttons with identical text, an additional payload parameter has been introduced. This parameter is not visible to the client but enables you to analyze their selection.

Pay attention to its proper usage:

p = [{"title":"title", "description": "CARD DESCRIPTION 1", "image": " 1", "buttons":[{"text":"BUTTON TEXT 1","payload":"1"}]},{"title":"title", "description": "CARD DESCRIPTION 2", "image": "LINK TO THE IMAGE 2", "buttons":[{"text":"BUTTON TEXT 1","payload":"2"}]}, {"title":"title", "description": "CARD DESCRIPTION 3", "image": "LINK TO THE IMAGE 3", "buttons":[{"text":"BUTTON TEXT 1"}]}]

The payload parameter can be omitted, as shown in the Figure above.

How to set introductory phrases

Introductory phrases allow a person to start a chat with a company using a list of frequently asked requests. You can set up to four requests.

To set up introductory phrases, you need to set up a slider in the connected Instagram account, in the “Channels” section.

After clicking on this slider, a pop-up window appears where you can set the necessary introductory phrases.

Then, follow these steps:

  1. Set up responses to specific phrases in your funnel.

  2. Place the necessary blocks in the "Start" state.

  3. Enter the introductory phrase text into the trigger.

Please note!

Set up a keyword response in Direct

To reply to clients in Direct Messages based on keywords, you can use a block with a Trigger (Start and Trigger blocks) and enter the words you want your bot to respond to in the Trigger field:

The choice of a match is based on the presence of keywords or a Complete match (recommended options).

In the "Message text" field, enter the bot's response that the user will receive. You can also add attachments, buttons, and links.

How to check if a user is subscribed to your account

There are two methods to check the subscription status:

1. Checking subscription using the calculator

result = check_insta_subscription()

result is the variable name where the check result will be stored (you can rename it if needed).

The function returns:

  • True if the user is subscribed.

  • False if the user is not subscribed.

The check must be performed in the "Variable" field, both on the arrow and in the block.

  • result == True – an expression in the "Variable" field if the client is subscribed to the account.

  • result == False – an expression if the client is not subscribed.

You can also use other comparison expressions, for example: result != False (result is not equal to False, meaning the user is subscribed to the account).

  1. Data from client card verification

When a user interacts with the bot, the variables follow and followers are displayed and verified in the client card (under the Client Variables subsection).

follow variable – verifies subscription status. It takes the value True if the client is subscribed to the account, False if not subscribed, and None if the client's account is closed.

verified – indicates whether the user has a verified account (blue checkmark). It is True if verified and False if not.

followers – shows the number of subscribers/followers the client has.

To check subscription status or restrict funnel progression, you can use the follow variable in condition blocks or arrow connectors within the "Variable" field.

Example:

In the Trigger field, enter any word that will start your funnel.

In the variable for comparison, write: follow == True OR follow != False

  • In the first case, you check whether the person is subscribed to your account.

  • In the second case, you check whether the person is not subscribed to your account.

To deliver different messages based on subscription status, you need to create two blocks with opposite conditions. If you prefer a less cluttered approach, we recommend defining the conditions on the connections (arrows) instead.

Triggers on connections:

Enter the trigger in the arrow's "Variable" row: follow == True or follow != False

If the trigger condition is met, the client proceeds further down the funnel.

If the client is not subscribed, they go to the block where the verification conditions are not met (follow == False or follow != True).

If you want the check to be dynamic, we recommend adding a button—for example, "I have subscribed"—so the check can be performed and the person can move to the next stage.

Attention

Last updated