# Whatsapp

Let's consider an example of a robot that allows automatic messaging via Whatsapp.

The robot project consists of three diagrams and two files in xlsx and txt formats.

The main diagram of the project is called **“WhatsappSend”** and looks like this (for convenience, the blocks of the diagram are numbered):

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc3q8gJY8fVznh1PXPts_3HflLapjGYkj4dO5oV1HBJtOliMKlqIeRSXpOv1S0FgiVkNpaKzXUbZ8FoijSbdMO2qWKtItOr2N9KOI4ic1Ml9HgLca4QdcOwZVZoZexUfCXE7ap2zQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcMmAWlLRuggcNguIs6t-P5MWYfO4PsiHW7lZg6Zl1F3edaPgCRuwdZY0pntP63-2idRQeOwrfUQa008uUhJA7c5flfSmKR0hxoARVgfI4XORNlXovKMOzLvcLnsbtrCLVNamvsUA?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe410im7gNEjjiGS308tNI2Rb1enue8nHhH42JFO0pLhyrPOkqb6iu0lX6a4InexsEVeKrpKZ84uqafM043OO1g9JpDrVO0aKfc8gODIIBTBIVY0TZvxcPXVZaHaVOuHjnWV_JSLw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

<br>

1. **Block “Start”** (any diagram begins with this block).
2. **Block “Process”** allows creating scenarios consisting of multiple diagrams. The execution of the scenario will continue from the “Start” block of the specified project diagram. The execution of the scenario will return to the current block and continue in the current diagram as soon as the “End” block in the external diagram is reached. For the “Process” block, the property “Diagram Name” is specified (the name of the diagram file where the scenario will continue execution).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdcBkkMqVI-ggyu7OPXDRwkGHt1ltuYOod2y1RHMWP5Pa6amW687oBPbWPC75Mo0TRn7qrw-u411KWaRdnDmE8GVTRksqUjADiI5hN_Uc9vclg4MOMZcFzRYvsmXhGoU5wENyg-mQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

3. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $StartWork. That is, if the variable $StartWork (which is a boolean variable) is equal to $true, then we go down.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfSIknvvw22aSemPCbMK_BRfJht6BAO4gww9yS4y0jV3Yn1UaHI8E2nuhhkWVvKpkf52siK7tPORPL5LdHIedIrQHW6GicSdInIRPRbtwJWkIFNEGofpUFMnFRNUMbs1o9RFqE0?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

4. **Block “Launch Chrome”** allows launching Google Chrome. For this block, the following properties are specified:

* URL (the address of the page to be opened when launching Google Chrome);
* Current tab (if the flag is set, the page will open in the currently selected tab of the browser);
* Wait time (the time to wait for the application to launch and the tab to load in seconds).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeQIJ1BHlAqiLuLK4d38CSEvkDdEuS33rTpXvyhhmMJmjJn6D8YRrCr2s8Xu6SHAjM-TQASqkTbVxzCgzJX2cQiTI9obkOdzjb-90tVpWb2T-tTBvTZtNMFkdzYQz6IIErVlO7Puw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

5. **Block “Wait for Appearance”** waits for the appearance of a user interface element on the screen added to the diagram using the [User Action Recording Tool](https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/rabota-v-sherpa-designer/osnovnoe-menyu/panel-razrabotka/menyu-zapis/zapis-deistvii-polzovatelya).
6. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified. A text constant is indicated in quotes, and the variable name starts with the symbol $. That is, it outputs the log message “Connection error. The phone may be out of reach...”.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXesZqbEeS7-_CzDcs66rq0YWKTOdSa2NUr4BF6oZw2w82cqp2gRERXOwEsmlU1jPz5aF7NJlhmZUb3g_LNPBC7k5Ko597YciXRzw4BW-MyzrquMMvvnUACuKfkRfb1fVtQWlvSjhQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

7. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, two values are specified in the properties to be assigned to two variables, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdNTjMCWyVOFdhGFooRMXp6ycgrHHHbOI_31LjMma8nshYAU05ejLfFeOw2n1Dmneeh2VcK0A2OAqOsrvWJaNDBc3doHFSLPZRSHg5eHtcGne6Y7qXSB4GG40bTqLNEvPZ7fmi5zA?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

