# Personalized images

{% hint style="success" %}
Available only on the "Business" plan.
{% endhint %}

Personalized images are custom illustrations or thumbnails that can be uniquely adapted for each user in your project. This customization typically involves modifying specific elements, such as text, to serve different purposes—for instance, displaying a user's name within the image to increase engagement.

Let’s create one together.

#### **Creating a personalized image**

To create a personalized image, you will need to use the certificate builder. You can access it from the course creation section.

In the certificate builder, you can configure personalized images to be distributed via a chatbot.

**Step 1: Set Up the Certificate and Its Text**

1. Click **"Create Certificate."**
2. Upload your chosen image as the certificate template.

<figure><img src="/files/nW3if6epHoScnXQdhB9x" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Be sure to activate the checkbox "Use the template as a custom image."
{% endhint %}

Now go to the certificate settings and arrange the necessary elements in the order you want:

<figure><img src="/files/dF4dQeeBvAfBDuX5x9TQ" alt=""><figcaption></figcaption></figure>

Enter the placeholder for the recipient's name (which will be dynamically replaced via the chatbot), along with any additional text you want to appear on the image. You can also configure other display settings here.

The certificate builder offers flexibility: feel free to experiment with different colors, fonts, images, and other design elements.

<figure><img src="/files/6pIRIlv4MDoBql6WlyJA" alt=""><figcaption></figcaption></figure>

To deliver these personalized images, you will need to use a chatbot function within a messenger that is integrated with the MaviBot system.

### Sending a file via chatbot

Go to the chatbot workflow where you want to send personalized images. There, you will need to use the function:\
`get_custom_image(image_id, name_on_image, avatar)`

{% hint style="warning" %}

## Please note

Each time you use this function, it uses the same resources as sending 10 regular messages.
{% endhint %}

<table><thead><tr><th width="294">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;">!</mark> image_id</td><td>Image ID</td></tr><tr><td><mark style="color:red;">!</mark> name_on_image</td><td>user name</td></tr><tr><td>avatar </td><td>user avatar<br>If you need to include a personalized image, pass the value "1".</td></tr></tbody></table>

You can find the image ID here:

<figure><img src="/files/crgK51LwZ64mQ8mooDJT" alt=""><figcaption></figcaption></figure>

As an example, let’s use a simple chatbot workflow that will send an image in the chat:

<figure><img src="/files/zeQKpifMnP9xHtGSnQvT" alt=""><figcaption></figcaption></figure>

So, in the second block, we’ll ask the client for their name, and in the arrow settings leading to the third block, we’ll specify that the user is entering data and save their name into a variable:

<div><figure><img src="/files/Cjv4VZVfcPiLZEyoDken" alt=""><figcaption></figcaption></figure> <figure><img src="/files/jdQ6JEqubCdfraH6zYaB" alt=""><figcaption></figcaption></figure></div>

In the final workflow block responsible for sending the image, insert the function into the calculator field. Use the following format, including the `image_id` and your `name` variable.

<figure><img src="/files/gLVP92S6OFLmHPBuMpdF" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}

## Please note

The `get_custom_image` function returns a dictionary. To display the image in the chat, do not output the result variable (e.g., `image_1`) directly. Instead, you must reference the value stored under the `'url'` key (e.g., `image_for_user`).

If configured correctly, the image will be sent and displayed in the chat immediately.
{% endhint %}

{% hint style="success" %}

## Variable naming rules

When naming your variable in the calculator, ensure the name:

* Contains only Latin letters and numbers (e.g., `picture` is correct).
* Has no spaces (use underscores: e.g., `apple_on_table`).
* Places numbers at the end (e.g., `apple1`, not `1apple`).
  {% endhint %}

Note that we used the syntax `#{full_name}` to dynamically insert the value provided by the user into the variable.

As a result, the images sent in the chat will be personalized with the name the user entered during the conversation.


---

# 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/how-to-do.../personalized-images.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.
