Config
Config allows displaying a "one-time" form in the Command Bar. All values from this form will be securely stored on the server and sent to the command any time it is run. Useful when a command requires some configuration (e.g. API key) before it can be run.
To see a real example, check out the Send Slack Message command.

Config

Simple Config Form
Config Form with Error
1
{
2
"config": {
3
"form": {
4
"fields": [
5
{
6
"type": "text",
7
"id": "api-key",
8
"label": "API Key",
9
"placeholder": "GIPHY API key"
10
}
11
]
12
}
13
}
14
}
Copied!
1
{
2
"config": {
3
"form": {
4
"error": "This API Key has expired",
5
"fields": [
6
{
7
"type": "text",
8
"id": "api-key",
9
"label": "API Key",
10
"placeholder": "GIPHY API key"
11
}
12
]
13
}
14
}
15
}
Copied!

Show Config Conditionally

You will likely want to show the configuration form to the user conditionally, e.g. when the user hasn't entered the values yet or when the values are incorrect. See the Send Slack Message on how to do it.
Last modified 15d ago