The Standard Input (stdin) allows reading data from the process's standard input stream. It supports both raw text and JSON-formatted input, making it useful for testing or scenarios where data is piped into the application.
"inputs": {
"stdin": {
"type": "stdin",
"config": {
"format": "raw"
}
}
}"inputs": {
"stdin": {
"type": "stdin",
"config": {
"format": "json"
}
}
}- format:
Specifies the format of the input data.- raw: Each line is treated as a raw string.
- json: Each line is parsed as a JSON object. If parsing fails, the line is treated as raw text.
Defaults to raw.
Each line read from stdin generates an object with the following schema:
{
id: '<input ID>',
type: 'stdin',
originalMessage: '<raw data or JSON object>'
}- The
originalMessagefield contains the raw line or the parsed JSON object, depending on theformatconfiguration. - If the
formatis set to json and a line cannot be parsed as JSON, it will be returned as raw text. - This input is particularly useful for testing or for processing data piped from other commands or scripts.