---
title: Map to a Script
slug: blueprint/map-to-a-script
docTags: yO7XZ9PJxDCKZ-Mf4TSYB,HK_rxWrGo8iZHH4PvnxmZ
createdAt: 2026-06-04T21:53:44.351Z
---

:::CtaButton{label="🟢 Migrator" openInNewTab="false"}

:::

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.

::Image[]{src="https://api.archbee.com/api/optimize/HRPaq4oJ2h9pHAfcjJGa6/En10iXcPCxTQBiCNKL_Uz-20260604-221852.png" size="70" width="1895" height="720" darkWidth="1895" darkHeight="720" position="center" showCaption="false"}

# Referencing Source Parameters

:::hint{type="info"}
ⓘ 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:

```javascript
<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:

```javascript
SET {Remainder} TO {Num} mod {DivideBy}
```

Then when our example is exported, it will export as the following:

```javascript
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.

```javascript
$result = {Num} % {DivideBy}Write-Host $result

```

#

