The different types of outputs bots can return to the user
main
function, by a simple return statement at the end of the function. The return value can be either a single output, or an array of outputs. The following example shows a bot that returns a single output:
text
markdown
table
columns
parameter.
columns
parameter, all keys in the first row will be used as columns.key
and title
- to give a nicer title to the columns. This will map the keys in the rows to the titles in the columns.file
image
"type": "image"
, otherwise they will be treated as a file output.json
stdout
or stderr
will be streamed to the UI live while the bot is running.
Logs are useful when building and debugging bots, and they are also a great way to communicate progress to the user while the bot is running as they are streamed live.