---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com.tr/support/forms/en/vars.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/support/forms/en/llms.txt

# Variables in action settings

When you set up integration of your form with other services, you can send answers or other data from the form to the service. For example, you can insert the user's answers into the body of an email or insert data into issue fields in Yandex Tracker.

To do this, use variables:

1. In the **Integration** tab of your form, [add an action](https://yandex.com.tr/support/forms/en/notifications.md#add-integration).

1. Select the field and click <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" aria-hidden="true" class="yc-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.17 1.67a.83.83 0 1 1 1.66 0v7.5h7.5a.83.83 0 1 1 0 1.66h-7.5v7.5a.83.83 0 1 1-1.66 0v-7.5h-7.5a.83.83 0 1 1 0-1.66h7.5v-7.5z"/></svg></svg> on the right.

1. In the list, select a variable to add to the field.

1. If using variables like **Answer to question**, **Question answer option ID** or similar, you can choose a [filter](#var-filters) for the variable values if needed.

1. Click **Save**.

When data is sent to the service, the variable is automatically converted to a value: an answer to a question, test result, or technical data.

 {% note warning "" %}

When [integrating your form with Yandex Tracker](https://yandex.com.tr/support/forms/en/create-task.md), you can add the employee specified in an answer to a <q>People</q> question to the **Author**, **Assignee**, and **Followers** fields in Yandex Tracker. To do so, add a **Question answer option ID** variable to the field. If you use an **Answer to question** variable, integration won't work.

{% endnote %}

> For example, here's the text of an email containing all the user's answers to the form's questions.
>
> ![](_assets/variables-example-new.png =500x)

## Filters {#var-filters}

If integration settings contain answers to questions added using variables, errors may occur if the answers do not match the format required for integration. For example, if you add an answer to a <q>Long text</q> question to the HTTP request body, and this answer contains line breaks, integration will not work.

To avoid data format errors, use the following filters for variables:

* **Sanitize string**: Remove special characters from the answer.

* **JSON**: Convert the answer to a JSON-compatible format.

* **base64**: Convert the answer to ASCII encoding.


![](_assets/var-filter-json.png =300x)

## Formatting answers {#formatting-responses}

If you're using an **Answers to questions** variable in the integration settings, you can select the format of the answer list.

* **Plain text** shows the data as Question - Answer pairs.

* **Old format** shows answers as `%% Answer %%`.

* **New format** embeds answers within a code block.

* **JSON** shows answers as `"key": "value"` pairs.

 {% note info "" %}

To send answers to Tracker or Wiki, we recommend using the **New format** option. For more information about YFM markup, see [Wiki Help](https://yandex.com/support/wiki/wysiwyg/text-format.html).

{% endnote %}

## Variable reference {#var-ref}

You can use the following variables in action settings:

#|
|| **Variable** | **Description** ||
|| **User info** | Personal data of the user who completed the form.<br/><br/><br/>Variables from this group are only converted into the user's personal data if the form was created in [Forms for Business](https://yandex.com.tr/support/forms/en/go-to-forms.md#business-features) mode and completed by an employee of the organization. You can only get data from external users if they provide it in answers to the form's question. ||
|| Name | User's name. ||
|| Username | User's username. ||
|| Email | User's email. ||
|| Gender | User's gender. || 
|| Department | Employee's department (for [Yandex Forms for Business](https://yandex.com.tr/support/forms/en/go-to-forms.md#business-features) users). || 
||Phone | Employee's work phone number (for [Yandex Forms for Business](https://yandex.com.tr/support/forms/en/go-to-forms.md#business-features) users). || 
||Manager | Employee's direct supervisor (for [Yandex Forms for Business](https://yandex.com.tr/support/forms/en/go-to-forms.md#business-features) users). || 
||Team | Employee's teams (for [Yandex Forms for Business](https://yandex.com.tr/support/forms/en/go-to-forms.md#business-features) users). || 
||**Company details** | Information from the organization's address book in Яндекс 360 для бизнеса. ||
|| Information from the answer to the question | For questions of the **People**, **Departments**, and **Teams** type, this variable is one of the fields from the employee's or department's card specified in the answer. ||
|| User information | One of the fields of the card of the employee who filled out the form. ||
|| **Test results** | [Test or quiz](https://yandex.com.tr/support/forms/en/tests.md) results. ||
|| Maximum test points | Maximum number of points one can score in the test. ||
|| Total questions with points | Number of question one can score points for. ||
|| Points scored | Number of points scored by the user. ||
|| Test results heading | [Header of the segments](https://yandex.com.tr/support/forms/en/tests.md#test-result) the user's result fits into. ||
|| Description of test results | [Description of the segment](https://yandex.com.tr/support/forms/en/tests.md#test-result) the user's result fits into. ||
|| Points scored for a question | Number of points scored for a selected question. ||
|| **Form** | Form parameters and answers to the form's questions. ||
|| Form ID | Unique form ID. ||
|| Name. | Form name. ||
|| Answer to question | User answers to a specific question in the form: select the question and set up [filters](#var-filters). Only the answers to the question you selected are passed to this variable. ||
|| Answers to questions | User answers to multiple questions: select the questions and set up [filters](#var-filters) and [question formatting](#formatting-responses). The selected questions and the answers to them are passed to this variable as Question : Answer pairs. ||
|| Answers to questions in JSON | User answers to multiple questions: select the questions and set up [filters](#var-filters). The selected questions, the answers to them, and the information about the form (ID, creation date, and other parameters) are passed to this variable in [JSON](https://en.wikipedia.org/wiki/JSON) format. This format can be useful when working with [HTTP requests](https://yandex.com.tr/support/forms/en/send-request.md). ||
|| Response ID | Unique ID of the completed form. ||
|| Question answer option ID | Unique ID of an answer option for multiple-choice questions (such as <q>People</q> or <q>Drop-down</q> list). ||
|| Response date | Date when the form was submitted. ||
|| Form author's email | Email of the user who created the form. ||
|| **Browser** | User's browser and operating system info. ||
|| OS family | Operating system type. ||
|| OS name | Operating system name. ||
|| OS version | Operating system version. ||
|| Browser name | Name. ||
|| Browser version | Version. ||
|| **Request** | Technical parameters of the HTTP session. ||
|| Host | Domain name of the server the request came from. ||
|| URL | Form's address. ||
|| All GET parameters | Values of all request parameters.<br/><br/>[How to use GET parameters to pre-fill a form](https://yandex.com.tr/support/forms/en/get-params.md) ||
|| GET parameter | Value of a specific request parameter (specify the parameter name).<br/><br/>[How to use GET parameters to pre-fill a form](https://yandex.com.tr/support/forms/en/get-params.md) ||
|#

{% include [style](https://yandex.com.tr/support/forms/en/_assets/style-a13ddc9841bc.md) %}
