Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Execute a shell script

This activity provides your Flogo application with the ability to execute shell or bash scripts.


flogo install


Inputs and Outputs:

      "name": "cmd",
      "type": "string",
      "required": true
  "outputs": [
      "name": "result",
      "type": "string"

Inputs: Schema of cmd parameter:

The activity expects the name of the script to execute and the script parameters be put into a JSON schema. The schema contains the fully qualifies path and script name to execute, which is a mandatory field, and the parameters to be passed in in a single string. The activity is limited to 20 parameters.

JSON schma example, execute in local directory and passes in 3 parameters. See simple example script below.

  "params":"aaa bbb ccc"

Note that the params field is a single string of space separated values and not an array or params.

{"cmd":"./","params":"aaa bbb ccc"}

Output from the Activity:

The output is the text string returned from the launched script. See very simple example below.

Configuration Example

    "id": "runScript_1",
    "name": "Execute a shell script",
    "description": "Run a script",
    "activity": {
    "ref": "",
    "mappings": {
    "input": [
            "type": "assign",
            "value": "$flow.command",
            "mapTo": "cmd"

Example bash script (

printf "test01 output: $1 $2 $3"


This activity has only been tested on Linux/MacOS only. No testing on Windows.