Workflow JSON format

NodePilot stores a workflow's representation as JSON. nodes contains triggers and activities. edges contains the connections between the nodes.

The following example matches the workflow from the Quick start:

{
  "nodes": [
    {
      "id": "manual-trigger",
      "type": "activity",
      "position": { "x": 80, "y": 120 },
      "data": {
        "label": "Manual start",
        "activityType": "manualTrigger",
        "config": {
          "title": "Check host",
          "parameters": []
        }
      }
    },
    {
      "id": "read-hostname",
      "type": "activity",
      "position": { "x": 360, "y": 120 },
      "data": {
        "label": "Read host name",
        "activityType": "runScript",
        "outputVariable": "hostInfo",
        "config": {
          "engine": "auto",
          "timeoutSeconds": 30,
          "script": "$env:COMPUTERNAME"
        }
      }
    }
  ],
  "edges": [
    {
      "id": "manual-to-script",
      "source": "manual-trigger",
      "target": "read-hostname",
      "type": "labeled",
      "data": {
        "label": "Always",
        "disabled": false
      }
    }
  ]
}

Node fields

FieldMeaning
idUnique ID within the workflow
positionPosition on the canvas
data.labelDisplayed name
data.activityTypeTrigger or activity type
data.outputVariableName for later variable access
data.configThe activity's settings
data.targetMachineIdOptional target machine for remote activities
data.credentialIdOptional credential
data.disabledDisables the node

Edge fields

FieldMeaning
idUnique ID within the workflow
sourceID of the source node
targetID of the target node
data.labelDisplayed caption
data.conditionOptional success or failure condition
data.disabledDisables the connection

For an import through the web UI, the workflow definition is embedded in an export envelope. A complete importable example is at the end of the Quick start.

All chapters