# Buttons with a link

## How to create a button with a link

To make the bot display buttons with links to clients, when creating (or editing) a button, you need to:

Step 1. Create a button and Select type to **"Default"**:

<div data-with-frame="true"><figure><img src="/files/XTB8wAcOne3a1ZUAEaDd" alt="" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/eANfpKBeyWlbOnrgLOWY" alt="" width="563"><figcaption></figcaption></figure></div>

Step 2. In the **URL** field, enter:

а) a direct link:

<div data-with-frame="true"><figure><img src="/files/zOcWMSlYtQL5wHTN7aO8" alt="" width="563"><figcaption></figcaption></figure></div>

b) A variable that contains a link:

<div data-with-frame="true"><figure><img src="/files/KQh3j2YKkt7aAyAqhV74" alt=""><figcaption></figcaption></figure></div>

Clicking the button will open the URL specified in its settings.

{% hint style="warning" %}
Note!&#x20;

Each messenger has its own specifics. For example, in Telegram and Instagram, you can only add a link to an **inline button** (buttons in the text).

<img src="/files/OqskKSWpNdU5RQOgYZ3B" alt="" data-size="original">
{% endhint %}

## Click notification

To track when a client clicks a link or button and configure subsequent actions, use the **"Click notification"** checkbox in the button settings.

<div data-with-frame="true"><figure><img src="/files/Gx5UgWplIo00gfS6vNuC" alt="" width="563"><figcaption></figcaption></figure></div>

Click the checkbox to receive callbacks (event notifications) when a client clicks the button:

<div data-with-frame="true"><figure><img src="/files/Qk6OO1Om6aXzEF34U3gZ" alt="" width="563"><figcaption></figcaption></figure></div>

Next, click **"Edit"** or **"Add"** (depending on whether you are editing an existing button or creating a new one).

### Example

Let's test the button. After clicking it, you should see a prompt to follow the link.

<div data-with-frame="true"><figure><img src="/files/xBFHkqTxGhMpj0t9k6aR" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="info" %}
The callback will not be received until the client clicks **"learn more"**.
{% endhint %}

If the client follows the link, a callback of the following form will appear in the **Clients** section in the client’s dialogue:\
`link_was_pressed #{URL}`, where `link_was_pressed` is the callback body (event in the project), and `#{URL}` is your link.

<div data-with-frame="true"><figure><img src="/files/6IugCkIQyr7pTOzZB0to" alt=""><figcaption></figcaption></figure></div>

To configure a reaction to the callback, create a trigger block where you specify the callback in the trigger field, or specify the callback in the connection trigger:

**Option 1.** Create a trigger block that will trigger only if the callback is received:

<div data-with-frame="true"><figure><img src="/files/JJZoMBwtNQ0oMrWXuL2j" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
In this example, we used the **"Trigger"** block — it will also trigger only if the specified callback is received, but it will not remove the client from the main funnel.<br>

You can use another trigger block as well.
{% endhint %}

{% hint style="success" %}
Please note!

The builder has a limit of 500 trigger blocks per project.
{% endhint %}

**Option 2:** Use a connection trigger

<div data-with-frame="true"><figure><img src="/files/1S1e8rBHoEpmt1babJUv" alt="" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/tFqU6r2QWjRmof9ZRPsR" alt="" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/TfCXSR42JikdgvEoZtIQ" alt="" width="563"><figcaption></figcaption></figure></div>

While both require the callback to trigger, they affect the flow differently:

* **Option 1 (Fallback block):** Keeps the user in the same state.
* **Option 2 (Connection):** Advances the user to the next funnel state.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mavibot.ai/chatbot/builder/buttons/buttons-with-a-link.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
