# Process message

The "Process message" action processes the message from the subscriber. Allows you to immediately extract the necessary data and write it to a variable.&#x20;

To add an action, select it on the auxiliary panel (on the left), or right-click in an empty area of ​​the screen.

![](/files/oOZOqTuPStNAO0KaOyU4)

An action block will appear on the script screen. A menu will open on the right.

![](/files/4ZRmo2Z445ouWwOcdCj0)

If you do not check any boxes in the block menu, the bot will simply allow the person to enter a message and move on to the next specified block.&#x20;

However, the "Set Message Template" and "Retrieve Attachments" options allow you to retrieve data and save user attachments to variables.&#x20;

Check the box "Set message template" and enter the template. The main element of the template is any word(s) in brackets <>

Template example: "phone and mail ". That is, we expect the user to send us their phone number and mail in this format.

![](/files/K6rK1QxWEsQQ7Yae3Knh)

For example, the message "phone number 89123456789 and mail <client@mail.ru>" is suitable for such a template (it is good to inform the user in advance that he needs to write his data in this way).&#x20;

The bot will extract "89123456789" and "<client@mail.ru>" and write it to the variables you specify.&#x20;

In the same way, you can extract attachments from a sent message, select their number, type, and maximum size.

![](/files/CKL2hBsFP7SgFbhoqcgs)

![](/files/khEW3dbGNKLFpDW4AaOk)

Now you know how to apply the "user input" action.


---

# 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.smartbotpro.io/scripts/actions/process-message.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.