8. **Block “Open Document”** allows opening an Excel document. For this block, the property “File Path” is specified (the path to the Excel document that needs to be opened).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcvvIUHH7bWJz54q54-_EDZGu_g-h-LVmU1LErrH5_xt4s6tuVcQ8Sx1JI1JtbWnGAaPSAXOAZx7yIhHyP0QNHzA_1QOnDbggpCAUwnK7Cpsq8_fmwZGb-u-incIy7ZlW8sROpdOg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

9. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, one value is specified in the properties to be assigned to one variable, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdyfpL90X9IrteTlXWxod7J2ogHT3frk5fo270kaQ5iRiEkOtE0l6bVUz5h0nJFXTuMLBL9DB8dZCnpZmnDcjAFeZd9v3Exaocfsu0Kb8dDlSSLF76oCznlr_7bWVapthD07bCC?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

10. **Block “Get Cell Value”** allows reading a value from a cell in an Excel document. For this block, the following properties are specified:

* Document Reference (a reference to the document currently being worked on);
* Sheet (the ordinal number of the sheet where the required cell is located, numbering starts from 1);
* Row (the row number where the required cell is located, numbering starts from 1);
* Column (the column number where the required cell is located, numbering starts from 1).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc7gctByGXE8fW82ClujQYCKSZ8-2g9-Ce1B_9_KlXMfFY010ao1WCtTtZK7iZViv9R2e6xbNgALKuOxHuJVVdu1T8eOt8DmIdZg7JrUK74L-MzG5nm0mtybuYUPdkhzRqQslRM_w?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

11. **Block “Get Cell Value”** allows reading a value from a cell in an Excel document. For this block, the following properties are specified:

* Document Reference (a reference to the document currently being worked on);
* Sheet (the ordinal number of the sheet where the required cell is located, numbering starts from 1);
* Row (the row number where the required cell is located, numbering starts from 1);
* Column (the column number where the required cell is located, numbering starts from 1).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfaYtZiwAcedj-fW42sOCKsueMiFlk8wsExISq42wzUgmT2v0oyGAayRV046OFzcJqrAT2FXbKtzJF-8OrOIst65zToTn4Zg8eKMQJM3xI5m4LiuosJBEoehX7TbuSUQGtJHi6R3A?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

12. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $ValuePhone.Trim().Length==0. That is, the length of the string is equal to 0.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeUJGQq_UdYMHyeACR1rTDj7Qkdv4bjMHR3AVhqlRGke4DoVdD4hZMLEkx4iQ9fxCbrs6vc72rPe213GvKnQYc6w5wQlBWHAsqm732yQUd5RNMVIiqOCS3ll7ghZwGfJ3NFO6y2?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

13. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $ValueFIO.Trim().Length==0. That is, the length of the string is equal to 0.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdzwD6UtrjjPka8y3alzhzxWoslPgM92uDooafIexwz11puUAmvrkk17FSLbJg8VG6c2B-0KBwKWIqVQ25sjbpOGCJsAmI2b6ZE4Tq_w8s2BiEvlpFEb1CnuP002ijHe9P5mSbyLg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

14. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, one value is specified in the properties to be assigned to one variable, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdrGKS3hL9YWhbqRxTsKAY9XQHnrSgBY3LWzGmmpnog_lpKdD5EwabILOzygJiRkhvgPaB4ehm8DMga38_MQErwdXNbRJlu_3Z4Nltqsmczhn-7mUYYBNgTArtEmvog1-tyScuDTQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

15. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $countempty>5. That is, the number of empty messages must be greater than five.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXczMNhAChN81dmgDIrQDkOSwosEDxYBlAaY4z0KKqgnfUJpT87NeGibgpn6fDajAO-9SjfMi_rJhO_TmCSTaWKzw4mpjVrrh-uWL2KYGszNGgPk5Y6ArVNptSBhbeY_et_AgGt_Og?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

16. **Block “Save Document”** allows saving an Excel document. For this block, the following properties are specified:

* Excel Reference (a reference to the process of handling the Excel document. The variable name in this property must match the variable name in the “Excel Reference” property of the “Create Document” or “Open Document” blocks from the Excel group that were previously used to create or open this document);
* Document Reference (a reference to the document that needs to be saved. The variable name in this property must match the variable name in the “Document Reference” property of the “Create Document” or “Open Document” blocks from the Excel group that were previously used to create or open this document);
* File Path (the path to the Excel document).

