Map to a Script
6 min
for the rule types custom actions and unresolved references, you are able to choose "run \<language>script" as the target type (available languages are c#, javascript, powershell, python, robin, vb script, and vb net) then, paste your script into the target script field for enabled rules with this choice blueprint on export will substitute the run script action with the script you provided everywhere that it encounters the action referencing source parameters β applies to run vbscript, run javascript, run powershellscript, run pythonscript, run robinscript to allow for dynamic and contextualized scripts blueprint has the ability to reference the source activities parameters using our special { } notation example let's imagine we have a custom activity in uipath that calculates the modulo of a given number by another and we are exporting to pad activity name mod input 1 num input 2 divideby output remainder it would look like this \<mod num="mynumber" divideby="mydivider" remainder="myresult"> since pad supports modulo, we can replace this custom activity directly with robin script (run robinscript) however, we cannot simply export num , divideby , and remainder , as these parameters will be different depending in what context our modulo activity is being used in our example, num is mynumber but for another bot it could be mynominator , or mynumbers("nominator") to specify where to put the bot specific inputs and outputs, we use blueprints notation to convert our example, we would use the following as our script set {remainder} to {num} mod {divideby} then when our example is exported, it will export as the following set %myresult% to %mynumber% mod %mydivider% powershell script example with powershell scripts anything printed to the console is saved in an outout variable here we calculate our modulo and then print the answer to the console to save it in an output variable $result = {num} % {divideby}write host $result