Buttons and attachments
This article explains how to work with buttons and attachments in Instagram.
How to work with buttons
Keyboard (reply)
Instagram supports up to 11 reply buttons. The buttons can only be arranged in a line
Example:

Result:

In text (inline)


Instagram supports no more than 3 inline buttons


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.

You can upload attachments to a block either as a file or by providing a link to the file.
Uploaded video files should not exceed 20 MB, while audio and image files should be no larger than 5 MB.
Attachment requirements:
Audio
M4A
5 MB
Image
JPEG, PNG
5 MB
Video
MP4
20 MB
It is NOT recommended to use the MP4 format for audio attachments. Additionally, no audio will be sent at all in MP3 format.
How to create a carousel
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:

Please note: the expression r = send_carousel(p, '') must start on a new line in the Calculator.
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.

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" }]}]

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:
Set up responses to specific phrases in your funnel.
Place the necessary blocks in the "Start" state.
Enter the introductory phrase text into the trigger.
Please note!
Introductory phrases appear for users who have not previously contacted your Instagram account (or if all previous chat history has been deleted).
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:
Trueif the user is subscribed.Falseif 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).


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.
Please note that the True and False statuses must be capitalized. Otherwise, the check will not work correctly.
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.
Last updated