**Note:** *to save the document in the same file, leave the value empty. Otherwise, enter a new file path. If the specified file exists, it will be overwritten. Available formats: ".xlsx", ".xlsm", ".xls", ".csv", ".pdf", ".xml"*

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcs8cWopu0zyBt57fmSKvCHia3t0KCeVbZMzOa7UHrS0LiP7N5zBB6xpiFVzwSXENHWTa3Kk6QXmFDYmNVJzBUDOowpAdPlH39ea3CsOLW_tfOUH9QFRfJV0Frs-Qf-e1SoZnGi3Q?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

17. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, one value is specified in the properties to be assigned to one variable, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeSjv6ON2JABD50x9sV7-_hv5jjpUDIHKUthMiBDCt8nDR8mhb77ApD2o8Xp85XjoFTUGJl3fR-SVN-AGzr3rl_NqgRprMVGPUdILgY0LkfxQKsVppGmbfGQZJ54cr_jy0wkZCWxQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

18. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $ValuePhone.Trim().Length>0. That is, the length of the string is equal to 0.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdsKB0XAnenxtReBBuquabnUK4ChslQwDO0kZKn3atUz4cK5GUTVgJ7YTsEZjxJRnZOCuqIIy2TiuUbKtzk3-Z1rzkVINt0gzGvvaxms5xLxPIr14vZPaiitn6DGpxvRGWiLpyPDA?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

19. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $ValueFIO.Trim().Length>0. That is, the length of the string is equal to 0.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdzwD6UtrjjPka8y3alzhzxWoslPgM92uDooafIexwz11puUAmvrkk17FSLbJg8VG6c2B-0KBwKWIqVQ25sjbpOGCJsAmI2b6ZE4Tq_w8s2BiEvlpFEb1CnuP002ijHe9P5mSbyLg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

20. **Block “Substring Replacement”** allows replacing one substring with another in the text. For this block, the following properties are specified:

* Text (input string);
* Search substring (the string that needs to be replaced);
* Inserted substring (the string to replace all occurrences of the search substring).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd2nKKIwrFR4LMAeDrqrBfsiuFTKzqyTpGTd_Q355I0xu0_ioGyHwceL_Qa2iT2QbPwEtXzp-JvOenQToZrhlfJG_f0EaxWOelEEVjPUiqB8fEafeL24IjCCA_gykcpzNum9qy3pQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

21. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, two values are specified in the properties to be assigned to two variables, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfcoqc8Uulj5CcKEDe9DxB_6ApJljp6hei12hv9_LM5hGPW4OF30Zlffz-68iNV-pMaxUT_4eZ7ZE6xuUW14wwXq_WvfWc6D7xXS3YEJamQZUcTrniMZAH6xmWPgWa8R-dXnamIKg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

22. **Block “Process”** allows creating scenarios consisting of multiple diagrams. The execution of the scenario will continue from the “Start” block of the specified project diagram. The execution of the scenario will return to the current block and continue in the current diagram as soon as the “End” block in the external diagram is reached. For the “Process” block, the property “Diagram Name” is specified (the name of the diagram file where the scenario will continue execution).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXexdf6R3oVqdjTmsIlfVggy74_zX8RgQ5wE67ktxXV0xhUq88wQV80J0YH1UxdfNNm3BpJ-NvOGxhpz6iLHDREqDitCE0u2oIllX-MweJeBrM-2xTjp8oC1771SdNTxHR1wmezAKA?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

23. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $IndexSaveResult>=0. That is, the index of saving results must be greater than zero.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdMxT_gWyTX5hTjyZ98lSKYQ8--GCTX4kQVsuh085gom_gGYK7mnPDffynlMej8T7PzK4Vsae8NPRFcjEMEmSPE-EHDXcdMN2SeNZ7Tqsjyaqgogl-OqzdlnaaHxG1m5bI0XmRrCQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

24. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $SendSuccess. That is, the boolean variable = $true.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfTEtaql3p_FCdxwoLNto2Sph2fRSq32Q9rNbVbtme_zsC1TdfX7MZdC-dXL9jhiiHfm0V_kfxUwiW4eqWD73Qxu35jtJB5N9RQMdSz9hynkWLno55sMTkzw-VNLDqVFuGcYMRSmw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

25. **Block “Write Value to Cell”** allows writing a value to a cell in an Excel document. For this block, the following properties are specified:

