> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Input nodes

In addition to action nodes, workflows support input nodes. Once reached, these nodes require one or more users to provide input.

Example

{
"identifier": "inputNode",
"title": "Approve/Decline",
"config": {
"type": "INPUT",
"userInputs": {
"properties": {
"reason": {
"type": "string",
"description": "The reason for the approve/decline.",
"title": "Reason"
}
},
"buttons": [
{
"identifier": "approve",
"label": "Approve",
"variant": "PRIMARY"
},
{
"identifier": "decline",
"label": "Decline",
"variant": "DANGER"
}
]
},
"outlets": [
{
"evaluationMethod": "button",
"identifier": "approve",
"title": "Approve",
"numOfResponders": 2
},
{
"evaluationMethod": "button",
"identifier": "decline",
"title": "Decline",
"numOfResponders": 1
}
]
}
}

Similar to condition nodes, input nodes must specify which option they're connected to:

{
"connections": [
{
"sourceIdentifier": "inputNode",
"targetIdentifier": "production-deploy",
"sourceOptionIdentifier": "approve"
},
{
"sourceIdentifier": "inputNode",
"targetIdentifier": "sendSlack",
"sourceOptionIdentifier": "decline"
}
]
}

Outlets

The input node stays in-progress until a condition is met. These conditions are defined under outlets. In the example we defined a minimum of 2 approvers to continue on the approve path, or any 1 decliner to continue on the decline path.

Submit buttons

The inputs the user is shown are defined under userInputs.properties and the buttons to submit them are defined under buttons.

These submit buttons are shown on the footer of the modal that is opened once a responder clicks the "Provide inputs" button.

A click on a submit button will record a response and cause the node to evaluate its outlets. If the numOfResponders is now equal to what is defined — the node will continue on that path.