Skip to main content

Code Actions

The Blink platform enables running Python, Bash, PowerShell and Node.js scripts using the following actions:

These Actions are preserved between the different steps of the Automation execution.
For example: if you create a file using Python, you can use it in a later Step using any programming language or CLI.

Run Bash Script

Executes a user provided bash script.

NOTE: If there's an error in a command in the middle of the script and the last command succeeds, the entire action will succeed, not revealing that some command may have failed.

ParameterDescription
CodeBash code to execute in the script.

RunBashScript

Installing apt-get packages

This is the Apt-get Install action, which allows you to install apt-get packages and use them with the Run Bash Script action. To use this action, specify which apt-get package you wish to install, and run the step.

ParameterDescription
PackageName of the apt-get package to install.

AptGetInstall

Run Node.js Script

Executes user provided JS code.

The NodeJS runtime is the latest LTS version.

ParameterDescription
CodeJS code to execute in the script.

RunNodeScript

Installing npm packages

This is the Npm Install action, which allows you to install Node.js packages and use them with the Run Node.js Script action. To use this action, specify which Node package you wish to install, and run the step.

ParameterDescription
PackageName of the Node.js package to install.

NpmInstall

Run Python

This Action allows you to run a python script and retrieve its output.

ParameterDescription
CodePython code to execute in the script.
Version-

Referencing inputs and step outputs in Python Actions

  • Option 1 - Variable picker: Use the usual Blink variable picker to select the wanted information

  • Option 2 - Reference Through the "context" object: Referencing of variables in Python steps can be performed using the automatically-created context object. For any Python Action, utilize the context object to fetch values of steps/input parameters/variables, or to set variables.

RunPython

Installing pip packages

This is the Pip Install action, which allows you to install Python packages and use them with the Run Python action. To use this action, specify which python packages you wish to install, by writing a new line separated list of packages, and run the step.

ParameterDescription
Package ListNew line separated packages to install.

PipInstall