# Extract data

{% hint style="info" %}
The "retrieve data" action is an indispensable assistant in obtaining and saving information. With it, you can extract any content from any string in a given format.&#x20;
{% endhint %}

Let's add a block by selecting an action in the additional menu on the left or by right-clicking on a free area of ​​the screen.

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FkcGAdIJGwd1apWHkk2nr%2F1.png?alt=media\&token=4e5065c6-5c6b-4389-96f1-b80a174655a7)

The action block menu contains an input value, a message template, a filter, and a variable to write the data to.

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2Fb6ONOmioB24IvUcO7s70%2F2.png?alt=media\&token=bab23dc3-efc1-4d00-b2be-b8e1fce08740)

The "Input Value" field is an indication of any string from which to extract. &#x20;

{% hint style="info" %}
If you specify the %message% variable as the input value when performing the action, the bot will take data from the subscriber's last message
{% endhint %}

Start typing the pattern and the filters will appear.

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FV3hByWFu5wA6yAMhkq4R%2F3.png?alt=media\&token=2a29fb82-0dab-49f1-964a-b6e3af5a7a74)

You can specify one of the filters and its settings, and then set a variable in which to write the received data.&#x20;

In addition, you can set *any string format* and extract the necessary data from its parts using a template.
