# Use of media files

Media files are needed when a bot needs to send a client an image, presentation, price list, instruction or other finished material.

Downloading a file by itself does not send it to users. After downloading, add the action **Send the media file** to the bot and explain in the prompt when to call it.

## Before loading

- Give the file a clear name;
- Make sure there is no confidential information in it.
- Use the current version of the document;
- Prepare a short description of the appointment.

For example, the description **Price list of salon with services and prices for July 2026** is more useful than **file1.pdf**.

## File download

1. In the left menu of ChatRex, open **Knowledge Base**.
2. Open **Media files**.
3. Press **Download the file**.
4. Select a file on your computer.
5. Specify the description: what is in the file and in which case it should be sent.
6. Save the file.

## Addition of action

1. Open **My Bots** and press **Change** opposite the desired bot.
2. Go to **Integrations and actions**.
3. Enable actions if they are not already included.
4. Press **Add action**.
5. Select the basic action **Send media**.
6. Choose the method of sending:
   - specific file – the bot always sends the selected material
   - Selection by description - the bot selects the appropriate file at the request of the client and file descriptions.
7. Save the action and changes of the bot.

## Rule in Prompt

Specify the exact condition of sending:

```md
If the customer asks for the current price list, call the
`send_price_file` action. Before sending it, ask whether the complete price list is required.
Do not say that the file was sent if the action returned an error.
```

Use the code name given in the action card.

## Verification

1. Open **Testing**.
2. Ask the file as the client would.
3. Check the action call in the processing log.
4. Then repeat the check in the real channel: file support depends on the messenger or CRM.

If the bot chose the wrong material, make the file descriptions more specific or set up sending a fixed file.

Other embedded operations are described in [**Basic Actions**](<../actions/basic-actions.md>).

!!!warning
A deleted or replaced file may stop being sent in an already configured action. After changing the media library, re-check the associated scenarios.
!!!