* Document Reference (a reference to the document currently being worked on. The variable name in this property must match the variable name in the “Document Reference” property of the “Create Document” or “Open Document” blocks from the Excel group that were previously used to create or open this document);
* Sheet (the ordinal number of the sheet where the required cell is located, numbering starts from 1);
* Row (the row number where the required cell is located, numbering starts from 1);
* Column (the column number where the required cell is located, numbering starts from 1);
* Value (constant, variable, or result of calculations that need to be written to the required cell).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdP-JL5n9AfMBVxnXQ7W_o-Vdfsvy_KK-3HAMKMGv3ambTWGUPgbuY9zo9CfcLgpniUNeRJhdPqhGg6lTQWbJIGrPAalzKM-w0K6gMAXCB8u2fF01DgeDfpMJst49aPFn964LtL0A?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

26. **Block “Assign Value to Variable”** sets new values for one or more variables.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeCHeoYg93Ocflgo2BaXYLqqkrdKE1QVOPySE-lD2sSFhnz9Ea6WwZvh2Gh_UyHO8GFFkwLTjvw7LyleS_LKS8PMo5qCkSObqQQGXhpbUraYixf-tj8x-JpqIL6PQEoSBzeS8HLhA?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

27. **Block “Write Value to Cell”** allows writing a value to a cell in an Excel document. For this block, the following properties are specified:

* Document Reference (a reference to the document currently being worked on. The variable name in this property must match the variable name in the “Document Reference” property of the “Create Document” or “Open Document” blocks from the Excel group that were previously used to create or open this document);
* Sheet (the ordinal number of the sheet where the required cell is located, numbering starts from 1);
* Row (the row number where the required cell is located, numbering starts from 1);
* Column (the column number where the required cell is located, numbering starts from 1);
* Value (constant, variable, or result of calculations that need to be written to the required cell).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeZVeCc6fL2dPyUfRcmHoK5kglWQ7b54GjgRcA1u-fIi4-XwXkZO0D6Xx-dAtKJ5SIc7X9DXtCAseqsczwrkDXgeAkkiWKIANd4eYl3CcbcCDBzcS_4QFtjWpLP-SGFAdpjEjPXPw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

28. and 29. **Blocks “End”** (these blocks complete the execution of the scenario or return the subprocess diagram to the main process).

**Diagram “Load Settings”**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeUIYs7r33_kKTfCFcsvDiIcbHL3XK-0YrZIlOHSevguR-bmuYnYWi6WSf-TLyo9lnynmBG7x0LS7ppmYoZxKZAomQS-KeAySO_JgoFGcjPDBqoOiAgF4iTTfbuVy1DlUPwOBPL8Q?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdM-B3eUdxojBlToR3TXgBG0JUuomuBZczOJkrYTB1_P8ZWjLTyW3v2CvyR0Owy4Kmll09wC5yS6coWReOz03lLHqTGqyBmNbXnWZP1bzIsF0perWl4Bq88YOs9DnK-5hJzR06oeQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

1. **Block “Start”** (any diagram begins with this block).
2. **Block “Open File”** displays a dialog box allowing the user to open a file. For this block, the following properties are specified:

* Title (the text that will be displayed in the title of the dialog box);
* Filter (file filter for each parameter filtering string, the filter description is followed by a vertical bar (|) and the filter pattern. Lines for different filtering parameters are separated by a vertical bar).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXddmxfHpvbg0cw_TmizaH58xOD9oKqIuvKvwxE3H8sh7rrjrHv2FSR9bYW_7Rh1tJAN7w6dtYg_wzT7BarrlY7PqMNwdoUBEroo2nft-RZtkzoUPef7DpBCNyHBURySawpH1UDs?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

3. **Block “Text Input Window”** shows a modal dialog box designed to obtain information from the user. For this block, the following properties are specified:

* Title (the text that will be displayed in the title of the dialog box);
* Message (the text that will be displayed inside the dialog box).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcjMfpomTtlrTpW5avrlZ4dBVAo8k0bZVOYTP9uXriAty8DcFVu9cSFy00HYvPwVxMqTfMuH4SmJPTc5Bic5I5HZKzYvqfM4HZL6UWxxt4emoCHSbV8RjcUSHtUo3DDq-ZkwZenpQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

4. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: \[int]::TryParse($Result, \[ref] $IndexPhone). This method converts text to a number and gives a boolean result, which is checked against $true.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfJyb3GZrMX_RVCm8dMVwbk7NcY2wf7KuKpn6ZtEttYVh6tF2ckg8DmWZVSfXLZmcZWMuWvwJPXZyv6Yho5yWsPdEXvfxcOiltIPsTHv9N1CkeaJtHxHsMrIqcgma0zpd-6bbm1Cg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

5. **Block “Text Input Window”** shows a modal dialog box designed to obtain information from the user. For this block, the following properties are specified:

* Title (the text that will be displayed in the title of the dialog box);
* Message (the text that will be displayed inside the dialog box).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe2xiaYVY1EoMObSvmZ63lsazXETP0w8qLjVE7hktoOUF9VneluSYDEwd4Ek_CA5CLntev8I7rH7jaulkBFDTlke4oCcsRNRGR6MUMPJku3BuLP6r7ilCIql1msYI8dYzKWw5ZqyQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

6. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: \[int]::TryParse($Result, \[ref] $IndexFIO). This method converts text to a number and gives a boolean result, which is checked against $true.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc8VBP38Q-PoATX_VUfS6Mmylb8lt6XUVf46X5mqnmdVg8tRaI-zl3kXvaNHM-QFesXsLDhaS6dY6a7beoSgBiB9N-j2yZMxETihTVm8UL5g9EHKRduUGiCBXXZIoUIVVyy0p3hMQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

7. **Block “Text Input Window”** shows a modal dialog box designed to obtain information from the user. For this block, the following properties are specified:

* Title (the text that will be displayed in the title of the dialog box);
* Message (the text that will be displayed inside the dialog box).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdaITMyi5cAdtPljJhLfVwGmHUM_dHD-vkZhWr5ZC-h917RV--3vvDLifQ82wFuE-RmlSIwgDLJI8Q1HXUSp-GLz6cRdILyvCnggviX9UCQI4JjPESpR6MRTEW9cGX1kIBvDVNSxw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

8. **Block “Execute Expression”** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, one expression is used.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeI_iEuRl305x5hRATuWDV_vBduU07gmSSr5kGUKMpCwMkaSXwEqp8GNi0nGFfRAeS47_s4R_McDfBHQhguMPXtZ5zYH98pFxz7YSE2WWjb3XinXNH4h5kFeLHP9swMMnirNdd9dQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

9. **Block “Open File”** displays a dialog box allowing the user to open a file. For this block, the following properties are specified:

* Title (the text that will be displayed in the title of the dialog box);
* Filter (file filter for each parameter filtering string, the filter description is followed by a vertical bar (|) and the filter pattern. Lines for different filtering parameters are separated by a vertical bar).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdyzBFM0JrBie3QAcFF8bfbOOYDvrHwmPhkhoMwaDXCRpYkF9j3evoD0m1ijXiox_w4tsMUwCWXHK0krmu5pCiLcoTIyr3K1sKxY2w3ZsL5v-DF24SULVJr6Kkfcmq2P8Eh0T4Rag?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

10. **Block “Read File”** allows reading the contents of a text file into a variable. For this block, the following properties are specified:

* File Name (the name of the text file whose contents need to be read);
* Encoding (the encoding of the file).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXflxg5G6PJXpYWekVcBuJoOOINFZsZ6aHSE3lSWFa5TQLGi3nDQ4EV0pMMJhVbdC6nJqPYHSEe-V1_PDHAvDc_tGG4fn1CR6GF1ecK4Qv1HVKeYsu2TwtstPUSSbdhn7UMIw9DVog?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

11. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, one value is specified in the properties to be assigned to one variable, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdUVEqRnPFD110iUChKkk27aaL4ENjl35cQmja72qRSgkS5JmWaXYtH70foiOJUrMy2L7OKQDDEwmV_eJirDVpKvklK9veztC-_ieit7IPvWCNjhjkpsU8pPnTNlWoMNmyT8tmiaw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

12. * 16. **Blocks “End”** (these blocks complete the execution of the scenario or return the subprocess diagram to the main process).

