# Tutorial

### Create a new Workflow

Create a new workflow in your B2Data environment.

<figure><img src="https://2765655289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FazNC2d3F0oCJ4h8d212L%2Fuploads%2F55nRgM9yzlqfQ3XsPuYi%2Fimage.png?alt=media&#x26;token=66af5c1f-7198-432b-857b-f2dbde4026ea" alt=""><figcaption><p>Create New Workflow</p></figcaption></figure>

### Add Nodes to your workflow

In the left section you can find a list of nodes that you can use to build your workflow. Six of these nodes allow scripting usage which include: Source Script Nodes, Custom Script and Condition.

<figure><img src="https://2765655289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FazNC2d3F0oCJ4h8d212L%2Fuploads%2FURQrViUbtEhgDzmFYKw7%2Fimage.png?alt=media&#x26;token=dcbe8796-ee97-4178-a754-bb26d20d0827" alt=""><figcaption><p>Add File Uploader with some file, convert to Excel, then connect node to custom script node</p></figcaption></figure>

### Edit your Custom-Script Node

Double click on Custom Script node to write a script.

\*Feature to write scripts is available in [6 nodes](https://docs.b2winsuite.com/5.4/scripting/scripting-in-b2data/custom-script-nodes).

For example, you can write a script to return a filtered table from the table received from previous nodes:

```javascript
// Get a copy of the table reference from the previous node (premeir league table)
var table = NodeInputReader.inputAsDataFrame();

// Get the 2nd column as a String (football team column)
var stringColumn = table.stringColumn(1);

// Return a new table with only liverpool info filtered
return table.where(stringColumn.endsWith("Liverpool"));
```

<figure><img src="https://2765655289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FazNC2d3F0oCJ4h8d212L%2Fuploads%2FcxGMH034R9zDGww4MtIK%2Fimage.png?alt=media&#x26;token=8a5fcc6d-3e7c-463b-9226-c6e43b4de0a5" alt=""><figcaption></figcaption></figure>

Use the functions and classes you learn in [B2Win Suite Scripting](https://docs.b2winsuite.com/5.4/scripting/b2win-suite-scripting-overview) to write your own script.
