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 Workflow 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.
- Start by setting up a
Working Directory
using the Create Working Directory action.
- Next, write your
bash
script in the code block provided within the ‘Run Bash Script’ action.
- Finally, in the ‘Working Directory’ parameter of the ‘Run Bash Script’ action, enter the name of the
Working Directory
you created in step one.
NoteIf 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.
Parameter | Description |
---|
Code | Bash code to execute in the script. |
Advanced -Working Directory | The name given to the working directory in the Create Working Directory action. |
Advanced – Prerequisite Packages | Specify the required package(s) for installation, including those available via apt-get . |
Run Node.js Script
Executes user provided JS code.
- Start by setting up a
Working Directory
using the Create Working Directory action.
- Next, write your
Node.js
script in the code block provided within the ‘Run Node.js Script’ action.
- Finally, in the ‘Working Directory’ parameter of the ‘Run Node.js Script’ action, enter the name of the
Working Directory
you created in step one.
Parameter | Description |
---|
Code | JS code to execute in the script. |
Advanced- Working Directory | The name given to the working directory in the Create Working Directory action. |
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.
-
Start by setting up a
Working Directory
using the Create Working Directory action.
-
Next, specify the Node package you wish to install.
-
Finally, in the ‘Working Directory’ parameter of the ‘Run Node.js Script’ action, enter the name of the
Working Directory
you created in step one.
Parameter | Description |
---|
Package | Name of the Node.js package to install. |
Working Directory | The name given to the working directory in the Create Working Directory action. |
Run Python
This Action allows you to run a python script and retrieve its output.
The following packages come pre-installed for immediate use:
certifi==2022.12.7
chardet==4.0.0
idna==2.10
protobuf==3.18.3
requests==2.25.1
six==1.15.0
urllib3==1.26.5
dotmap==1.3.25
pandas==2.2.3
tabulate==0.9.0
openpyxl==3.1.4
markdownify==0.14.1
mistletoe==1.4.0
pillow==10.4.0
redshift_connector==2.1.5
pypdf2==3.0.1
psutil==6.1.1
pytesseract==0.3.13
Python v3.8
has pandas==2.0.3
- Start by setting up a
Working Directory
using the Create Working Directory action.
- Next, write your
Python
script in the code block provided within the ‘Run Python’ action.
- Finally, in the ‘Working Directory’ parameter of the ‘Run Python’ action, enter the name of the
Working Directory
you created in step one.
Parameter | Description |
---|
Code | Python code to execute in the script. |
Version | The version of the Package |
Working Directory | The name given to the working directory in the Create a Create Working Directory action. |
-
Option 1 - Variable picker: Use the variable picker to select the wanted information.
-
Option 2 – Use the “context” object: In Python steps, you can reference workflow variables using the automatically generated context object syntax. The
context object
syntax allows you to access values from previous steps, input parameters, or other variables, and to set new variables within your Python Action.
Installing pip Package
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, create a
Working Directory
using the Create Working Directory action.
-
Specify which python packages you wish to install, by writing a new line separated list of packages, and run the step.
-
For git based packages use the following package name structure:
git+<protocol>://<git-provider>/<git-user>/<git-repo>.git
For Example:
git+https://github.com/psf/requests.git
git+ssh://git@github.com/psf/requests.git
-
Finally, in the ‘Working Directory’ parameter of the Run Python action, enter the name of the
Working Directory
you created in step one.
Use a connection when installing from a private repository, there is no need for a connection when installing from public repositories.
Parameter | Description |
---|
Package List | New line separated packages to install. |
Version | - |
Working Directory | The name given to the working directory in the Create a Create Working Directory action. |