**Diagram “Send Message”**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXda80xwG9zyddeUe9jBviiqNfrantE56q5K9Ma2-ASRxRI9SJgjr4ounUQK971rpXgqxLmOhw0mP3DievnlqYPswuOfUSBJrmrVtsq6s577tNimfUuPc78vKL8cDixfJRcVIwg1EQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe3ZfhfmXkLEzmxAbVNwNGzBmy4iXVEQ3wycl-ReDIvirBrffmxodjk59O17Wk2kVYoYiKAbfeaUaVr2WVsoG3NCnHPld0FFly1wgzP2k_2dqP0bqVYA2-2P2vyqfkq_shaJUejbA?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

1. **Block “Start”** (any diagram begins with this block).
2. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, two values are specified in the properties to be assigned to two variables, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeAnpTBL3WaqIZjF8Y1SfMVGEtgN3FoBXSkJiZKMRpLDAZbU3OcW-VQeXBFy-gjEVH8DwlyygyQj_H4t5PKfRhKxOU7jwFHv8WbC_M_ahwnZWHVC56ctHq4iKWnFzSoy-cpzlScZA?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

3. **Block “Loop”** allows repeating a chain of actions (blocks) several times while counting the number of iterations of the loop, recording the current count in a special variable (specified in the “Loop” property), which can then be used in other blocks. Upon first entering the block, the value of the variable from the “Loop” property is set to “Initial Value” (in this case, it is equal to zero), and then the execution of the scenario continues towards the “Loop” exit of this block (to the so-called “body of the loop”). As soon as the execution of the scenario reaches this block again, the value of the “Loop” variable will increase by the “Step” value (in this case, it is 1), and the transition to the “Loop” exit will occur again. As soon as the value of the “Loop” variable becomes greater than or equal to the “Final Value” (in this case, it is set to the variable $Phone.Length), the execution of the scenario will continue towards the lower exit of the block. Do not forget to connect the exit of the last block in the body of the loop to the entrance of this block or any of the preceding blocks.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcA1XiJ5sw32p6Eep08Ij7NZS5RGZYKEm3BJs4a-AssobJFedi4sYydNRejZasUb7O69a5veKH8QsHanUc5rU_jWmpauHYX2Tce5GS-XFx3XlXBPWRpI12u64ukr0lTNHlN6GBQLg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

4. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: \[char]::IsDigit($Phone\[$indchar]). That is, it checks that every character in the string is a number.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeVlaVzxYQlFo7WB8KcBAWL-1Px4iISfnnXHjOWdc96nYE_Z8g7NKydJpiZzx8x4DiIEOrm0eA1Q0QGXXvWlwougP7EJQNIhSztusWN6kZk4DyQbwK2TFZZdb4twvkZzYieMLzCug?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

5. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, one value is specified in the properties to be assigned to one variable, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcDTOtjtSYhnYvo_Zlt4pp9saTwMd74p6DmT1qdLeiIEvO-7HFHBadyGHDuRaU2ZMVOV2VPz7ElOxTYhYJx8sTBlmi6EhI-qYwRVuh2b6V0_uHFzlRr_e9iroBwjLOt61jwVBIdXA?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

6. **Block “Get Substring”** allows extracting a substring from the source text. For this block, the following properties are specified:

* Text (input string);
* Start Index (the index of the starting character, numbering starts from 0. If a value less than zero is specified, the starting index is counted from the end of the string);
* Number of Characters (the number of characters. If an empty value or a count of zero is specified, the string will be extracted from the specified index to the end of the string).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdF8KePdpJRqOUgsr5S0ch18kpWFHLsnTBFxhg5ATuhK1MnuPye0D8pWchidtr_mEbKc-5971gZz03taRHURBkse-XVNueCXko3cglOp22dlYYdShHdGuDI69xmVxZq5veFbN7Z-A?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

7. **Block “Get Substring”** allows extracting a substring from the source text. For this block, the following properties are specified:

* Text (input string);
* Start Index (the index of the starting character, numbering starts from 0. If a value less than zero is specified, the starting index is counted from the end of the string);
* Number of Characters (the number of characters. If an empty value or a count of zero is specified, the string will be extracted from the specified index to the end of the string).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdLkeqKitL4EZXdYyf1nds1BiMWpKbLnNVcyj-ZztUkBkECxu9yyVndBaQ5aCPflLf83JBDP5BCeqqMdg4jilrd0VsBXZsJGiLUdDAWUFYgub_1V2odAXjlxcSU064d3sylcoAAQQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

8. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, three values are specified in the properties to be assigned to three variables, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcys6vu84FTxhU4zAbh4RRKfB0llyNymmJNiMo7f_ok9MO6S79hWRdvyKsM_3W0Le6luZWWjtg_D_6jHOx9sSERZjPOAwlUnCykNdCm3BJNdcMgJRXZMI5kaSZeBb3vrrRRM4FonQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

9. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $normalizednumber.Length==11. That is, the length of the string must be equal to 11.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcB32eiKh_L_su3dtWLb9J8EUMGLWTwe7wbrgWxqgzSFiyiPFJvhvlA6vsgzQNQ57D1owvCMN3RvEwlS5paBUbm-JmNc86_R9j1vdklLEzpuzcE-2XyuNorqCN5xqpfpl6OKrCR?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

10. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified, and the flag “Display in Status” is set. A text constant is indicated in quotes, and the variable name starts with the symbol $. That is, it outputs the log message “Sending message to number:” and the number itself and displays this message in the status.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfpjgVE0SkC-Vq3ix07z-cOAwyJpw6Rr_pvd5JizwTJUls32_82BI38f4V7OCLPsLtraWjkzyiIuDzPuwycA_v3J0qmcBbA5y9szjxsx5eRv3u6lDkQUoSojT7GfZYJcajLM3iqpg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

11. **Block “URL Encode String”** encodes a string for transmission in a URL. For this block, one property “Text” (input string) is specified.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd7KOIC16Q0R1A9lQPvwxxt6nosiLP0Eno5PmlnKDOPi7cQ7kgQsUlovkBFsQ2UfZeMZdoYj1y61OUZk2Zc8SYjWWO5qsV6_jDyiw95Ye2PlXJLBenST1S-iDk-AqrbtUkZkJE8?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

12. **Block “Launch Chrome”** allows launching Google Chrome. For this block, the following properties are specified:

* URL (the address of the page to be opened when launching Google Chrome);
* Current tab (if the flag is set, the page will open in the currently selected tab of the browser);
* Wait time (the time to wait for the application to launch and the tab to load in seconds).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcIIwpR3DnxCAiSrcpGCPv0iNUAoneMckgUMRbE8ModsH_4RNa9yP_bnR9qWT3mB2dzy-SihZf5jHrr8-wb3VPFwSAPAlVqTQg5Y-94VKy_zXncD55xEOP0isKXaKiVwkQehxtHlw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

13. **Block “Wait for Appearance”** waits for the appearance of a user interface element on the screen added to the diagram using the user action recording tool.
14. **Block “Check Element Presence”** checks for the presence of a specified element on the web page. If the element is found, the execution of the scenario will continue through the “Yes” exit, otherwise - through the “No” exit. For this block, the following properties are specified:

* Selector (identifier of the browser window and the web page element);
* Process ID (a variable that stores the process and tab ID of the browser used by this block).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf2TO2buskySMi704OvIkyXCuWCEunCVMIxP0e3-Pp6Mycp_puQUFuDDRmlF2ac-2dA4rduK1NRIsBnBYNJ-XUyR2LU36CSJ6B8kgqDPlE-UlPH-p4FQ1Sodc5A9FWeEzdy6WVfFQ?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

15. **Block “Click Mouse”** performs a click on the specified application element added to the diagram using the user action recording tool. More about it *here*.
16. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified, and the flag “Display in Status” is set. A text constant is indicated in quotes, and the variable name starts with the symbol $. That is, it outputs the log message “Message sent” and displays it in the status.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcnvmKBlyvOLvyBhTbFU5uh6kXMqQVymtiAYgvDN1a0-PuG94TN4xSoZzz8tyZOmtpv9Cmkp-JEvAxn2MUh4ekHOjJ7m-1dSqI5NgZ8aCTSSagKwef5aUPqxoq35DMNLNaUuhvXzw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

17. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, one value is specified in the properties to be assigned to one variable, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe_QlVK_sX9Jio0uniFdrYfCGM8T0r7U_ERxL71MRcB2wQvy5j5UhPEe98jIaO7u0X97wMLHxhk8OwWpcEJWCg-5QZD_1PKMN2WZ_rMDdAxqx6zBh_7wWFKT561e-16oydsuJZwZA?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

18. **Block “Check Element Presence”** checks for the presence of a specified element on the web page. If the element is found, the execution of the scenario will continue through the “Yes” exit, otherwise - through the “No” exit. For this block, the following properties are specified:

