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 embed user answers in an email or insert the data into Yandex Tracker issue fields.

To do this, use variables:

  1. In the Integration tab of your form, add an action.

  2. Select the field and click on the right.

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

  4. If using variables like Question answer, Question answer option ID or similar, you can choose a filter for the variable values if needed.

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

When integrating your form with Yandex Tracker, you can add an employee specified in an answer to a People,To do so, add the Question answer option ID variable to the field. If you use a Question answer variable, integration won't work.

For example, here's the text of an email containing all the user's answers to the form's questions.

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 Long text 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.

Formatting answers

If you're using the Question answer variable in your integration settings, you can choose the format for the list of answers.

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

To transfer answers to Tracker or Wiki, we recommend using the New format option. For more information about the YFM markup, see Wiki Help.

Variable reference

You can use the following variables in action settings:

Variable

Description

Personal data

Personal data of the user who filled out the form.


Variables from this group are converted to the user's personal data only if the form was created in Yandex Forms for Business and the user who completed it is an employee of your organization. You can only get data from external users if they provide it in answers to the form's question.

Name

User's name.

Login

User's login.

Email

User's email address.

Gender

User's gender.

Department

Employee's department (for Yandex Forms for Business users).

Phone number

Employee's work phone number (for Yandex Forms for Business users).

Supervisor

Employee's direct supervisor (for Yandex Forms for Business users).

Team

Employee's teams (for Yandex Forms for Business users).

Organization data

Information from the address book of the Yandex 360 for Business organization.

Information from the answer to the question

For questions of the People, Departments, and Teams is one of the fields from the employee or department 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 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 segment the user's result fits into.

Description of test results

Description of the segment 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 form questions.

Form ID

Unique form ID.

Name

Form name.

Question answer

User answers to a specific question in the form: select the question and set up 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 and question formatting. 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. 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 format. This format can be useful when working with HTTP requests.

Response ID

Unique ID of the completed form.

Question answer option ID

Unique ID of an answer option for multiple-choice questions (such as People or Drop-down list).

Response date

Date when the form was completed.

Form author's email

Email of the user who created the form.

Browser

User's browser and operating system information.

OS family

Operating system version.

OS name

Operating system name.

OS name

Operating system version.

Browser name

Browser name.

Browser version

Browser version.

Request

Technical parameters of the HTTP session.

Host

Domain name of the server the request came from.

URL

Form's address.

All GET requests

Values of all request parameters.

Learn more about how to use GET parameters to pre-fill a form.

GET parameter

Value of a specific request parameter (specify the parameter name).

Learn more about using GET parameters to pre-fill a form.