# 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.

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2Fdm6QAOxbonVjv4w9NV3l%2Fimage.png?alt=media\&token=10462ac4-f44d-46f3-8592-259875ae6b00)

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

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FZnHtPdvutxUrYa1WGn2g%2Fimage.png?alt=media\&token=9c4c6144-8ef7-4c01-a0ee-f0a901504a10)

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.

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2F5UOYsnzqYOBZhaUU9nLE%2F4.png?alt=media\&token=2457983e-6cde-4e78-9aa8-e2cc9b667a9b)

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.

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FgFZ0PFh2WgsC2FTUNrs8%2F5.png?alt=media\&token=44da9bc8-0bac-422d-9b6c-1f565333515e)

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2F7LCeypMJQHHwTAhiUZd9%2F6.png?alt=media\&token=a654ce9e-716a-410d-a05e-ee2e1c7f9da1)

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