* Selector (identifier of the browser window and the web page element);
* Process ID (a variable that stores the process and tab ID of the browser used by this block).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd4bKwOzHWpIB33DN9vPPdvxaBBcDdIVRDY0EgepQZ24n5hyHSfIulqIO4ddyv6WWj1Xu7lVo0PmXiWyb2LsWFoYeOigpSfKwBDTWYACKQ34IRkxs-Unq6Cb3sFycrr2gl4SHXB?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

19. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified, and the flag “Display in Status” is set. A text constant is indicated in quotes, and the variable name starts with the symbol $. That is, it outputs the log message “Cannot send message to the number” and displays it in the status.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcwGEJwCJTwIOdqjZ-jZxQQt3GRgEnVikSCj37_5lcNeHg7ZoNbtzgeFEzrm1DxdZr5s1ud7i0OdG_QHXSoyL1XWZ4uh24EkkJX_2eVvCVcLcVgyIepikkUxXNQ_mdWHJIwi1Bhgg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

20. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, one value is specified in the properties to be assigned to one variable, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeZPOz_U1QRGw_nZHqQXaz2Cr2m9WthLXFBiMhQWRgiSim1L1kIJjqLtD9ycxyU38h48gb3I7uB0VuHgnaMdYpvLlkcg9RmP2GFc92ZjiW5yihhZpgFlilNHhLMpjl2gAjwvYuBgg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

21. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified, and the flag “Display in Status” is set. A text constant is indicated in quotes, and the variable name starts with the symbol $. That is, it outputs the log message “Message sending error.” and displays it in the status.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdbiJhaU0f0U-hv5FjrlSuN5IFIOv3fL8W1InziCUrxfFjY8EjWrnZijwCMejrsOG6s9Y4LUukd827K1bAXm8W3bFq6ELX74qIJnitRGMmtGYPgPUqAsMORi___iPNArmptidBRxw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

22. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, one value is specified in the properties to be assigned to one variable, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfEf6AC0jfDPPrdnn4R5vW4nuFr7Y7DQxFSR2V1cmYtKcHsnm1t_WIG3dcc-177KFM7ofGAPwhNiv6UYEGeG1zZhK6g6JSowJVROtFAB2mdhqxBZCoram2F597cDVWxlYH9zU5g2w?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

23. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of the variable $a is equal to “Hello”, then the exit is “Yes”, otherwise – the exit is “No”.

$Result > 5, that is, if the value of the variable $Result is less than 5, then the exit is “Yes”, otherwise – the exit is “No”.

In this case, the condition is set as: $attempts<4. That is, the number of attempts must be less than 4.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeSwFQXXv8dEFq6xmil4UzR9SFLvmQFojRuHoYr0cJvPWSAq5lS1BWZtGlUR3zztoq-CPy2fbvK6t_MbijKqrDap-1oCG-C2p3CP30GnyXX_wKTsa8p2AUrI10dvNubphew8CKWhw?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

24. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified, and the flag “Display in Status” is set. A text constant is indicated in quotes, and the variable name starts with the symbol $. That is, it outputs the log message "Resending. Attempt No. " and the attempt number and displays it in the status.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdZxh2EQz_HCNj8f23uoeQuTRDksDsMFYzONVeeXUXS6myPy5HComtz_fy5nfFSuB7hY4B2sg7WiP-_uqwPPy3PeAaOGRCNy11PlohkIAmzV88lAIsZ3anSR75-834I6y6T3fASlg?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

25. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified. A text constant is indicated in quotes, and the variable name starts with the symbol $. That is, it outputs the log message “Critical error...”

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc3geEavsddbuagGi7R1Q8H4MDKgLeLtQBujxNeOlCsbxfDt0A8-oJQr_FWZdMH5S2m5IWgLJCLVPmlyUeBpMYw9JxQRVy-mwWMGNAsulGRdwyFfs3uHp2-W4oR8GIoXHLBSBW8ug?key=cSgHfCR5kYldViNwtblH6ZqL" alt=""><figcaption></figcaption></figure>

26. * 28. **Blocks “End”** (these blocks complete the execution of the scenario or return the subprocess diagram to the main process).


---

# 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.sherparpa.ru/en/sherpa-rpa/sherpa-designer/primery-robotov/whatsapp.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.
